pipelining gets disabled when ssh_args is specified

496 views
Skip to first unread message

Michael Spiegle

unread,
Feb 9, 2015, 5:32:08 PM2/9/15
to ansible...@googlegroups.com
My ansible.cfg contains the following right now:

[ssh_connection]
ssh_args
= -F ssh.config
pipelining
= True


If I run Ansible, my "base" role takes 02:06 (mm:ss) to run on a single host and makes many SSH connections.  If I simply comment out ssh_args, pipelining works and Ansible runs in 00:36.  I know it isn't the contents of my ssh.config because even if I use a blank file as ssh.config, the problem still happens.  It's not a deal breaker to comment out ssh_args every time I need pipelining, but it's rather annoying.

Is this expected behavior?

Ansible host: OSX 10.9.5
Ansible version: 1.8.2

Matt Martz

unread,
Feb 9, 2015, 6:58:06 PM2/9/15
to ansible...@googlegroups.com
When specifying ssh_args what you loose is the ControlPath configuration, not pipelining. Pipelining is where it reduces round trips and ControlPath re-uses a single socket connection to the server instead of new connections for every communication.

If you want to use ssh_args and maintain ControlPath, you will need to add the necessary ControlPath and related settings to ssh_args. To get these args try running with -vvvv while you do not have ssh_args defined.

This behavior happens so that you can fully override the ssh_args.
--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/8be38481-690e-4765-8c6d-9d72df469873%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
Matt Martz
@sivel
sivel.net

Michael Spiegle

unread,
Feb 9, 2015, 8:36:47 PM2/9/15
to ansible...@googlegroups.com
Thank you.  I added the following and now everything is working great!

ansible.cfg:

[ssh_connection]
ssh_args
= -F ssh.config
pipelining
= True


ssh.config:
Host *
 
ControlMaster auto
 
ControlPersist 60s
 
ControlPath ~/.ssh/ansible-%r@%h:%p



On Monday, February 9, 2015 at 6:58:06 PM UTC-5, Matt Martz wrote:
When specifying ssh_args what you loose is the ControlPath configuration, not pipelining. Pipelining is where it reduces round trips and ControlPath re-uses a single socket connection to the server instead of new connections for every communication.

If you want to use ssh_args and maintain ControlPath, you will need to add the necessary ControlPath and related settings to ssh_args. To get these args try running with -vvvv while you do not have ssh_args defined.

This behavior happens so that you can fully override the ssh_args.

On Monday, February 9, 2015, Michael Spiegle <mspi...@nauticaltech.com> wrote:
My ansible.cfg contains the following right now:

[ssh_connection]
ssh_args
= -F ssh.config
pipelining
= True


If I run Ansible, my "base" role takes 02:06 (mm:ss) to run on a single host and makes many SSH connections.  If I simply comment out ssh_args, pipelining works and Ansible runs in 00:36.  I know it isn't the contents of my ssh.config because even if I use a blank file as ssh.config, the problem still happens.  It's not a deal breaker to comment out ssh_args every time I need pipelining, but it's rather annoying.

Is this expected behavior?

Ansible host: OSX 10.9.5
Ansible version: 1.8.2

--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+unsubscribe@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages