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:
Brian Harring 2013-09-18 15:03:40 -04:00
commit 5b1b831cc7
2 changed files with 4 additions and 3 deletions

View file

@ -47,7 +47,7 @@ def _get_config(p, section, key, env_var, default, boolean=True):
return value
if p is not None:
try:
return p.get(section, key)
return p.get(section, key, raw=True)
except:
return default
return default
@ -130,6 +130,7 @@ DEFAULT_LOG_PATH = shell_expand_path(get_config(p, DEFAULTS, 'log_
ANSIBLE_NOCOLOR = get_config(p, DEFAULTS, 'nocolor', 'ANSIBLE_NOCOLOR', None, boolean=True)
ANSIBLE_NOCOWS = get_config(p, DEFAULTS, 'nocows', 'ANSIBLE_NOCOWS', None, boolean=True)
ANSIBLE_SSH_ARGS = get_config(p, 'ssh_connection', 'ssh_args', 'ANSIBLE_SSH_ARGS', None)
ANSIBLE_SSH_CONTROL_PATH = get_config(p, 'ssh_connection', 'control_path', 'ANSIBLE_SSH_CONTROL_PATH', "%(directory)s/ansible-ssh-%%h-%%p-%%r")
PARAMIKO_RECORD_HOST_KEYS = get_config(p, 'paramiko_connection', 'record_host_keys', 'ANSIBLE_PARAMIKO_RECORD_HOST_KEYS', True, boolean=True)
ZEROMQ_PORT = int(get_config(p, 'fireball_connection', 'zeromq_port', 'ANSIBLE_ZEROMQ_PORT', 5099))
ACCELERATE_PORT = int(get_config(p, 'accelerate', 'accelerate_port', 'ACCELERATE_PORT', 5099))