From a65fd0633847fb86b5e9682f847ffbd7346cc04b Mon Sep 17 00:00:00 2001 From: Eri Bastos Date: Tue, 10 Jun 2014 16:39:47 -0300 Subject: [PATCH] Added quotes around key path - Issue 7713 --- 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 8a12356cd58..0373f4b3e3b 100644 --- a/lib/ansible/runner/connection_plugins/ssh.py +++ b/lib/ansible/runner/connection_plugins/ssh.py @@ -84,9 +84,9 @@ class Connection(object): if self.port is not None: self.common_args += ["-o", "Port=%d" % (self.port)] if self.private_key_file is not None: - self.common_args += ["-o", "IdentityFile="+os.path.expanduser(self.private_key_file)] + self.common_args += ["-o", "IdentityFile=\"%s\"" % os.path.expanduser(self.private_key_file)] elif self.runner.private_key_file is not None: - self.common_args += ["-o", "IdentityFile="+os.path.expanduser(self.runner.private_key_file)] + self.common_args += ["-o", "IdentityFile=\"%s\"" % os.path.expanduser(self.runner.private_key_file)] if self.password: self.common_args += ["-o", "GSSAPIAuthentication=no", "-o", "PubkeyAuthentication=no"]