1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Merge pull request #1928 from akerl/assemblefix

adjusted assemble to use new file attribute handling
This commit is contained in:
Daniel Hokka Zakrisson 2013-01-28 00:53:38 -08:00
commit 9f4eaed88f

View file

@ -91,12 +91,12 @@ def main():
module = AnsibleModule(
# not checking because of daisy chain to file module
check_invalid_arguments = False,
argument_spec = dict(
src = dict(required=True),
dest = dict(required=True),
backup=dict(default=False, choices=BOOLEANS),
)
),
add_file_common_args=True
)
changed=False
@ -124,11 +124,11 @@ def main():
shutil.copy(path, dest)
changed = True
file_args = module.load_file_common_arguments(module.params)
changed = module.set_file_attributes_if_different(file_args, changed)
# Mission complete
module.exit_json(src=src, dest=dest, md5sum=destmd5,
changed=changed, msg="OK",
daisychain="file", daisychain_args=module.params)
changed=changed, msg="OK")
# this is magic, see lib/ansible/module_common.py
#<<INCLUDE_ANSIBLE_MODULE_COMMON>>