From 239dbcb24f01f130ee0a2a56e02151094138151e Mon Sep 17 00:00:00 2001 From: Martin Krizek Date: Thu, 30 Sep 2021 21:48:48 +0200 Subject: [PATCH] copy: remove deprecated thirsty alias (#75839) Fixes #75824 --- .../75824-copy-remove-deprecated-thirsty-alias.yml | 2 ++ lib/ansible/modules/copy.py | 8 +------- 2 files changed, 3 insertions(+), 7 deletions(-) create mode 100644 changelogs/fragments/75824-copy-remove-deprecated-thirsty-alias.yml diff --git a/changelogs/fragments/75824-copy-remove-deprecated-thirsty-alias.yml b/changelogs/fragments/75824-copy-remove-deprecated-thirsty-alias.yml new file mode 100644 index 00000000000..7a8121c91c2 --- /dev/null +++ b/changelogs/fragments/75824-copy-remove-deprecated-thirsty-alias.yml @@ -0,0 +1,2 @@ +bugfixes: + - copy - remove deprecated ``thirsty`` alias (https://github.com/ansible/ansible/issues/75824) diff --git a/lib/ansible/modules/copy.py b/lib/ansible/modules/copy.py index 9fc15b2e0fc..2febd91a628 100644 --- a/lib/ansible/modules/copy.py +++ b/lib/ansible/modules/copy.py @@ -58,10 +58,8 @@ options: - Influence whether the remote file must always be replaced. - If C(yes), the remote file will be replaced when contents are different than the source. - If C(no), the file will only be transferred if the destination does not exist. - - Alias C(thirsty) has been deprecated and will be removed in 2.13. type: bool default: yes - aliases: [ thirsty ] version_added: '1.1' mode: description: @@ -537,7 +535,7 @@ def main(): content=dict(type='str', no_log=True), dest=dict(type='path', required=True), backup=dict(type='bool', default=False), - force=dict(type='bool', default=True, aliases=['thirsty']), + force=dict(type='bool', default=True), validate=dict(type='str'), directory_mode=dict(type='raw'), remote_src=dict(type='bool'), @@ -549,10 +547,6 @@ def main(): supports_check_mode=True, ) - if module.params.get('thirsty'): - module.deprecate('The alias "thirsty" has been deprecated and will be removed, use "force" instead', - version='2.13', collection_name='ansible.builtin') - src = module.params['src'] b_src = to_bytes(src, errors='surrogate_or_strict') dest = module.params['dest']