mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 22:02:50 +00:00
Various performance streamlining and making the file features usable in all modules without daisy chaining.
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user