pipelining gets disabled when ssh_args is specified

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

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.

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