mirror of
https://github.com/ansible-collections/community.crypto.git
synced 2026-05-06 13:22:58 +00:00
Ansible 2.9 tests (#14)
* Add CI group 2 for Ansible 2.9 tests. * Temporarily disable some nodes. * Fix ignore.txt. * Use version prefix instead of groups. * Ansible 2.9 doesn't support Python 3.9 ci_complete * Make Ansible 2.9 compatible. * Replace archive/unarchive with copy. * Remove dependency on community.general in integration tests for Ansible 2.9. * Let's see. * Ansible 2.9's copy doesn't create directories. * Re-enable no dependency. ci_complete * path should be bytes. * Reenable nodes, add two more. * Force complete CI run for Ansible 2.9. * Used wrong variable. * Fix Ansible 2.9 compatibility...
This commit is contained in:
@@ -418,7 +418,14 @@ def write_file(module, content, default_mode=None, path=None):
|
||||
Uses file arguments from module.
|
||||
'''
|
||||
# Find out parameters for file
|
||||
file_args = module.load_file_common_arguments(module.params, path=path)
|
||||
try:
|
||||
file_args = module.load_file_common_arguments(module.params, path=path)
|
||||
except TypeError:
|
||||
# The path argument is only supported in Ansible 2.10+. Fall back to
|
||||
# pre-2.10 behavior of module_utils/crypto.py for older Ansible versions.
|
||||
file_args = module.load_file_common_arguments(module.params)
|
||||
if path is not None:
|
||||
file_args['path'] = path
|
||||
if file_args['mode'] is None:
|
||||
file_args['mode'] = default_mode
|
||||
# Create tempfile name
|
||||
|
||||
Reference in New Issue
Block a user