From 0bf1a273932e88e05f7b8cbaa89fcd591916291c Mon Sep 17 00:00:00 2001 From: Jeffrey 'jf' Lim Date: Tue, 29 Apr 2014 21:52:09 +0800 Subject: [PATCH] Fix "no_log=True" option for copy module (fixes #7193) --- lib/ansible/runner/action_plugins/copy.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/ansible/runner/action_plugins/copy.py b/lib/ansible/runner/action_plugins/copy.py index f8063862cc..df5266c4c0 100644 --- a/lib/ansible/runner/action_plugins/copy.py +++ b/lib/ansible/runner/action_plugins/copy.py @@ -240,6 +240,10 @@ class ActionModule(object): # we pass dest only to make sure it includes trailing slash in case of recursive copy module_args_tmp = "%s src=%s dest=%s original_basename=%s" % (module_args, pipes.quote(tmp_src), pipes.quote(dest), pipes.quote(source_rel)) + + if self.runner.no_log: + module_args_tmp = "%s NO_LOG=True" % module_args_tmp + module_return = self.runner._execute_module(conn, tmp_path, 'copy', module_args_tmp, inject=inject, complex_args=complex_args, delete_remote_tmp=delete_remote_tmp) module_executed = True