mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-26 12:21:26 -07:00
Make ssh's ControlPath configurable via ansible.cfg
This shouldn't generally be needed unless you're working in an environment that uses rediculously long FQDNs; if the name is too long, you wind up hitting unix domain socket filepath limits enforced by ssh.
This commit is contained in:
parent
022918e5af
commit
5b1b831cc7
2 changed files with 4 additions and 3 deletions
|
@ -61,7 +61,7 @@ class Connection(object):
|
|||
else:
|
||||
self.common_args += ["-o", "ControlMaster=auto",
|
||||
"-o", "ControlPersist=60s",
|
||||
"-o", "ControlPath=%s/ansible-ssh-%%h-%%p-%%r" % self.cp_dir]
|
||||
"-o", "ControlPath=%s" % (C.ANSIBLE_SSH_CONTROL_PATH % dict(directory=self.cp_dir))]
|
||||
|
||||
cp_in_use = False
|
||||
cp_path_set = False
|
||||
|
@ -72,7 +72,7 @@ class Connection(object):
|
|||
cp_path_set = True
|
||||
|
||||
if cp_in_use and not cp_path_set:
|
||||
self.common_args += ["-o", "ControlPath=%s/ansible-ssh-%%h-%%p-%%r" % 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:
|
||||
self.common_args += ["-o", "StrictHostKeyChecking=no"]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue