<p dir="auto">Not work shell with grep pipline:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="- shell: find /TEST/PATH -name requirements.txt -exec cat {} \; | grep -o '^[^#]*'
- shell: &quot;find /TEST/PATH -name requirements.txt -exec cat {} \\; | grep -o '^[^#]*'&quot;
- shell: find /TEST/PATH -name requirements.txt -exec cat {} \; | grep test
- shell: &quot;find /TEST/PATH -name requirements.txt -exec cat {} \\; | grep test&quot;
- shell: find /TEST/PATH -name requirements.txt -print0 | xargs -0 cat | grep  -o '^[^#]*'
- shell: &quot;find /TEST/PATH -name requirements.txt -print0 | xargs -0 cat | grep  -o '^[^#]*'&quot;
- shell: find /TEST/PATH -name requirements.txt -print0 | xargs -0 cat | grep  test
- shell: &quot;find /TEST/PATH -name requirements.txt -print0 | xargs -0 cat | grep  test&quot;"><pre class="notranslate"><code class="notranslate">- shell: find /TEST/PATH -name requirements.txt -exec cat {} \; | grep -o '^[^#]*'
- shell: "find /TEST/PATH -name requirements.txt -exec cat {} \\; | grep -o '^[^#]*'"
- shell: find /TEST/PATH -name requirements.txt -exec cat {} \; | grep test
- shell: "find /TEST/PATH -name requirements.txt -exec cat {} \\; | grep test"
- shell: find /TEST/PATH -name requirements.txt -print0 | xargs -0 cat | grep  -o '^[^#]*'
- shell: "find /TEST/PATH -name requirements.txt -print0 | xargs -0 cat | grep  -o '^[^#]*'"
- shell: find /TEST/PATH -name requirements.txt -print0 | xargs -0 cat | grep  test
- shell: "find /TEST/PATH -name requirements.txt -print0 | xargs -0 cat | grep  test"
</code></pre></div>
<p dir="auto">with next message:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="failed: [test-instance] =&gt; {&quot;changed&quot;: true, &quot;cmd&quot;: &quot;find  /TEST/PATH -name requirements.txt -exec cat {} \\; | grep -o '^[^#]*'&quot;, &quot;delta&quot;: &quot;0:00:00.003797&quot;, &quot;end&quot;: &quot;2015-06-03 21:40:57.502797&quot;, &quot;rc&quot;: 1, &quot;start&quot;: &quot;2015-06-03 21:40:57.499000&quot;, &quot;warnings&quot;: []}

FATAL: all hosts have already failed -- aborting"><pre class="notranslate"><code class="notranslate">failed: [test-instance] =&gt; {"changed": true, "cmd": "find  /TEST/PATH -name requirements.txt -exec cat {} \\; | grep -o '^[^#]*'", "delta": "0:00:00.003797", "end": "2015-06-03 21:40:57.502797", "rc": 1, "start": "2015-06-03 21:40:57.499000", "warnings": []}

FATAL: all hosts have already failed -- aborting
</code></pre></div>
<p dir="auto">When I replace <code class="notranslate">grep something</code> for example to <code class="notranslate">tail</code> all work, this commands also work fine on shell on instance for bash and sh, also this work for python <code class="notranslate">subprocess.Popen</code> with shell=True.</p>
<h5 dir="auto">ISSUE TYPE</h5>

<ul dir="auto">
<li>Bug Report</li>
</ul>
<h5 dir="auto">COMPONENT NAME</h5>
<p dir="auto">SSH connection</p>
<h5 dir="auto">ANSIBLE VERSION</h5>

<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ansible 2.2.0 (devel eb33ed4219) last updated 2016/09/27 11:16:30 (GMT +200)
  lib/ansible/modules/core: (detached HEAD c03697c81e) last updated 2016/09/27 11:17:10 (GMT +200)
  lib/ansible/modules/extras: (detached HEAD 119bc466be) last updated 2016/09/27 11:17:58 (GMT +200)
  config file = 
  configured module search path = Default w/o overrides"><pre class="notranslate"><code class="notranslate">ansible 2.2.0 (devel eb33ed4219) last updated 2016/09/27 11:16:30 (GMT +200)
  lib/ansible/modules/core: (detached HEAD c03697c81e) last updated 2016/09/27 11:17:10 (GMT +200)
  lib/ansible/modules/extras: (detached HEAD 119bc466be) last updated 2016/09/27 11:17:58 (GMT +200)
  config file = 
  configured module search path = Default w/o overrides
</code></pre></div>
<h5 dir="auto">CONFIGURATION</h5>
<p dir="auto">N/A</p>
<h5 dir="auto">OS / ENVIRONMENT</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Linux localhost 3.8.11 #1 SMP Mon Sep 12 21:56:54 PDT 2016 x86_64 x86_64 x86_64 GNU/Linux
Python 2.7.11
OpenSSH_6.6.1p1 Ubuntu-2ubuntu2.6, OpenSSL 1.0.1f 6 Jan 2014"><pre class="notranslate"><code class="notranslate">Linux localhost 3.8.11 #1 SMP Mon Sep 12 21:56:54 PDT 2016 x86_64 x86_64 x86_64 GNU/Linux
Python 2.7.11
OpenSSH_6.6.1p1 Ubuntu-2ubuntu2.6, OpenSSL 1.0.1f 6 Jan 2014
</code></pre></div>
<p dir="auto">~/ansible$ pip list<br>
ansible (2.2.0)<br>
apache-libcloud (0.20.1)<br>
aws (0.2.5)<br>
awscli (1.10.61)<br>
backports.ssl-match-hostname (3.5.0.1)<br>
boto (2.40.0)<br>
boto3 (1.1.3)<br>
botocore (1.4.51)<br>
certifi (2015.11.20.1)<br>
cffi (1.7.0)<br>
colorama (0.3.7)<br>
Cython (0.20.1.post0)<br>
docutils (0.12)<br>
ecdsa (0.13)<br>
enum34 (1.1.6)<br>
Fabric (1.11.1)<br>
futures (3.0.5)<br>
google-api-python-client (1.1)<br>
httplib2 (0.8)<br>
idna (2.1)<br>
ipaddress (1.0.16)<br>
Jinja2 (2.8)<br>
jmespath (0.9.0)<br>
jsonpatch (1.13)<br>
jsonpointer (1.10)<br>
jwt (0.3.2)<br>
lxml (3.3.3)<br>
MarkupSafe (0.23)<br>
numpy (1.8.2)<br>
paramiko (1.17.0)<br>
pip (8.1.2)<br>
ply (3.4)<br>
prettytable (0.7.2)<br>
pyasn1 (0.1.9)<br>
pycparser (2.14)<br>
pycrypto (2.6.1)<br>
pygpgme (0.3)<br>
pyOpenSSL (0.13)<br>
python-apt (0.9.3.5ubuntu2)<br>
python-dateutil (2.5.3)<br>
python-gflags (3.0.4)<br>
python-nghttp2 (1.3.5.dev0)<br>
PyYAML (3.11)<br>
rsa (3.4.2)<br>
s3transfer (0.1.3)<br>
setuptools (23.0.0)<br>
simplejson (3.3.1)<br>
six (1.10.0)<br>
tabulate (0.7.5)<br>
urllib3 (1.14)<br>
virtualenv (1.11.4)</p>
<h5 dir="auto">SUMMARY</h5>
<p dir="auto">Using a repo installed version of Ansible, 2.1.1  all works fine.</p>
<p dir="auto">When I remove that version and then clone the devel branch, ansible-playbook fails to connect to hosts while running  ansible -m setup consistently works and gets facts from the host.</p>
<h5 dir="auto">STEPS TO REPRODUCE</h5>

<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ansible mng -m setup -a 'gather_subset=!all' -vvvvvv

Using /home/fvant/ansible-local/ansible.cfg as config file
Loading callback plugin minimal of type stdout, v2.0 from /home/fvant/ansible/lib/ansible/plugins/callback/__init__.pyc
Using module file /home/fvant/ansible/lib/ansible/modules/core/system/setup.py
&lt;10.0.91.104&gt; ESTABLISH SSH CONNECTION FOR USER: root
&lt;10.0.91.104&gt; SSH: ansible.cfg set ssh_args: (-C)(-o)(ControlMaster=auto)(-o)(ControlPersist=60s)
&lt;10.0.91.104&gt; SSH: ANSIBLE_HOST_KEY_CHECKING/host_key_checking disabled: (-o)(StrictHostKeyChecking=no)
&lt;10.0.91.104&gt; SSH: ANSIBLE_PRIVATE_KEY_FILE/private_key_file/ansible_ssh_private_key_file set: (-o)(IdentityFile=&quot;./vars/keys/ansible_id_rsa&quot;)
&lt;10.0.91.104&gt; SSH: ansible_password/ansible_ssh_pass not set: (-o)(KbdInteractiveAuthentication=no)(-o)(PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey)(-o)(PasswordAuthentication=no)
&lt;10.0.91.104&gt; SSH: ANSIBLE_REMOTE_USER/remote_user/ansible_user/user/-u set: (-o)(User=root)
&lt;10.0.91.104&gt; SSH: ANSIBLE_TIMEOUT/timeout set: (-o)(ConnectTimeout=5)
&lt;10.0.91.104&gt; SSH: PlayContext set ssh_common_args: ()
&lt;10.0.91.104&gt; SSH: PlayContext set ssh_extra_args: ()
&lt;10.0.91.104&gt; SSH: found only ControlPersist; added ControlPath: (-o)(ControlPath=/home/fvant/.ansible/cp/ansible-ssh-%h-%p-%r)
&lt;10.0.91.104&gt; SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o 'IdentityFile=&quot;./vars/keys/ansible_id_rsa&quot;' -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=root -o ConnectTimeout=5 -o ControlPath=/home/fvant/.ansible/cp/ansible-ssh-%h-%p-%r 10.0.91.104 '/bin/sh -c '&quot;'&quot;'( umask 77 &amp;&amp; mkdir -p &quot;` echo /tmp/ansible-tmp-1474979078.18-42020272005162 `&quot; &amp;&amp; echo ansible-tmp-1474979078.18-42020272005162=&quot;` echo /tmp/ansible-tmp-1474979078.18-42020272005162 `&quot; ) &amp;&amp; sleep 0'&quot;'&quot;''
&lt;10.0.91.104&gt; PUT /tmp/tmpUCSQuH TO /tmp/ansible-tmp-1474979078.18-42020272005162/setup.py
&lt;10.0.91.104&gt; SSH: ansible.cfg set ssh_args: (-C)(-o)(ControlMaster=auto)(-o)(ControlPersist=60s)
&lt;10.0.91.104&gt; SSH: ANSIBLE_HOST_KEY_CHECKING/host_key_checking disabled: (-o)(StrictHostKeyChecking=no)
&lt;10.0.91.104&gt; SSH: ANSIBLE_PRIVATE_KEY_FILE/private_key_file/ansible_ssh_private_key_file set: (-o)(IdentityFile=&quot;./vars/keys/ansible_id_rsa&quot;)
&lt;10.0.91.104&gt; SSH: ansible_password/ansible_ssh_pass not set: (-o)(KbdInteractiveAuthentication=no)(-o)(PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey)(-o)(PasswordAuthentication=no)
&lt;10.0.91.104&gt; SSH: ANSIBLE_REMOTE_USER/remote_user/ansible_user/user/-u set: (-o)(User=root)
&lt;10.0.91.104&gt; SSH: ANSIBLE_TIMEOUT/timeout set: (-o)(ConnectTimeout=5)
&lt;10.0.91.104&gt; SSH: PlayContext set ssh_common_args: ()
&lt;10.0.91.104&gt; SSH: PlayContext set sftp_extra_args: ()
&lt;10.0.91.104&gt; SSH: found only ControlPersist; added ControlPath: (-o)(ControlPath=/home/fvant/.ansible/cp/ansible-ssh-%h-%p-%r)
&lt;10.0.91.104&gt; SSH: EXEC sftp -b - -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o 'IdentityFile=&quot;./vars/keys/ansible_id_rsa&quot;' -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=root -o ConnectTimeout=5 -o ControlPath=/home/fvant/.ansible/cp/ansible-ssh-%h-%p-%r '[10.0.91.104]'
&lt;10.0.91.104&gt; ESTABLISH SSH CONNECTION FOR USER: root
&lt;10.0.91.104&gt; SSH: ansible.cfg set ssh_args: (-C)(-o)(ControlMaster=auto)(-o)(ControlPersist=60s)
&lt;10.0.91.104&gt; SSH: ANSIBLE_HOST_KEY_CHECKING/host_key_checking disabled: (-o)(StrictHostKeyChecking=no)
&lt;10.0.91.104&gt; SSH: ANSIBLE_PRIVATE_KEY_FILE/private_key_file/ansible_ssh_private_key_file set: (-o)(IdentityFile=&quot;./vars/keys/ansible_id_rsa&quot;)
&lt;10.0.91.104&gt; SSH: ansible_password/ansible_ssh_pass not set: (-o)(KbdInteractiveAuthentication=no)(-o)(PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey)(-o)(PasswordAuthentication=no)
&lt;10.0.91.104&gt; SSH: ANSIBLE_REMOTE_USER/remote_user/ansible_user/user/-u set: (-o)(User=root)
&lt;10.0.91.104&gt; SSH: ANSIBLE_TIMEOUT/timeout set: (-o)(ConnectTimeout=5)
&lt;10.0.91.104&gt; SSH: PlayContext set ssh_common_args: ()
&lt;10.0.91.104&gt; SSH: PlayContext set ssh_extra_args: ()
&lt;10.0.91.104&gt; SSH: found only ControlPersist; added ControlPath: (-o)(ControlPath=/home/fvant/.ansible/cp/ansible-ssh-%h-%p-%r)
&lt;10.0.91.104&gt; SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o 'IdentityFile=&quot;./vars/keys/ansible_id_rsa&quot;' -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=root -o ConnectTimeout=5 -o ControlPath=/home/fvant/.ansible/cp/ansible-ssh-%h-%p-%r 10.0.91.104 '/bin/sh -c '&quot;'&quot;'chmod u+x /tmp/ansible-tmp-1474979078.18-42020272005162/ /tmp/ansible-tmp-1474979078.18-42020272005162/setup.py &amp;&amp; sleep 0'&quot;'&quot;''
&lt;10.0.91.104&gt; ESTABLISH SSH CONNECTION FOR USER: root
&lt;10.0.91.104&gt; SSH: ansible.cfg set ssh_args: (-C)(-o)(ControlMaster=auto)(-o)(ControlPersist=60s)
&lt;10.0.91.104&gt; SSH: ANSIBLE_HOST_KEY_CHECKING/host_key_checking disabled: (-o)(StrictHostKeyChecking=no)
&lt;10.0.91.104&gt; SSH: ANSIBLE_PRIVATE_KEY_FILE/private_key_file/ansible_ssh_private_key_file set: (-o)(IdentityFile=&quot;./vars/keys/ansible_id_rsa&quot;)
&lt;10.0.91.104&gt; SSH: ansible_password/ansible_ssh_pass not set: (-o)(KbdInteractiveAuthentication=no)(-o)(PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey)(-o)(PasswordAuthentication=no)
&lt;10.0.91.104&gt; SSH: ANSIBLE_REMOTE_USER/remote_user/ansible_user/user/-u set: (-o)(User=root)
&lt;10.0.91.104&gt; SSH: ANSIBLE_TIMEOUT/timeout set: (-o)(ConnectTimeout=5)
&lt;10.0.91.104&gt; SSH: PlayContext set ssh_common_args: ()
&lt;10.0.91.104&gt; SSH: PlayContext set ssh_extra_args: ()
&lt;10.0.91.104&gt; SSH: found only ControlPersist; added ControlPath: (-o)(ControlPath=/home/fvant/.ansible/cp/ansible-ssh-%h-%p-%r)
&lt;10.0.91.104&gt; SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o 'IdentityFile=&quot;./vars/keys/ansible_id_rsa&quot;' -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=root -o ConnectTimeout=5 -o ControlPath=/home/fvant/.ansible/cp/ansible-ssh-%h-%p-%r -tt 10.0.91.104 '/bin/sh -c '&quot;'&quot;'/usr/bin/python /tmp/ansible-tmp-1474979078.18-42020272005162/setup.py; rm -rf &quot;/tmp/ansible-tmp-1474979078.18-42020272005162/&quot; &gt; /dev/null 2&gt;&amp;1 &amp;&amp; sleep 0'&quot;'&quot;''
mng-a-sandbox01 | SUCCESS =&gt; {
    &quot;ansible_facts&quot;: {
        &quot;ansible_architecture&quot;: &quot;x86_64&quot;, 
        &quot;ansible_cmdline&quot;: {
            &quot;BOOT_IMAGE&quot;: &quot;/boot/vmlinuz-3.10.0-327.10.1.el7.x86_64&quot;, 
            &quot;LANG&quot;: &quot;en_US.UTF-8&quot;, 
            &quot;console&quot;: &quot;ttyS0,115200&quot;, 
            &quot;crashkernel&quot;: &quot;auto&quot;, 
            &quot;ro&quot;: true, 
            &quot;root&quot;: &quot;UUID=ef6ba050-6cdc-416a-9380-c14304d0d206&quot;
        }, 

&lt;/snip&gt;"><pre class="notranslate"><code class="notranslate">ansible mng -m setup -a 'gather_subset=!all' -vvvvvv

Using /home/fvant/ansible-local/ansible.cfg as config file
Loading callback plugin minimal of type stdout, v2.0 from /home/fvant/ansible/lib/ansible/plugins/callback/__init__.pyc
Using module file /home/fvant/ansible/lib/ansible/modules/core/system/setup.py
&lt;10.0.91.104&gt; ESTABLISH SSH CONNECTION FOR USER: root
&lt;10.0.91.104&gt; SSH: ansible.cfg set ssh_args: (-C)(-o)(ControlMaster=auto)(-o)(ControlPersist=60s)
&lt;10.0.91.104&gt; SSH: ANSIBLE_HOST_KEY_CHECKING/host_key_checking disabled: (-o)(StrictHostKeyChecking=no)
&lt;10.0.91.104&gt; SSH: ANSIBLE_PRIVATE_KEY_FILE/private_key_file/ansible_ssh_private_key_file set: (-o)(IdentityFile="./vars/keys/ansible_id_rsa")
&lt;10.0.91.104&gt; SSH: ansible_password/ansible_ssh_pass not set: (-o)(KbdInteractiveAuthentication=no)(-o)(PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey)(-o)(PasswordAuthentication=no)
&lt;10.0.91.104&gt; SSH: ANSIBLE_REMOTE_USER/remote_user/ansible_user/user/-u set: (-o)(User=root)
&lt;10.0.91.104&gt; SSH: ANSIBLE_TIMEOUT/timeout set: (-o)(ConnectTimeout=5)
&lt;10.0.91.104&gt; SSH: PlayContext set ssh_common_args: ()
&lt;10.0.91.104&gt; SSH: PlayContext set ssh_extra_args: ()
&lt;10.0.91.104&gt; SSH: found only ControlPersist; added ControlPath: (-o)(ControlPath=/home/fvant/.ansible/cp/ansible-ssh-%h-%p-%r)
&lt;10.0.91.104&gt; SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o 'IdentityFile="./vars/keys/ansible_id_rsa"' -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=root -o ConnectTimeout=5 -o ControlPath=/home/fvant/.ansible/cp/ansible-ssh-%h-%p-%r 10.0.91.104 '/bin/sh -c '"'"'( umask 77 &amp;&amp; mkdir -p "` echo /tmp/ansible-tmp-1474979078.18-42020272005162 `" &amp;&amp; echo ansible-tmp-1474979078.18-42020272005162="` echo /tmp/ansible-tmp-1474979078.18-42020272005162 `" ) &amp;&amp; sleep 0'"'"''
&lt;10.0.91.104&gt; PUT /tmp/tmpUCSQuH TO /tmp/ansible-tmp-1474979078.18-42020272005162/setup.py
&lt;10.0.91.104&gt; SSH: ansible.cfg set ssh_args: (-C)(-o)(ControlMaster=auto)(-o)(ControlPersist=60s)
&lt;10.0.91.104&gt; SSH: ANSIBLE_HOST_KEY_CHECKING/host_key_checking disabled: (-o)(StrictHostKeyChecking=no)
&lt;10.0.91.104&gt; SSH: ANSIBLE_PRIVATE_KEY_FILE/private_key_file/ansible_ssh_private_key_file set: (-o)(IdentityFile="./vars/keys/ansible_id_rsa")
&lt;10.0.91.104&gt; SSH: ansible_password/ansible_ssh_pass not set: (-o)(KbdInteractiveAuthentication=no)(-o)(PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey)(-o)(PasswordAuthentication=no)
&lt;10.0.91.104&gt; SSH: ANSIBLE_REMOTE_USER/remote_user/ansible_user/user/-u set: (-o)(User=root)
&lt;10.0.91.104&gt; SSH: ANSIBLE_TIMEOUT/timeout set: (-o)(ConnectTimeout=5)
&lt;10.0.91.104&gt; SSH: PlayContext set ssh_common_args: ()
&lt;10.0.91.104&gt; SSH: PlayContext set sftp_extra_args: ()
&lt;10.0.91.104&gt; SSH: found only ControlPersist; added ControlPath: (-o)(ControlPath=/home/fvant/.ansible/cp/ansible-ssh-%h-%p-%r)
&lt;10.0.91.104&gt; SSH: EXEC sftp -b - -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o 'IdentityFile="./vars/keys/ansible_id_rsa"' -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=root -o ConnectTimeout=5 -o ControlPath=/home/fvant/.ansible/cp/ansible-ssh-%h-%p-%r '[10.0.91.104]'
&lt;10.0.91.104&gt; ESTABLISH SSH CONNECTION FOR USER: root
&lt;10.0.91.104&gt; SSH: ansible.cfg set ssh_args: (-C)(-o)(ControlMaster=auto)(-o)(ControlPersist=60s)
&lt;10.0.91.104&gt; SSH: ANSIBLE_HOST_KEY_CHECKING/host_key_checking disabled: (-o)(StrictHostKeyChecking=no)
&lt;10.0.91.104&gt; SSH: ANSIBLE_PRIVATE_KEY_FILE/private_key_file/ansible_ssh_private_key_file set: (-o)(IdentityFile="./vars/keys/ansible_id_rsa")
&lt;10.0.91.104&gt; SSH: ansible_password/ansible_ssh_pass not set: (-o)(KbdInteractiveAuthentication=no)(-o)(PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey)(-o)(PasswordAuthentication=no)
&lt;10.0.91.104&gt; SSH: ANSIBLE_REMOTE_USER/remote_user/ansible_user/user/-u set: (-o)(User=root)
&lt;10.0.91.104&gt; SSH: ANSIBLE_TIMEOUT/timeout set: (-o)(ConnectTimeout=5)
&lt;10.0.91.104&gt; SSH: PlayContext set ssh_common_args: ()
&lt;10.0.91.104&gt; SSH: PlayContext set ssh_extra_args: ()
&lt;10.0.91.104&gt; SSH: found only ControlPersist; added ControlPath: (-o)(ControlPath=/home/fvant/.ansible/cp/ansible-ssh-%h-%p-%r)
&lt;10.0.91.104&gt; SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o 'IdentityFile="./vars/keys/ansible_id_rsa"' -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=root -o ConnectTimeout=5 -o ControlPath=/home/fvant/.ansible/cp/ansible-ssh-%h-%p-%r 10.0.91.104 '/bin/sh -c '"'"'chmod u+x /tmp/ansible-tmp-1474979078.18-42020272005162/ /tmp/ansible-tmp-1474979078.18-42020272005162/setup.py &amp;&amp; sleep 0'"'"''
&lt;10.0.91.104&gt; ESTABLISH SSH CONNECTION FOR USER: root
&lt;10.0.91.104&gt; SSH: ansible.cfg set ssh_args: (-C)(-o)(ControlMaster=auto)(-o)(ControlPersist=60s)
&lt;10.0.91.104&gt; SSH: ANSIBLE_HOST_KEY_CHECKING/host_key_checking disabled: (-o)(StrictHostKeyChecking=no)
&lt;10.0.91.104&gt; SSH: ANSIBLE_PRIVATE_KEY_FILE/private_key_file/ansible_ssh_private_key_file set: (-o)(IdentityFile="./vars/keys/ansible_id_rsa")
&lt;10.0.91.104&gt; SSH: ansible_password/ansible_ssh_pass not set: (-o)(KbdInteractiveAuthentication=no)(-o)(PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey)(-o)(PasswordAuthentication=no)
&lt;10.0.91.104&gt; SSH: ANSIBLE_REMOTE_USER/remote_user/ansible_user/user/-u set: (-o)(User=root)
&lt;10.0.91.104&gt; SSH: ANSIBLE_TIMEOUT/timeout set: (-o)(ConnectTimeout=5)
&lt;10.0.91.104&gt; SSH: PlayContext set ssh_common_args: ()
&lt;10.0.91.104&gt; SSH: PlayContext set ssh_extra_args: ()
&lt;10.0.91.104&gt; SSH: found only ControlPersist; added ControlPath: (-o)(ControlPath=/home/fvant/.ansible/cp/ansible-ssh-%h-%p-%r)
&lt;10.0.91.104&gt; SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o 'IdentityFile="./vars/keys/ansible_id_rsa"' -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=root -o ConnectTimeout=5 -o ControlPath=/home/fvant/.ansible/cp/ansible-ssh-%h-%p-%r -tt 10.0.91.104 '/bin/sh -c '"'"'/usr/bin/python /tmp/ansible-tmp-1474979078.18-42020272005162/setup.py; rm -rf "/tmp/ansible-tmp-1474979078.18-42020272005162/" &gt; /dev/null 2&gt;&amp;1 &amp;&amp; sleep 0'"'"''
mng-a-sandbox01 | SUCCESS =&gt; {
    "ansible_facts": {
        "ansible_architecture": "x86_64", 
        "ansible_cmdline": {
            "BOOT_IMAGE": "/boot/vmlinuz-3.10.0-327.10.1.el7.x86_64", 
            "LANG": "en_US.UTF-8", 
            "console": "ttyS0,115200", 
            "crashkernel": "auto", 
            "ro": true, 
            "root": "UUID=ef6ba050-6cdc-416a-9380-c14304d0d206"
        }, 

&lt;/snip&gt;
</code></pre></div>

<h5 dir="auto">EXPECTED RESULTS</h5>

<h5 dir="auto">ACTUAL RESULTS</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ansible-playbook  playbooks/main.yml -e env=mng --ask-vault-pass -e account=playground -vvvvvvvvv

Loading callback plugin default of type stdout, v2.0 from /home/fvant/ansible/lib/ansible/plugins/callback/__init__.pyc
Loading callback plugin profile_tasks of type aggregate, v2.0 from /home/fvant/ansible/lib/ansible/plugins/callback/__init__.pyc

PLAYBOOK: main.yml *************************************************************
11 plays in playbooks/main.yml

PLAY [mng] *********************************************************************

TASK [setup] *******************************************************************
Tuesday 27 September 2016  14:19:31 +0200 (0:00:00.177)       0:00:01.441 ***** 
Using module file /home/fvant/ansible/lib/ansible/modules/core/system/setup.py
&lt;10.0.91.104&gt; ESTABLISH SSH CONNECTION FOR USER: root
&lt;10.0.91.104&gt; SSH: ansible.cfg set ssh_args: (-C)(-o)(ControlMaster=auto)(-o)(ControlPersist=60s)
&lt;10.0.91.104&gt; SSH: ANSIBLE_HOST_KEY_CHECKING/host_key_checking disabled: (-o)(StrictHostKeyChecking=no)
&lt;10.0.91.104&gt; SSH: ANSIBLE_PRIVATE_KEY_FILE/private_key_file/ansible_ssh_private_key_file set: (-o)(IdentityFile=&quot;./vars/keys/ansible_id_rsa&quot;)
&lt;10.0.91.104&gt; SSH: ansible_password/ansible_ssh_pass not set: (-o)(KbdInteractiveAuthentication=no)(-o)(PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey)(-o)(PasswordAuthentication=no)
&lt;10.0.91.104&gt; SSH: ANSIBLE_REMOTE_USER/remote_user/ansible_user/user/-u set: (-o)(User=root)
&lt;10.0.91.104&gt; SSH: ANSIBLE_TIMEOUT/timeout set: (-o)(ConnectTimeout=5)
&lt;10.0.91.104&gt; SSH: PlayContext set ssh_common_args: ()
&lt;10.0.91.104&gt; SSH: PlayContext set ssh_extra_args: ()
&lt;10.0.91.104&gt; SSH: found only ControlPersist; added ControlPath: (-o)(ControlPath=/home/fvant/.ansible/cp/ansible-ssh-%h-%p-%r)
&lt;10.0.91.104&gt; SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o 'IdentityFile=&quot;./vars/keys/ansible_id_rsa&quot;' -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=root -o ConnectTimeout=5 -o ControlPath=/home/fvant/.ansible/cp/ansible-ssh-%h-%p-%r 10.0.91.104 '/bin/sh -c '&quot;'&quot;'( umask 77 &amp;&amp; mkdir -p &quot;` echo /tmp/ansible-tmp-1474978771.34-100536752987114 `&quot; &amp;&amp; echo ansible-tmp-1474978771.34-100536752987114=&quot;` echo /tmp/ansible-tmp-1474978771.34-100536752987114 `&quot; ) &amp;&amp; sleep 0'&quot;'&quot;''
fatal: [mng-a-sandbox01]: UNREACHABLE! =&gt; {
    &quot;changed&quot;: false, 
    &quot;msg&quot;: &quot;Failed to connect to the host via ssh.&quot;, 
    &quot;unreachable&quot;: true
}"><pre class="notranslate"><code class="notranslate">ansible-playbook  playbooks/main.yml -e env=mng --ask-vault-pass -e account=playground -vvvvvvvvv

Loading callback plugin default of type stdout, v2.0 from /home/fvant/ansible/lib/ansible/plugins/callback/__init__.pyc
Loading callback plugin profile_tasks of type aggregate, v2.0 from /home/fvant/ansible/lib/ansible/plugins/callback/__init__.pyc

PLAYBOOK: main.yml *************************************************************
11 plays in playbooks/main.yml

PLAY [mng] *********************************************************************

TASK [setup] *******************************************************************
Tuesday 27 September 2016  14:19:31 +0200 (0:00:00.177)       0:00:01.441 ***** 
Using module file /home/fvant/ansible/lib/ansible/modules/core/system/setup.py
&lt;10.0.91.104&gt; ESTABLISH SSH CONNECTION FOR USER: root
&lt;10.0.91.104&gt; SSH: ansible.cfg set ssh_args: (-C)(-o)(ControlMaster=auto)(-o)(ControlPersist=60s)
&lt;10.0.91.104&gt; SSH: ANSIBLE_HOST_KEY_CHECKING/host_key_checking disabled: (-o)(StrictHostKeyChecking=no)
&lt;10.0.91.104&gt; SSH: ANSIBLE_PRIVATE_KEY_FILE/private_key_file/ansible_ssh_private_key_file set: (-o)(IdentityFile="./vars/keys/ansible_id_rsa")
&lt;10.0.91.104&gt; SSH: ansible_password/ansible_ssh_pass not set: (-o)(KbdInteractiveAuthentication=no)(-o)(PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey)(-o)(PasswordAuthentication=no)
&lt;10.0.91.104&gt; SSH: ANSIBLE_REMOTE_USER/remote_user/ansible_user/user/-u set: (-o)(User=root)
&lt;10.0.91.104&gt; SSH: ANSIBLE_TIMEOUT/timeout set: (-o)(ConnectTimeout=5)
&lt;10.0.91.104&gt; SSH: PlayContext set ssh_common_args: ()
&lt;10.0.91.104&gt; SSH: PlayContext set ssh_extra_args: ()
&lt;10.0.91.104&gt; SSH: found only ControlPersist; added ControlPath: (-o)(ControlPath=/home/fvant/.ansible/cp/ansible-ssh-%h-%p-%r)
&lt;10.0.91.104&gt; SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o 'IdentityFile="./vars/keys/ansible_id_rsa"' -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=root -o ConnectTimeout=5 -o ControlPath=/home/fvant/.ansible/cp/ansible-ssh-%h-%p-%r 10.0.91.104 '/bin/sh -c '"'"'( umask 77 &amp;&amp; mkdir -p "` echo /tmp/ansible-tmp-1474978771.34-100536752987114 `" &amp;&amp; echo ansible-tmp-1474978771.34-100536752987114="` echo /tmp/ansible-tmp-1474978771.34-100536752987114 `" ) &amp;&amp; sleep 0'"'"''
fatal: [mng-a-sandbox01]: UNREACHABLE! =&gt; {
    "changed": false, 
    "msg": "Failed to connect to the host via ssh.", 
    "unreachable": true
}
</code></pre></div>