# Аnsible work every second time

**URL:** <https://forum.ansible.com/t/nsible-work-every-second-time/19299>\
**Category:** Ansible Project\
**Tags:** windows\
**Created:** [September 18, 2015, 12:07pm UTC](https://forum.ansible.com/t/nsible-work-every-second-time/19299 "2015-09-18T12:07:42Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Michael\_Galyan](https://avatars.discourse-cdn.com/v4/letter/m/7bcc69/32.png) [@Michael\_Galyan](https://forum.ansible.com/u/Michael_Galyan)\
**Post date:** [September 18, 2015, 12:07pm UTC](https://forum.ansible.com/t/nsible-work-every-second-time/19299/1 "2015-09-18T12:07:42Z")

</div>

Windows 10  
babun version 1.2.0  
Vagrant 1.7.4  
ansible 1.9.3

**First run**  
{ Centos } » ansible testserver -s -m yum -a name=nano -vvvv  
\<127.0.0.1\> ESTABLISH CONNECTION FOR USER: vagrant  
\<127.0.0.1\> REMOTE\_MODULE yum name=nano  
\<127.0.0.1\> EXEC ssh -C -tt -vvv -o ControlMaster=auto -o ControlPersist=60s -o ControlPath=“/home/micha/.ansible/cp/ansible-ssh-%h-%p-%r” -o StrictHostKeyChecking=no -o Port=2222 -o IdentityFile=“./.vagrant/machines/default/virtualbox/private\_key” -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=vagrant -o ConnectTimeout=10 127.0.0.1 /bin/sh -c ‘mkdir -p $HOME/.ansible/tmp/ansible-tmp-1442576330.79-80907768843041 && chmod a+rx $HOME/.ansible/tmp/ansible-tmp-1442576330.79-80907768843041 && echo $HOME/.ansible/tmp/ansible-tmp-1442576330.79-80907768843041’  
testserver | FAILED =\> SSH Error: Failed to connect to new control master  
while connecting to 127.0.0.1:2222  
It is sometimes useful to re-run the command using -vvvv, which prints SSH debug output to help diagnose the issue.

**Right after**  
{ Centos } » ansible testserver -s -m yum -a name=nano -vvvv  
\<127.0.0.1\> ESTABLISH CONNECTION FOR USER: vagrant  
\<127.0.0.1\> REMOTE\_MODULE yum name=nano  
\<127.0.0.1\> EXEC ssh -C -tt -vvv -o ControlMaster=auto -o ControlPersist=60s -o ControlPath=“/home/micha/.ansible/cp/ansible-ssh-%h-%p-%r” -o StrictHostKeyChecking=no -o Port=2222 -o IdentityFile=“./.vagrant/machines/default/virtualbox/private\_key” -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=vagrant -o ConnectTimeout=10 127.0.0.1 /bin/sh -c ‘mkdir -p $HOME/.ansible/tmp/ansible-tmp-1442576335.72-42863877661228 && chmod a+rx $HOME/.ansible/tmp/ansible-tmp-1442576335.72-42863877661228 && echo $HOME/.ansible/tmp/ansible-tmp-1442576335.72-42863877661228’  
\<127.0.0.1\> PUT /tmp/tmpAV8UAI TO /home/vagrant/.ansible/tmp/ansible-tmp-1442576335.72-42863877661228/yum  
\<127.0.0.1\> EXEC ssh -C -tt -vvv -o ControlMaster=auto -o ControlPersist=60s -o ControlPath=“/home/micha/.ansible/cp/ansible-ssh-%h-%p-%r” -o StrictHostKeyChecking=no -o Port=2222 -o IdentityFile=“./.vagrant/machines/default/virtualbox/private\_key” -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=vagrant -o ConnectTimeout=10 127.0.0.1 /bin/sh -c ‘sudo -k && sudo -H -S -p “[sudo via ansible, key=dfklobmmhxvkowckqjztyjdzczexhhrs] password: " -u root /bin/sh -c '”’“‘echo BECOME-SUCCESS-dfklobmmhxvkowckqjztyjdzczexhhrs; LANG=en\_US.UTF-8 LC\_CTYPE=en\_US.UTF-8 /usr/bin/python -tt /home/vagrant/.ansible/tmp/ansible-tmp-1442576335.72-42863877661228/yum; rm -rf /home/vagrant/.ansible/tmp/ansible-tmp-1442576335.72-42863877661228/ \>/dev/null 2\>&1’”‘"’’  
testserver | success \>\> {  
“changed”: false,  
“msg”: “”,  
“rc”: 0,  
“results”: [  
“nano-2.0.9-7.el6.x86\_64 providing nano is already installed”  
]  
}

---

<div class="post-metadata">

**Author:** ![Michael\_Galyan](https://avatars.discourse-cdn.com/v4/letter/m/7bcc69/32.png) [@Michael\_Galyan](https://forum.ansible.com/u/Michael_Galyan)\
**Post date:** [September 18, 2015, 4:27pm UTC](https://forum.ansible.com/t/nsible-work-every-second-time/19299/2 "2015-09-18T16:27:27Z")

</div>

I found a solution to the problem

I added to ansible.cfg  
[ssh\_connection]  
ssh\_args = -o ControlMaster=no
