mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-24 19:31:26 -07:00
Various performance streamlining and making the file features usable in all modules without daisy chaining.
This commit is contained in:
parent
60b9316ad8
commit
cbc12f0dba
12 changed files with 361 additions and 312 deletions
|
@ -84,14 +84,13 @@ class ActionModule(object):
|
|||
|
||||
# run the copy module
|
||||
module_args = "%s src=%s" % (module_args, tmp_src)
|
||||
return self.runner._execute_module(conn, tmp, 'copy', module_args, inject=inject).daisychain('file', module_args)
|
||||
return self.runner._execute_module(conn, tmp, 'copy', module_args, inject=inject)
|
||||
|
||||
else:
|
||||
# no need to transfer the file, already correct md5, but still need to set src so the file module
|
||||
# does not freak out. It's just the basename of the file.
|
||||
# no need to transfer the file, already correct md5, but still need to call
|
||||
# the file module in case we want to change attributes
|
||||
|
||||
tmp_src = tmp + os.path.basename(source)
|
||||
module_args = "%s src=%s" % (module_args, tmp_src)
|
||||
result = dict(changed=False, md5sum=remote_md5, transferred=False)
|
||||
return ReturnData(conn=conn, result=result).daisychain('file', module_args)
|
||||
return self.runner._execute_module(conn, tmp, 'file', module_args, inject=inject)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue