Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ecs_ecr - remove deprecated delete_policy option #1161

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions changelogs/fragments/1161-ecs_ecr-remove-delete_policy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
removed_features:
- ecs_ecr - The deprecated alias ``delete_policy`` has been removed. Please use ``purge_policy`` instead (https://github.com/ansible-collections/community.aws/pull/1161).
5 changes: 1 addition & 4 deletions plugins/modules/ecs_ecr.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,9 @@
purge_policy:
description:
- If yes, remove the policy from the repository.
- Alias C(delete_policy) has been deprecated and will be removed after 2022-06-01.
- Defaults to C(false).
required: false
type: bool
aliases: [ delete_policy ]
image_tag_mutability:
description:
- Configure whether repository should be mutable (ie. an already existing tag can be overwritten) or not.
Expand Down Expand Up @@ -536,8 +534,7 @@ def main():
policy=dict(required=False, type='json'),
image_tag_mutability=dict(required=False, choices=['mutable', 'immutable'],
default='mutable'),
purge_policy=dict(required=False, type='bool', aliases=['delete_policy'],
deprecated_aliases=[dict(name='delete_policy', date='2022-06-01', collection_name='community.aws')]),
purge_policy=dict(required=False, type='bool'),
lifecycle_policy=dict(required=False, type='json'),
purge_lifecycle_policy=dict(required=False, type='bool'),
scan_on_push=(dict(required=False, type='bool', default=False))
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/targets/ecs_ecr/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@
- name: When in check mode, and deleting a policy that exists
ecs_ecr:
name: '{{ ecr_name }}'
delete_policy: yes
purge_policy: yes
register: result
check_mode: yes

Expand Down