Ansible: Stuck at connection phase / gathering facts
<p>I keep beating my head against the wall - a few days ago, ansible stopped being able to connect to one of my boxes. It just hangs after the output below. The only stuff I've done to the box recently is to do apt-get upgrade... Nothing else. Worked perfectly before. I'm the only one with rights to access it. </p>

<p>Any hints on where to look? I've tried enabling and disabling sudo in my hosts file, makes no difference. </p>

<p>Command I run:</p>

<blockquote>
  <p>ansible-playbook site.yml -i hosts.yml -vvvv -u ubuntu</p>
</blockquote>

<p>Outputs this and hangs: </p>

<pre><code>&lt;cb2&gt; ESTABLISH CONNECTION FOR USER: ubuntu
&lt;cb2&gt; REMOTE_MODULE setup
&lt;cb2&gt; EXEC ssh -C -vvv -o ControlMaster=auto -o ControlPersist=60s -o ControlPath="/Users/alexweinstein/.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 cb2 /bin/sh -c 'LANG=en_US.UTF-8 LC_CTYPE=en_US.UTF-8 /usr/bin/python'
</code></pre>

<p>Note that I can ssh to the box just fine. Using ansible 1.9.4.</p>

<p>ADDITIONAL INFO: </p>

<ul>
<li>When I try to ssh into the box using the same exact ssh command as what ansible is outputting (see below), the connection goes thru just fine: </li>
</ul>

<blockquote>
  <p>ssh -C -vvv -o ControlMaster=auto -o ControlPersist=60s -o
  ControlPath="/Users/alexweinstein/.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 cb2</p>
</blockquote>

<ul>
<li>Ping command hangs at the same exact point. </li>
</ul>

<blockquote>
  <p>ansible all -i hosts.yml -m ping -vvvv</p>
</blockquote>