1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Proper check for raw as module options versus raw being in the string.

This commit is contained in:
Michael DeHaan 2013-10-06 09:54:28 -04:00
parent d01d9b3a6d
commit 4987c73bb6

View file

@ -151,7 +151,7 @@ class ActionModule(object):
return ReturnData(conn=conn, result=dict(dest=dest, changed=True))
# run the copy module
if 'raw' in module_args:
if raw:
# don't send down raw=no
module_args.pop('raw')
module_args = "%s src=%s original_basename=%s" % (module_args, pipes.quote(tmp_src), pipes.quote(os.path.basename(source)))
@ -168,7 +168,7 @@ class ActionModule(object):
return ReturnData(conn=conn, result=dict(dest=dest, changed=False))
tmp_src = tmp + os.path.basename(source)
if 'raw' in module_args:
if raw:
# don't send down raw=no
module_args.pop('raw')
module_args = "%s src=%s" % (module_args, pipes.quote(tmp_src))