Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
[PR #1316/55923724 backport][stable-4] Add force_absent parameter to ecs_ecr module This is a backport of PR #1316 as merged into main (5592372). SUMMARY Adds a force_absent parameter to the ecs_ecr module. ISSUE TYPE Feature Pull Request COMPONENT NAME ecs_ecr module ADDITIONAL INFORMATION It would be useful for the ecs_ecr module to have capability for removing repositories which still contain images. This PR adds that ability by adding an additional parameter force_absent which has a default value of false and essentially just gets passed to the boto3 call for repo deletion. The following was run against a repository with an image in it. - name: Add ecr repos and sync with external sources. hosts: localhost connection: local gather_facts: false tasks: - name: test the changes register: state ecs_ecr: state: absent force_absent: true region: us-east-1 name: myimage/test - debug: var: state This was run with force_absent: true, force_absent: false and force_absent not defined. The expected behavior was seen in all three scenarios. I haven't added any new cases to the integration tests because there doesn't seem to be a great way to sync images into the repo that is created as part of the tests. Reviewed-by: Mark Chappell <None>
- Loading branch information