mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-26 20:31:27 -07:00
Improve Ansible 2.9 compatibility (#306)
* Adjust ignore-2.9.txt. * Workaround for load_file_common_arguments's path option (similar to ansible-collections/community.crypto#14). * Add changelog.
This commit is contained in:
parent
5cdb646ab7
commit
85cbc27427
5 changed files with 1402 additions and 3400 deletions
|
@ -555,7 +555,13 @@ def main():
|
|||
msg='Unable to remove source file: %s' % to_native(e), exception=format_exc()
|
||||
)
|
||||
|
||||
file_args = module.load_file_common_arguments(params, path=b_dest)
|
||||
try:
|
||||
file_args = module.load_file_common_arguments(params, path=b_dest)
|
||||
except TypeError:
|
||||
# The path argument is only supported in Ansible 2.10+. Fall back to
|
||||
# pre-2.10 behavior for older Ansible versions.
|
||||
params['path'] = b_dest
|
||||
file_args = module.load_file_common_arguments(params)
|
||||
|
||||
if not check_mode:
|
||||
changed = module.set_fs_attributes_if_different(file_args, changed)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue