mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Default to using a ControlMaster connection
This commit is contained in:
parent
aa18e66987
commit
7f6359b143
1 changed files with 4 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue