From 101377768bf12840fbb50a4fce4970cc851c8a37 Mon Sep 17 00:00:00 2001 From: Brian Coca Date: Mon, 2 Oct 2017 09:17:08 -0400 Subject: [PATCH] remove unused ssh pipelining setters fixes #31125 --- lib/ansible/config/base.yml | 13 ------------- lib/ansible/plugins/connection/ssh.py | 13 ++++++++++--- test/legacy/Makefile | 2 +- 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/lib/ansible/config/base.yml b/lib/ansible/config/base.yml index 80eebdfe4d8..59b5d9cbdbf 100644 --- a/lib/ansible/config/base.yml +++ b/lib/ansible/config/base.yml @@ -115,19 +115,6 @@ ANSIBLE_SSH_EXECUTABLE: - {key: ssh_executable, section: ssh_connection} yaml: {key: ssh_connection.ssh_executable} version_added: "2.2" -ANSIBLE_SSH_PIPELINING: - # TODO: move to ssh plugin - default: False - description: - - Pipelining reduces the number of SSH operations required to execute a module on the remote server, - by executing many Ansible modules without actual file transfer. - - This can result in a very significant performance improvement when enabled. - - "However this conflicts with privilege escalation (become). For example, when using 'sudo:' operations you must first disable 'requiretty' in /etc/sudoers on all managed hosts, which is why it is disabled by default." - env: [{name: ANSIBLE_SSH_PIPELINING}] - ini: - - {key: pipelining, section: ssh_connection} - type: boolean - yaml: {key: ssh_connection.pipelining} ANSIBLE_SSH_RETRIES: # TODO: move to ssh plugin default: 0 diff --git a/lib/ansible/plugins/connection/ssh.py b/lib/ansible/plugins/connection/ssh.py index 0bfaa74e5d1..115ce28e80a 100644 --- a/lib/ansible/plugins/connection/ssh.py +++ b/lib/ansible/plugins/connection/ssh.py @@ -116,11 +116,18 @@ DOCUMENTATION = ''' - However this conflicts with privilege escalation (become). For example, when using sudo operations you must first disable 'requiretty' in the sudoers file for the target hosts, which is why this feature is disabled by default. - env: [{name: ANSIBLE_SSH_PIPELINING}] + env: + - name: ANSIBLE_PIPELINING + #- name: ANSIBLE_SSH_PIPELINING ini: - - {key: pipelining, section: ssh_connection} + - section: defaults + key: pipelining + #- section: ssh_connection + # key: pipelining type: boolean - vars: [{name: ansible_ssh_pipelining}] + vars: + - name: ansible_pipelining + - name: ansible_ssh_pipelining private_key_file: description: - Path to private key file to use for authentication diff --git a/test/legacy/Makefile b/test/legacy/Makefile index adf0b3e9d0c..7d546dd2ab3 100644 --- a/test/legacy/Makefile +++ b/test/legacy/Makefile @@ -58,7 +58,7 @@ $(CREDENTIALS_FILE): @exit 1 amazon: $(CREDENTIALS_FILE) - ANSIBLE_HOST_KEY_CHECKING=False ANSIBLE_SSH_PIPELINING=no BOTO_CONFIG=/dev/null ansible-playbook amazon.yml -i $(INVENTORY) -e @$(VARS_FILE) $(CREDENTIALS_ARG) -e "resource_prefix=$(CLOUD_RESOURCE_PREFIX)" -v $(TEST_FLAGS) ; \ + ANSIBLE_HOST_KEY_CHECKING=False ANSIBLE_PIPELINING=no BOTO_CONFIG=/dev/null ansible-playbook amazon.yml -i $(INVENTORY) -e @$(VARS_FILE) $(CREDENTIALS_ARG) -e "resource_prefix=$(CLOUD_RESOURCE_PREFIX)" -v $(TEST_FLAGS) ; \ RC=$$? ; \ CLOUD_RESOURCE_PREFIX="$(CLOUD_RESOURCE_PREFIX)" make amazon_cleanup ; \ exit $$RC;