Emit a warning when src is used with a state where it should be ignored
This commit is contained in:
parent
90770a290f
commit
c8ac02d6f2
1 changed files with 5 additions and 1 deletions
|
@ -337,13 +337,17 @@ class ActionModule(ActionBase):
|
||||||
new_module_args = _create_remote_file_args(self._task.args)
|
new_module_args = _create_remote_file_args(self._task.args)
|
||||||
new_module_args.update(
|
new_module_args.update(
|
||||||
dict(
|
dict(
|
||||||
src=source_rel,
|
|
||||||
dest=dest,
|
dest=dest,
|
||||||
original_basename=source_rel,
|
original_basename=source_rel,
|
||||||
recurse=False,
|
recurse=False,
|
||||||
state='file',
|
state='file',
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
# src is sent to the file module in _original_basename, not in src
|
||||||
|
try:
|
||||||
|
del new_module_args['src']
|
||||||
|
except KeyError:
|
||||||
|
pass
|
||||||
|
|
||||||
if lmode:
|
if lmode:
|
||||||
new_module_args['mode'] = lmode
|
new_module_args['mode'] = lmode
|
||||||
|
|
Loading…
Reference in a new issue