From 419661542bba3aa11c8f99e4808d0ca1c6b5d4c2 Mon Sep 17 00:00:00 2001 From: Michael DeHaan Date: Sat, 20 Jul 2013 18:28:11 -0400 Subject: [PATCH] Added some pipes.quote ops to make sure paths with spaces in them are ok. --- lib/ansible/runner/connection_plugins/ssh.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ansible/runner/connection_plugins/ssh.py b/lib/ansible/runner/connection_plugins/ssh.py index 46ac4393ba6..127661285b4 100644 --- a/lib/ansible/runner/connection_plugins/ssh.py +++ b/lib/ansible/runner/connection_plugins/ssh.py @@ -215,11 +215,11 @@ class Connection(object): if C.DEFAULT_SCP_IF_SSH: cmd += ["scp"] + self.common_args - cmd += [in_path,self.host + ":" + out_path] + cmd += [in_path,self.host + ":" + pipes.quote(out_path)] indata = None else: cmd += ["sftp"] + self.common_args + [self.host] - indata = "put %s %s\n" % (in_path, out_path) + indata = "put %s %s\n" % (pipes.quote(in_path), pipes.quote(out_path)) p = subprocess.Popen(cmd, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE)