1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Quote ControlPath ssh parameter

Fixes #9316
This commit is contained in:
Toshio Kuratomi 2014-10-22 18:45:02 -04:00
parent 34129a223d
commit c86851be2c

View file

@ -65,7 +65,7 @@ class Connection(object):
else: else:
self.common_args += ["-o", "ControlMaster=auto", self.common_args += ["-o", "ControlMaster=auto",
"-o", "ControlPersist=60s", "-o", "ControlPersist=60s",
"-o", "ControlPath=%s" % (C.ANSIBLE_SSH_CONTROL_PATH % dict(directory=self.cp_dir))] "-o", "ControlPath=\"%s\"" % (C.ANSIBLE_SSH_CONTROL_PATH % dict(directory=self.cp_dir))]
cp_in_use = False cp_in_use = False
cp_path_set = False cp_path_set = False
@ -76,7 +76,7 @@ class Connection(object):
cp_path_set = True cp_path_set = True
if cp_in_use and not cp_path_set: if cp_in_use and not cp_path_set:
self.common_args += ["-o", "ControlPath=%s" % (C.ANSIBLE_SSH_CONTROL_PATH % dict(directory=self.cp_dir))] self.common_args += ["-o", "ControlPath=\"%s\"" % (C.ANSIBLE_SSH_CONTROL_PATH % dict(directory=self.cp_dir))]
if not C.HOST_KEY_CHECKING: if not C.HOST_KEY_CHECKING:
self.common_args += ["-o", "StrictHostKeyChecking=no"] self.common_args += ["-o", "StrictHostKeyChecking=no"]