Default to using a ControlMaster connection

This commit is contained in:
Daniel Hokka Zakrisson 2012-06-19 21:58:24 +02:00
parent c8f416a2c2
commit c84e11e9d5

View file

@ -48,6 +48,10 @@ class SSHConnection(object):
extra_args = os.getenv("ANSIBLE_SSH_ARGS", None)
if extra_args is not None:
self.common_args += shlex.split(extra_args)
else:
self.common_args += ["-o", "ControlMaster=auto",
"-o", "ControlPersist=60s",
"-o", "ControlPath=/tmp/ansible-ssh-%h-%p-%r"]
self.userhost = "%s@%s" % (self.runner.remote_user, self.host)
return self