# ControlMaster broken or defaults changed?

**URL:** <https://forum.ansible.com/t/controlmaster-broken-or-defaults-changed/16471>\
**Category:** Ansible Developer\
**Tags:** ubuntu\
**Created:** [October 8, 2014, 6:31pm UTC](https://forum.ansible.com/t/controlmaster-broken-or-defaults-changed/16471 "2014-10-08T18:31:47Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sam\_Pierson](https://avatars.discourse-cdn.com/v4/letter/s/f475e1/32.png) [@Sam\_Pierson](https://forum.ansible.com/u/Sam_Pierson)\
**Post date:** [October 8, 2014, 6:31pm UTC](https://forum.ansible.com/t/controlmaster-broken-or-defaults-changed/16471/1 "2014-10-08T18:31:47Z")

</div>

Morning all,

Since updating to submoduleized-ansible, my ansible-playbook runs are taking twice the time they used to. Looking at ~/.ansible/cp, I find it empty during the run.

With 1.7.x, or older git ansible, for -vvv, the first two lines I see are:

\<[restore-test.omadahealth.net](http://restore-test.omadahealth.net)\> ESTABLISH CONNECTION FOR USER: ubuntu  
\<[restore-test.omadahealth.net](http://restore-test.omadahealth.net)\> EXEC **ssh -C -tt -q -o ControlMaster=auto -o ControlPersist=60s -o ControlPath=/Users/sam/.ansible/cp/ansible-ssh-%h-%p-%r** -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=ubuntu -o ConnectTimeout=10 [restore-test.omadahealth.net](http://restore-test.omadahealth.net) /bin/sh -c ‘mkdir -p $HOME/.ansible/tmp/ansible-tmp-1412792607.25-208504897684154 && chmod a+rx $HOME/.ansible/tmp/ansible-tmp-1412792607.25-208504897684154 && echo $HOME/.ansible/tmp/ansible-tmp-1412792607.25-208504897684154’

But with the latest, the first few lines I see are:

\<[restore-test.omadahealth.net](http://restore-test.omadahealth.net)\> ESTABLISH CONNECTION FOR USER: ubuntu on PORT 22 TO [restore-test.omadahealth.net](http://restore-test.omadahealth.net)  
\<[restore-test.omadahealth.net](http://restore-test.omadahealth.net)\> EXEC /bin/sh -c ‘mkdir -p $HOME/.ansible/tmp/ansible-tmp-1412792525.32-128951976047959 && chmod a+rx $HOME/.ansible/tmp/ansible-tmp-1412792525.32-128951976047959 && echo $HOME/.ansible/tmp/ansible-tmp-1412792525.32-128951976047959’

Notice the complete absence of any ssh debug or options. Did ssh ControlMaster defaults change? Even setting it up in ansible.cfg as follows appears to have no effect:

[ssh\_connection]  
ssh\_args = -o ControlMaster=yes

Thanks,

-Sam.

**Sam Pierson**

Chief Engineer | [Omada Health](http://omadahealth.com/)

This email may contain material that is confidential and/or privileged for the sole use of the intended recipient. Any review, reliance, or distribution by others or forwarding without express permission is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies. Also note that email is not an appropriate way to send protected health information to Omada Health employees. Please use your discretion when responding to this email.

---

<div class="post-metadata">

**Author:** ![Jesse\_Keating](https://avatars.discourse-cdn.com/v4/letter/j/3bc359/32.png) [@Jesse\_Keating](https://forum.ansible.com/u/Jesse_Keating)\
**Post date:** [October 8, 2014, 6:40pm UTC](https://forum.ansible.com/t/controlmaster-broken-or-defaults-changed/16471/2 "2014-10-08T18:40:28Z")

</div>

Is your play specifically set to use the ssh connection method?

-jlk

---

<div class="post-metadata">

**Author:** ![James\_Cammarata](https://avatars.discourse-cdn.com/v4/letter/j/7c8e57/32.png) [@James\_Cammarata](https://forum.ansible.com/u/James_Cammarata)\
**Post date:** [October 8, 2014, 6:40pm UTC](https://forum.ansible.com/t/controlmaster-broken-or-defaults-changed/16471/3 "2014-10-08T18:40:41Z")

</div>

Hi Sam,

My guess is that you’re running ansible from Mac OSX? We recently switched the smart mode there to use paramiko rather than ssh due to a bug in sshpass (which is out of our control) that can cause a kernel panic and crash the system. If you’re not using ssh-pass, you can set the transport type to ‘ssh’ instead of ‘smart’ to get that functionality back. This was a short-term solution for the ssh-pass issue, and we hope to make that more fine-tuned in the near future.

Hope that helps!

---

<div class="post-metadata">

**Author:** ![Sam\_Pierson](https://avatars.discourse-cdn.com/v4/letter/s/f475e1/32.png) [@Sam\_Pierson](https://forum.ansible.com/u/Sam_Pierson)\
**Post date:** [October 8, 2014, 6:52pm UTC](https://forum.ansible.com/t/controlmaster-broken-or-defaults-changed/16471/4 "2014-10-08T18:52:12Z")

</div>

You got it - yes Mac OS X.  
transport = ssh fixed it. Thanks James.

-Sam.

**Sam Pierson**

Chief Engineer | [Omada Health](http://omadahealth.com/)  
650.422.4140 | [sam.pierson@omadahealth.com](mailto:sam.pierson@omadahealth.com)

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan1](https://avatars.discourse-cdn.com/v4/letter/m/5e9695/32.png) [@Michael\_DeHaan1](https://forum.ansible.com/u/Michael_DeHaan1)\
**Post date:** [October 10, 2014, 11:45pm UTC](https://forum.ansible.com/t/controlmaster-broken-or-defaults-changed/16471/5 "2014-10-10T23:45:41Z")

</div>

I’m thinking we might just want to _NOT_ default to paramiko and then raise a fatal error before running sshpass on OSX instead mentioning if you want that, you need to use paramiko.

---

<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:** [October 11, 2014, 12:13am UTC](https://forum.ansible.com/t/controlmaster-broken-or-defaults-changed/16471/6 "2014-10-11T00:13:59Z")

</div>

If this becomes the case, it’d be nice to have a way to allow it to work, perhaps with a config var. In our environment we have to use ssh (not paramiko), and also have to use sshpass frequently.

We actually have decent success with sshpass on Mac without crashes. I’ve never encountered problems.

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan1](https://avatars.discourse-cdn.com/v4/letter/m/5e9695/32.png) [@Michael\_DeHaan1](https://forum.ansible.com/u/Michael_DeHaan1)\
**Post date:** [October 13, 2014, 8:46pm UTC](https://forum.ansible.com/t/controlmaster-broken-or-defaults-changed/16471/7 "2014-10-13T20:46:09Z")

</div>

Mine hasn’t crashed either.

I think you raise a good point - I hate to have the extra config setting, but it might be required.

I think in general -c ssh gives a better overall experience though, so I do hate having to drop to Paramiko, of course ansible rebooting your Mac (seemingly ansible, anyway) is about the worst possible experience 🙂
