From b2b04ad8cbe43674bc859a1d6cc6ef11f061dbe3 Mon Sep 17 00:00:00 2001 From: Benno Joy Date: Wed, 23 Jul 2014 14:50:16 +0000 Subject: [PATCH] fix for unarchive 8257 --- lib/ansible/runner/action_plugins/unarchive.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/ansible/runner/action_plugins/unarchive.py b/lib/ansible/runner/action_plugins/unarchive.py index c943cab514b..1596425779d 100644 --- a/lib/ansible/runner/action_plugins/unarchive.py +++ b/lib/ansible/runner/action_plugins/unarchive.py @@ -78,7 +78,12 @@ class ActionModule(object): if copy: if self.runner.sudo and self.runner.sudo_user != 'root': self.runner._low_level_exec_command(conn, "chmod a+r %s" % tmp_src, tmp) - module_args = "%s src=%s original_basename=%s" % (module_args, pipes.quote(tmp_src), pipes.quote(os.path.basename(source))) + # Build temporary module_args. + new_module_args = dict( + src=tmp_src, + original_basename=os.path.basename(source), + ) + module_args = utils.merge_module_args(module_args, new_module_args) else: module_args = "%s original_basename=%s" % (module_args, pipes.quote(os.path.basename(source))) return self.runner._execute_module(conn, tmp, 'unarchive', module_args, inject=inject, complex_args=complex_args)