Fix check mode issues with copy module

Fixes #8639
pull/8671/head
James Cammarata 10 years ago
parent 542f07128e
commit 379e31883c

@ -243,7 +243,8 @@ class ActionModule(object):
dest=dest,
original_basename=source_rel
)
if self.runner.noop_on_check(inject):
new_module_args['CHECKMODE'] = True
if self.runner.no_log:
new_module_args['NO_LOG'] = True

@ -484,6 +484,8 @@ def merge_module_args(current_args, new_args):
for (k,v) in final_args.iteritems():
if isinstance(v, basestring):
module_args = "%s=%s %s" % (k, pipes.quote(v), module_args)
elif isinstance(v, bool):
module_args = "%s=%s %s" % (k, str(v), module_args)
return module_args.strip()
def parse_yaml(data, path_hint=None):

@ -145,6 +145,7 @@ def main():
directory_mode = dict(required=False)
),
add_file_common_args=True,
supports_check_mode=True,
)
src = os.path.expanduser(module.params['src'])

Loading…
Cancel
Save