After further investigations I have come to believe that it relates to SSH connection reuse.
After disabling any connection reuse I no longer encounter the error: ansible all -i hosts -m ping --ssh-extra-args="-o ControlMaster=no -o ControlPath=none -o ControlPersist=no" Doing this will of course impact performance so consider it a workaround until the cause of the error has been identified and fixed. You can also add the extra parameters in your inventory file using ansible_ssh_extra_args <http://docs.ansible.com/ansible/intro_inventory.html#list-of-behavioral-inventory-parameters> . On Wednesday, 10 February 2016 18:27:44 UTC+4, Jonas Kongslund wrote: > > I also experience the same thing on Ubuntu 14.04.3 LTS using Ansible > 2.0.0.2-1ppa~trusty. > > *sysadm@controller:~$* ansible -vvv host1 -m command -a 'ls -l /' > Using /etc/ansible/ansible.cfg as config file > <10.10.10.51> ESTABLISH SSH CONNECTION FOR USER: None > <10.10.10.51> SSH: EXEC ssh -C -q -o ControlMaster=auto -o > ControlPersist=60s -o KbdInteractiveAuthentication=no -o > PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey > -o PasswordAuthentication=no -o ConnectTimeout=10 -o > ControlPath=/home/sysadm/.ansible/cp/ansible-ssh-%h-%p-%r -tt 10.10.10.51 > '( umask 22 && mkdir -p "$( echo > $HOME/.ansible/tmp/ansible-tmp-1455084832.33-184704261198709 )" && echo "$( > echo $HOME/.ansible/tmp/ansible-tmp-1455084832.33-184704261198709 )" )' > 10.10.10.51 | FAILED | rc=0 >> > ERROR! failed to resolve remote temporary directory from > ansible-tmp-1455084832.33-184704261198709: `( umask 22 && mkdir -p "$( echo > $HOME/.ansible/tmp/ansible-tmp-1455084832.33-184704261198709 )" && echo "$( > echo $HOME/.ansible/tmp/ansible-tmp-1455084832.33-184704261198709 )" )` > returned empty string > > *sysadm@controller:~$* ansible -vvv host1 -m command -a 'ls -l /' > Using /etc/ansible/ansible.cfg as config file > <10.10.10.51> ESTABLISH SSH CONNECTION FOR USER: None > <10.10.10.51> SSH: EXEC ssh -C -q -o ControlMaster=auto -o > ControlPersist=60s -o KbdInteractiveAuthentication=no -o > PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey > -o PasswordAuthentication=no -o ConnectTimeout=10 -o > ControlPath=/home/sysadm/.ansible/cp/ansible-ssh-%h-%p-%r -tt 10.10.10.51 > '( umask 22 && mkdir -p "$( echo > $HOME/.ansible/tmp/ansible-tmp-1455085172.76-47799942152084 )" && echo "$( > echo $HOME/.ansible/tmp/ansible-tmp-1455085172.76-47799942152084 )" )' > <10.10.10.51> PUT /tmp/tmpMAqVn7 TO > /home/sysadm/.ansible/tmp/ansible-tmp-1455085172.76-47799942152084/command > <10.10.10.51> SSH: EXEC sftp -b - -C -o ControlMaster=auto -o > ControlPersist=60s -o KbdInteractiveAuthentication=no -o > PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey > -o PasswordAuthentication=no -o ConnectTimeout=10 -o > ControlPath=/home/sysadm/.ansible/cp/ansible-ssh-%h-%p-%r '[10.10.10.51]' > <10.10.10.51> ESTABLISH SSH CONNECTION FOR USER: None > <10.10.10.51> SSH: EXEC ssh -C -q -o ControlMaster=auto -o > ControlPersist=60s -o KbdInteractiveAuthentication=no -o > PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey > -o PasswordAuthentication=no -o ConnectTimeout=10 -o > ControlPath=/home/sysadm/.ansible/cp/ansible-ssh-%h-%p-%r -tt 10.10.10.51 > 'LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 > /usr/bin/python > /home/sysadm/.ansible/tmp/ansible-tmp-1455085172.76-47799942152084/command; > rm -rf > "/home/sysadm/.ansible/tmp/ansible-tmp-1455085172.76-47799942152084/" > > /dev/null 2>&1' > 10.10.10.51 | SUCCESS | rc=0 >> > total 84 > drwxr-xr-x 2 root root 4096 Jan 18 04:41 bin > drwxr-xr-x 3 root root 4096 Jan 18 04:41 boot > drwxr-xr-x 15 root root 4040 Feb 10 06:06 dev > ... > > Any idea why this is happening? > > On Friday, 5 February 2016 09:10:09 UTC+4, Brad Murray wrote: >> >> Happens to me too. Running Ubuntu 14.04 boxes via Vagrant, both >> Virtualbox and KVM. OSX control machine >> >> Ansible is version 2.0.0.2 >> >> Is really making development painful. >> > -- 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+unsubscr...@googlegroups.com. To post to this group, send email to ansible-project@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/b7a2f7c6-5622-4849-a788-a1027aca69ff%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.