From fbb33ee9dad140a14d0e11ca458bd3ecbbc7ed83 Mon Sep 17 00:00:00 2001 From: Mark Chappell Date: Thu, 26 May 2022 09:44:42 +0200 Subject: [PATCH] ecs_ecr - remove deprecated delete_policy option (#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 --- changelogs/fragments/1161-ecs_ecr-remove-delete_policy.yml | 2 ++ plugins/modules/ecs_ecr.py | 5 +---- tests/integration/targets/ecs_ecr/tasks/main.yml | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) create mode 100644 changelogs/fragments/1161-ecs_ecr-remove-delete_policy.yml diff --git a/changelogs/fragments/1161-ecs_ecr-remove-delete_policy.yml b/changelogs/fragments/1161-ecs_ecr-remove-delete_policy.yml new file mode 100644 index 00000000000..e3d267d46c3 --- /dev/null +++ b/changelogs/fragments/1161-ecs_ecr-remove-delete_policy.yml @@ -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). diff --git a/plugins/modules/ecs_ecr.py b/plugins/modules/ecs_ecr.py index 2b22147212b..487bf452f7f 100644 --- a/plugins/modules/ecs_ecr.py +++ b/plugins/modules/ecs_ecr.py @@ -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. @@ -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)) diff --git a/tests/integration/targets/ecs_ecr/tasks/main.yml b/tests/integration/targets/ecs_ecr/tasks/main.yml index f92ba965b7c..fe401dcdc66 100644 --- a/tests/integration/targets/ecs_ecr/tasks/main.yml +++ b/tests/integration/targets/ecs_ecr/tasks/main.yml @@ -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