Make pipelining a connection variable #12471

Merged
merged 2 commits into from Sep 28, 2015

Conversation

Projects
None yet
5 participants
@amenonsen
Contributor

amenonsen commented Sep 22, 2015

SSH pipelining can be a significant performance improvement, but it will
not work if sudoers is configured to requiretty. With this change, one
could have pipelining enabled in ansible.cfg, but use sudo to turn off
requiretty in a separate play where pipelining is disabled:

- hosts: foo
  pipelining: no
  tasks:
    - lineinfile: dest=/etc/sudoers line='Defaults requiretty' state=absent
      sudo_user: root

(Note that sudoers has a complicated syntax, so the above lineinfile
invocation may be too simplistic for production use; but the point is
that a separate play can do something to disable requiretty.)

@bcoca

This comment has been minimized.

Show comment
Hide comment
@bcoca

bcoca Sep 22, 2015

Member

I would not make this a play variable, just another ssh connection variable

Member

bcoca commented Sep 22, 2015

I would not make this a play variable, just another ssh connection variable

@amenonsen

This comment has been minimized.

Show comment
Hide comment
@amenonsen

amenonsen Sep 22, 2015

Contributor

@bcoca please explain?

Contributor

amenonsen commented Sep 22, 2015

@bcoca please explain?

@bcoca

This comment has been minimized.

Show comment
Hide comment
@bcoca

bcoca Sep 22, 2015

Member

This makes a lot more sense as 'ansible_ssh_pipelining' which as a connection var becomes a lot more flexible, can now be set by host, play, task or globally (which we already have).

Since 'accelerate' we've been trying to keep connection specific vars outside of play/task directives.

Member

bcoca commented Sep 22, 2015

This makes a lot more sense as 'ansible_ssh_pipelining' which as a connection var becomes a lot more flexible, can now be set by host, play, task or globally (which we already have).

Since 'accelerate' we've been trying to keep connection specific vars outside of play/task directives.

@amenonsen

This comment has been minimized.

Show comment
Hide comment
@amenonsen

amenonsen Sep 22, 2015

Contributor

@bcoca OK, done the way you suggested.

Contributor

amenonsen commented Sep 22, 2015

@bcoca OK, done the way you suggested.

@bcoca

This comment has been minimized.

Show comment
Hide comment
@bcoca

bcoca Sep 22, 2015

Member

+1

Member

bcoca commented Sep 22, 2015

+1

@amenonsen amenonsen changed the title from Make pipelining a play setting to Make pipelining a connection variable Sep 25, 2015

@abadger

This comment has been minimized.

Show comment
Hide comment
@abadger

abadger Sep 28, 2015

Member

Looks good to me, +1 as well.

Member

abadger commented Sep 28, 2015

Looks good to me, +1 as well.

amenonsen added some commits Sep 22, 2015

Make ansible_pipelining a connection variable
SSH pipelining can be a significant performance improvement, but it will
not work if sudoers is configured to requiretty. With this change, one
could have pipelining enabled in ansible.cfg, but use sudo to turn off
requiretty in a separate play (or task) where pipelining is disabled:

    - hosts: foo
      vars:
          ansible_pipelining: no
      tasks:
        - lineinfile: dest=/etc/sudoers line='Defaults requiretty' state=absent
          sudo_user: root

(Note that sudoers has a complicated syntax, so the above lineinfile
invocation may be too simplistic for production use; but the point is
that a separate play can do something to disable requiretty.)

abadger added a commit that referenced this pull request Sep 28, 2015

Merge pull request #12471 from amenonsen/pipelining
Make pipelining a connection variable

@abadger abadger merged commit 05af4c8 into ansible:devel Sep 28, 2015

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
@abadger

This comment has been minimized.

Show comment
Hide comment
@abadger

abadger Sep 28, 2015

Member

Thanks @amenonsen !

Merged

Hi!

This has been merged in, and will also be included in the next major release.

If you or anyone else has any further questions, please let us know by stopping by one of the two mailing lists, as appropriate:

Because this project is very active, we're unlikely to see comments made on closed tickets, but the mailing list is a great way to ask questions, or post if you don't think this particular
issue is resolved.

Thank you!

Member

abadger commented Sep 28, 2015

Thanks @amenonsen !

Merged

Hi!

This has been merged in, and will also be included in the next major release.

If you or anyone else has any further questions, please let us know by stopping by one of the two mailing lists, as appropriate:

Because this project is very active, we're unlikely to see comments made on closed tickets, but the mailing list is a great way to ask questions, or post if you don't think this particular
issue is resolved.

Thank you!

@ansibot ansibot added feature and removed feature_pull_request labels Mar 4, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment