# pipelining gets disabled when ssh\_args is specified

**URL:** <https://forum.ansible.com/t/pipelining-gets-disabled-when-ssh-args-is-specified/17481>\
**Category:** Ansible Project\
**Created:** [February 9, 2015, 10:32pm UTC](https://forum.ansible.com/t/pipelining-gets-disabled-when-ssh-args-is-specified/17481 "2015-02-09T22:32:08Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Michael\_Spiegle](https://avatars.discourse-cdn.com/v4/letter/m/8797f3/32.png) [@Michael\_Spiegle](https://forum.ansible.com/u/Michael_Spiegle)\
**Post date:** [February 9, 2015, 10:32pm UTC](https://forum.ansible.com/t/pipelining-gets-disabled-when-ssh-args-is-specified/17481/1 "2015-02-09T22:32:08Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![sivel](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/sivel/32/1198_2.png) [@sivel](https://forum.ansible.com/u/sivel)\
**Post date:** [February 9, 2015, 11:58pm UTC](https://forum.ansible.com/t/pipelining-gets-disabled-when-ssh-args-is-specified/17481/2 "2015-02-09T23:58:02Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Michael\_Spiegle](https://avatars.discourse-cdn.com/v4/letter/m/8797f3/32.png) [@Michael\_Spiegle](https://forum.ansible.com/u/Michael_Spiegle)\
**Post date:** [February 10, 2015, 1:36am UTC](https://forum.ansible.com/t/pipelining-gets-disabled-when-ssh-args-is-specified/17481/3 "2015-02-10T01:36:47Z")

</div>

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`
