summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorToshio Kuratomi <toshio@fedoraproject.org>2015-10-27 22:11:04 -0700
committerToshio Kuratomi <toshio@fedoraproject.org>2015-10-27 22:11:04 -0700
commit62be954577d63d3e7e9e7084a991551a65499e27 (patch)
treeb84d61812a462b8b7d42d982d7ac2e9e29be1aa4
parent8b5588f98ac18b1af2070b349be77ebd0e6944d8 (diff)
downloadansible-62be954577d63d3e7e9e7084a991551a65499e27.tar.gz
Second part of the script not honoring complex-args fix
I could have sworn I already committed this but it's not there so recreating it.
-rw-r--r--lib/ansible/runner/action_plugins/script.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/ansible/runner/action_plugins/script.py b/lib/ansible/runner/action_plugins/script.py
index 159487f2c4..8f4e3a1e0c 100644
--- a/lib/ansible/runner/action_plugins/script.py
+++ b/lib/ansible/runner/action_plugins/script.py
@@ -62,9 +62,10 @@ class ActionModule(object):
# do not run the command if the line contains creates=filename
# and the filename already exists. This allows idempotence
# of command executions.
- module_args_tmp = "path=%s" % creates
+ module_args_tmp = ""
+ complex_args_tmp = dict(path=creates)
module_return = self.runner._execute_module(conn, tmp, 'stat', module_args_tmp, inject=inject,
- complex_args=complex_args, persist_files=True)
+ complex_args=complex_args_tmp, persist_files=True)
stat = module_return.result.get('stat', None)
if stat and stat.get('exists', False):
return ReturnData(
@@ -79,9 +80,10 @@ class ActionModule(object):
# do not run the command if the line contains removes=filename
# and the filename does not exist. This allows idempotence
# of command executions.
- module_args_tmp = "path=%s" % removes
+ module_args_tmp = ""
+ complex_args_tmp = dict(path=creates)
module_return = self.runner._execute_module(conn, tmp, 'stat', module_args_tmp, inject=inject,
- complex_args=complex_args, persist_files=True)
+ complex_args=complex_args_tmp, persist_files=True)
stat = module_return.result.get('stat', None)
if stat and not stat.get('exists', False):
return ReturnData(