title: How to delete AWS ECS repositories which contain images using Ansible
body: <p>I want to delete an AWS ECS repository using Ansible.
  My Ansible version is 2.4.1.0 and it "should" support this as you can lookup here: <a href="http://docs.ansible.com/ansible/latest/ecs_ecr_module" rel="nofollow noreferrer">http://docs.ansible.com/ansible/latest/ecs_ecr_module</a></p>
  
  <p>However it doesn't work as intended because my repository still contains docker images. </p>
  
  <p>Here's the code snippet:</p>
  
  <pre><code>- name: destroy-ecr-repos
    ecs_ecr: name=jenkins-app state=absent
  </code></pre>
  
  <p>The resulting error message is:</p>
  
  <pre><code>... 
  The error was: RepositoryNotEmptyException: An error occurred (RepositoryNotEmptyException) when calling the DeleteRepository operation: The repository with name 'jenkins-app' in registry with id 'xyz' cannot be deleted because it still contains images 
  ...
  </code></pre>
  
  <p>In the AWS Console it works perfectly fine. There's just a warning text which reminds you that there are still images left in the repository. But you're still able to force the deletion.</p>
  
  <p>And now my question(s):<br>
  Is it somehow possible to force the deletion of the repository including its images?<br>
  ... OR ...<br>
  Can I delete them with another tool separately before deleting the repository?  </p>
  
  <p>Maybe there simply is no implementation from the ansible side and I have to use the 'shell' module instead (and maybe open a feature request for that).</p>
  
  <p>I'm very grateful for any advise.</p>