Emit a warning when src is used with a state where it should be ignored

This commit is contained in:
Toshio Kuratomi 2018-05-14 10:12:40 -07:00
parent 90770a290f
commit c8ac02d6f2

View file

@ -337,13 +337,17 @@ class ActionModule(ActionBase):
new_module_args = _create_remote_file_args(self._task.args)
new_module_args.update(
dict(
src=source_rel,
dest=dest,
original_basename=source_rel,
recurse=False,
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:
new_module_args['mode'] = lmode