diff options
author | Brian Coca <bcoca@ansible.com> | 2016-06-10 13:17:49 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-06-10 13:17:49 -0400 |
commit | de185668829a95fb531d81761d1e36d4427b216b (patch) | |
tree | bfcfd8c6795c5cc1ba30983c817d39abfb8275dc | |
parent | ece1ed09d51ea43be888b64eea95680a5c300a5b (diff) | |
download | ansible-de185668829a95fb531d81761d1e36d4427b216b.tar.gz |
made ssh compression configurable (#16214)
AIX ssh does not seem to like compression, moved it to ssh_args
to allow making it configurable. Note that those using ssh_args
already will need to add it explicitly to keep compression.
-rw-r--r-- | examples/ansible.cfg | 4 | ||||
-rw-r--r-- | lib/ansible/constants.py | 2 | ||||
-rw-r--r-- | lib/ansible/plugins/connection/ssh.py | 2 |
3 files changed, 3 insertions, 5 deletions
diff --git a/examples/ansible.cfg b/examples/ansible.cfg index 22e558269f..78f2a7d602 100644 --- a/examples/ansible.cfg +++ b/examples/ansible.cfg @@ -273,8 +273,8 @@ # ssh arguments to use # Leaving off ControlPersist will result in poor performance, so use -# paramiko on older platforms rather than removing it -#ssh_args = -o ControlMaster=auto -o ControlPersist=60s +# paramiko on older platforms rather than removing it, -C controls compression use +#ssh_args = -C -o ControlMaster=auto -o ControlPersist=60s # The path to use for the ControlPath sockets. This defaults to # "%(directory)s/ansible-ssh-%%h-%%p-%%r", however on some systems with diff --git a/lib/ansible/constants.py b/lib/ansible/constants.py index 217d5c18d4..ee41d0c235 100644 --- a/lib/ansible/constants.py +++ b/lib/ansible/constants.py @@ -269,7 +269,7 @@ DISPLAY_ARGS_TO_STDOUT = get_config(p, DEFAULTS, 'display_args_to_stdout MAX_FILE_SIZE_FOR_DIFF = get_config(p, DEFAULTS, 'max_diff_size', 'ANSIBLE_MAX_DIFF_SIZE', 1024*1024, integer=True) # CONNECTION RELATED -ANSIBLE_SSH_ARGS = get_config(p, 'ssh_connection', 'ssh_args', 'ANSIBLE_SSH_ARGS', '-o ControlMaster=auto -o ControlPersist=60s') +ANSIBLE_SSH_ARGS = get_config(p, 'ssh_connection', 'ssh_args', 'ANSIBLE_SSH_ARGS', '-C -o ControlMaster=auto -o ControlPersist=60s') ANSIBLE_SSH_CONTROL_PATH = get_config(p, 'ssh_connection', 'control_path', 'ANSIBLE_SSH_CONTROL_PATH', "%(directory)s/ansible-ssh-%%h-%%p-%%r") ANSIBLE_SSH_PIPELINING = get_config(p, 'ssh_connection', 'pipelining', 'ANSIBLE_SSH_PIPELINING', False, boolean=True) ANSIBLE_SSH_RETRIES = get_config(p, 'ssh_connection', 'retries', 'ANSIBLE_SSH_RETRIES', 0, integer=True) diff --git a/lib/ansible/plugins/connection/ssh.py b/lib/ansible/plugins/connection/ssh.py index 06dca813e3..16f086b303 100644 --- a/lib/ansible/plugins/connection/ssh.py +++ b/lib/ansible/plugins/connection/ssh.py @@ -141,8 +141,6 @@ class Connection(ConnectionBase): self._add_args('disable batch mode for sshpass', ['-o', 'BatchMode=no']) self._command += ['-b', '-'] - self._command += ['-C'] - if self._play_context.verbosity > 3: self._command += ['-vvv'] elif binary == 'ssh': |