Merge pull request #7079 from mscherer/fix_error_whitespace_in_config

Clean a bit more the ssh_args configuration
This commit is contained in:
James Cammarata 2014-04-21 10:43:31 -05:00
commit 086b877719

View file

@ -59,7 +59,8 @@ class Connection(object):
self.common_args = [] self.common_args = []
extra_args = C.ANSIBLE_SSH_ARGS extra_args = C.ANSIBLE_SSH_ARGS
if extra_args is not None: if extra_args is not None:
self.common_args += shlex.split(extra_args) # make sure there is no empty string added as this can produce weird errors
self.common_args += [x.strip() for x in shlex.split(extra_args) if x.strip()]
else: else:
self.common_args += ["-o", "ControlMaster=auto", self.common_args += ["-o", "ControlMaster=auto",
"-o", "ControlPersist=60s", "-o", "ControlPersist=60s",