From f873cc0fb54f309aa9ece4e4127bdf1071d1bfd7 Mon Sep 17 00:00:00 2001 From: Toshio Kuratomi Date: Tue, 1 Dec 2015 10:24:15 -0800 Subject: [PATCH] Update docs and example config for requiretty + pipelining change --- docsite/rst/intro_configuration.rst | 21 ++++++++++++++------- examples/ansible.cfg | 12 ++++++------ 2 files changed, 20 insertions(+), 13 deletions(-) diff --git a/docsite/rst/intro_configuration.rst b/docsite/rst/intro_configuration.rst index dda07fc450..ca3fd00654 100644 --- a/docsite/rst/intro_configuration.rst +++ b/docsite/rst/intro_configuration.rst @@ -799,15 +799,22 @@ pipelining ========== Enabling 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 when using "sudo:" operations you must -first disable 'requiretty' in /etc/sudoers on all managed hosts. +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. +As of Ansible 2.1.0 this option is enabled by default. -By default, this option is disabled to preserve compatibility with -sudoers configurations that have requiretty (the default on many distros), but is highly -recommended if you can enable it, eliminating the need for :doc:`playbooks_acceleration`:: +In previous versions, this option was disabled because of a bad interaction +with some sudo configurations. If sudo was configured to 'requiretty' for +operation then pipelining would not work and ansible would fail to connect +properly. This could be remedied by removing 'requiretty' in /etc/sudoers on +all managed hosts. - pipelining=False +It is recommended to leave this option enabled. If you are stuck with an old +version of ansible your first choice option should be to remove requiretty +from the sudoers configuration and only disable pipelining if you cannot do +that. Enabling this eliminates the need for :doc:`playbooks_acceleration`:: + + pipelining=True .. _accelerate_settings: diff --git a/examples/ansible.cfg b/examples/ansible.cfg index 74aef7a024..d77dfba0c0 100644 --- a/examples/ansible.cfg +++ b/examples/ansible.cfg @@ -226,13 +226,13 @@ # Enabling pipelining reduces the number of SSH operations required to # execute a module on the remote server. This can result in a significant -# performance improvement when enabled, however when using "sudo:" you must -# first disable 'requiretty' in /etc/sudoers +# performance improvement when enabled. It is enabled by default. # -# By default, this option is disabled to preserve compatibility with -# sudoers configurations that have requiretty (the default on many distros). -# -#pipelining = False +# In previous versions of ansible this was defaulted to off as it was +# incompatible with sudo's requiretty option. Ansible 2.1 and above contain +# a fix for that problem. +# +#pipelining = True # if True, make ansible use scp if the connection type is ssh # (default is sftp)