Skip to content

Commit

Permalink
ecs_ecr - remove deprecated delete_policy option (ansible-collections…
Browse files Browse the repository at this point in the history
…#1161)

ecs_ecr - remove deprecated delete_policy option

SUMMARY
Remove the deprecated delete_policy option.
ISSUE TYPE

Feature Pull Request

COMPONENT NAME
ecs_ecr
ADDITIONAL INFORMATION
See also: ansible/ansible#48997

Reviewed-by: Markus Bergholz <[email protected]>
  • Loading branch information
tremble authored May 26, 2022
1 parent b826728 commit fbb33ee
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
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

0 comments on commit fbb33ee

Please sign in to comment.