mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-06-28 03:00:23 -07:00
copy: Handle "no copy/propagate attrs only" for recursive mode well.
For this, add internal "original_basename" param to file module, similar to copy module. (Param name is a bit misnormer now, should be treated as "original basepath").
This commit is contained in:
parent
ce88df3cf4
commit
2e668f14f7
2 changed files with 8 additions and 2 deletions
|
@ -217,7 +217,8 @@ class ActionModule(object):
|
|||
if raw:
|
||||
# don't send down raw=no
|
||||
module_args.pop('raw')
|
||||
module_args_tmp = "%s src=%s" % (module_args, pipes.quote(tmp_src))
|
||||
module_args_tmp = "%s src=%s original_basename=%s" % (module_args,
|
||||
pipes.quote(tmp_src), pipes.quote(source_rel))
|
||||
if self.runner.noop_on_check(inject):
|
||||
module_args_tmp = "%s CHECKMODE=True" % module_args_tmp
|
||||
module_return = self.runner._execute_module(conn, tmp, 'file', module_args_tmp, inject=inject, complex_args=complex_args)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue