title: ansible-playbook -> ControlPath too long
body: <p>I just trying ouy a playbook that a  colleague has set up that I needed to modify. The first problem I get running on my mac was </p>
  
  <pre><code>ERROR: Unable to find an inventory file, specify one with -i ?
  </code></pre>
  
  <p>This was easily solved by adding <em>-i verif</em> to the command. But then the following error occured.</p>
  
  <pre><code>loadgen-verif-app1.internal.machines | FAILED =&gt; SSH encountered an unknown error. The output was:
  OpenSSH_6.2p2, OSSLShim 0.9.8r 8 Dec 2011
  debug1: Reading configuration data /Users/andreas.joelsson/.ssh/config
  debug1: Reading configuration data /etc/ssh_config
  debug1: /etc/ssh_config line 20: Applying options for *
  debug1: auto-mux: Trying existing master
  ControlPath too long
  </code></pre>
  
  <p>This is true for all 8 machines (<em>loadgen-verif-app[1-8].internal.machines</em>)</p>
  
  <p>After some debugging that the file could be too long, I tried the following command with the same result:</p>
  
  <pre><code>ansible nukes -m ping -i verif -vvvv
  </code></pre>
  
  <p>then I thought it was issues with ssh but executing the command through ssh works:</p>
  
  <pre><code>ssh loadgen-verif-app1.internal.machines ping loadgen-verif-app2.internal.machines
  </code></pre>
  
  <p>And now I am stumped because the ping command works on some of the machines not in the range listed above, the thing is that they are shorter than the <em>loagenXXX.machines</em> path if that makes it an issue. But then the ssh command shouldn't work I guess.</p>
  
  <p>I have some ssh config settings set up for the targets as well, but that is no different that the ones that did work with the ping command.</p>
  
  <pre><code>Host loadgen1
      HostName loadgen-verif-app1.internal.machines
  </code></pre>
  
  <p>Now I am stumped as it works for the colleague on a mac as well. So not sure if there is some setting i'm missing or similar. He doesn't need to provide the <em>-i verif</em> either that can also be a reason why it doesn't work.</p>
  
  <p><strong>edit 2014-12-17:</strong></p>
  
  <ul>
  <li>Have tried modifying the ansible setting control_path according to <a href="http://docs.ansible.com/intro_configuration.html#control-path" rel="noreferrer">http://docs.ansible.com/intro_configuration.html#control-path</a> </li>
  <li>We are running the same version of ansible</li>
  <li>We are running the same version of OpenSSH.</li>
  <li>We have the same ssh configs as far as we can tell.</li>
  <li>Have been looking for Host* that I found in /etc/ssh_config and removed without progress according to f.e. <a href="https://help.openshift.com/hc/en-us/articles/202186044-Unable-to-git-clone-an-application-when-SSH-session-sharing-is-in-use-ControlPath-too-long-" rel="noreferrer">https://help.openshift.com/hc/en-us/articles/202186044-Unable-to-git-clone-an-application-when-SSH-session-sharing-is-in-use-ControlPath-too-long-</a></li>
  </ul>
  
  <p><strong>edit 2015-01-08:</strong></p>
  
  <pre><code>SE-C02N76PGG5RP:verif_provisioning andreas.joelsson$ ansible loadgen-verif-app1.internal.machines -m ping -i verif -vvvv
  &lt;loadgen-verif-app1.internal.machines&gt; ESTABLISH CONNECTION FOR USER: andreas.joelsson
  &lt;loadgen-verif-app1.internal.machines&gt; REMOTE_MODULE ping
  &lt;loadgen-verif-app1.internal.machines&gt; EXEC ssh -C -tt -vvv -o ControlMaster=auto -o ControlPersist=60s -o ControlPath="/Users/andreas.joelsson/.ansible/cp/ansible-ssh-%h-%p-%r" -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o ConnectTimeout=10 loadgen-verif-app1.internal.machines /bin/sh -c 'mkdir -p $HOME/.ansible/tmp/ansible-tmp-1420723708.99-33622628424665 &amp;&amp; chmod a+rx $HOME/.ansible/tmp/ansible-tmp-1420723708.99-33622628424665 &amp;&amp; echo $HOME/.ansible/tmp/ansible-tmp-1420723708.99-33622628424665'
  loadgen-verif-app1.internal.machines | FAILED =&gt; SSH encountered an unknown error. The output was:
  OpenSSH_6.2p2, OSSLShim 0.9.8r 8 Dec 2011
  debug1: Reading configuration data /Users/andreas.joelsson/.ssh/config
  debug1: Reading configuration data /etc/ssh_config
  debug1: /etc/ssh_config line 20: Applying options for *
  debug1: auto-mux: Trying existing master
  ControlPath too long
  </code></pre>
  
  <p><strong>edit 2015-02-12:</strong></p>
  
  <pre><code>SE-C02N76PGG5RP:verif_provisioning andreas.joelsson$ ansible nukes -m ping -i verif
  loadgen-verif-app4.internal.machines | FAILED =&gt; SSH encountered an unknown error during the connection. We recommend you re-run the command using -vvvv, which will enable SSH debugging output to help diagnose the issue
  loadgen-verif-app5.internal.machines | FAILED =&gt; SSH encountered an unknown error during the connection. We recommend you re-run the command using -vvvv, which will enable SSH debugging output to help diagnose the issue
  loadgen-verif-app3.internal.machines | FAILED =&gt; SSH encountered an unknown error during the connection. We recommend you re-run the command using -vvvv, which will enable SSH debugging output to help diagnose the issue
  loadgen-verif-app1.internal.machines | FAILED =&gt; SSH encountered an unknown error during the connection. We recommend you re-run the command using -vvvv, which will enable SSH debugging output to help diagnose the issue
  loadgen-verif-app2.internal.machines | FAILED =&gt; SSH encountered an unknown error during the connection. We recommend you re-run the command using -vvvv, which will enable SSH debugging output to help diagnose the issue
  loadgen-verif-app8.internal.machines | FAILED =&gt; SSH encountered an unknown error during the connection. We recommend you re-run the command using -vvvv, which will enable SSH debugging output to help diagnose the issue
  loadgen-verif-app6.internal.machines | FAILED =&gt; SSH encountered an unknown error during the connection. We recommend you re-run the command using -vvvv, which will enable SSH debugging output to help diagnose the issue
  loadgen-verif-app7.internal.machines | FAILED =&gt; SSH encountered an unknown error during the connection. We recommend you re-run the command using -vvvv, which will enable SSH debugging output to help diagnose the issue
  </code></pre>
  
  <p>And with the working one:</p>
  
  <pre><code>SE-C02N76PGG5RP:verif_provisioning andreas.joelsson$ ansible duke -m ping -i verif
  steve-verif-app1.internal.machines | success &gt;&gt; {
      "changed": false,
      "ping": "pong"
  }
  </code></pre>