# Ansible Playbook ssh connectivity fails only on a particular server

**URL:** <https://forum.ansible.com/t/ansible-playbook-ssh-connectivity-fails-only-on-a-particular-server/29600>\
**Category:** Ansible Project\
**Created:** [February 2, 2019, 6:12am UTC](https://forum.ansible.com/t/ansible-playbook-ssh-connectivity-fails-only-on-a-particular-server/29600 "2019-02-02T06:12:32Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Easy\_King](https://avatars.discourse-cdn.com/v4/letter/e/c2a13f/32.png) [@Easy\_King](https://forum.ansible.com/u/Easy_King)\
**Post date:** [February 2, 2019, 6:12am UTC](https://forum.ansible.com/t/ansible-playbook-ssh-connectivity-fails-only-on-a-particular-server/29600/1 "2019-02-02T06:12:32Z")

</div>

Below ansible-playbook connectivity works fine for all my servers except server2. Below command fails.

`  
ansible-playbook -vvvv /opt/test/scripts/Auto/site.yml -i /opt/test/scripts/Auto/hosts.txt -e “source\_host=server2 execmd=echo source\_user=user2”

`  
Output:

`<server2> (0, '', 'OpenSSH_7.7p1 (CentrifyDC build 5.5.1-395) , OpenSSL 1.0.2o-fips 27 Mar 2018\r\ndebug1: Reading configuration data /home/user1/.ssh/config\r\ndebug1: Reading configuration data /etc/centrifydc/ssh/ssh_config\r\ndebug1: /etc/centrifydc/ssh/ssh_config line 3: Applying options for *\r\ndebug1: auto-mux: Trying existing master\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug2: mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux_client_request_session: entering\r\ndebug3: mux_client_request_alive: entering\r\ndebug3: mux_client_request_alive: done pid = 57768\r\ndebug3: mux_client_request_session: session request sent\r\ndebug1: mux_client_request_session: master session id: 2\r\ndebug3: mux_client_read_packet: read header failed: Broken pipe\r\ndebug2: Received exit status from master 0\r\nShared connection to server2 closed.\r\n') fatal: [server2]: FAILED! => { "changed": false, "module_stderr": "OpenSSH_7.7p1 (CentrifyDC build 5.5.1-395) , OpenSSL 1.0.2o-fips 27 Mar 2018\r\ndebug1: Reading configuration data /home/user1/.ssh/config\r\ndebug1: Reading configuration data /etc/centrifydc/ssh/ssh_config\r\ndebug1: /etc/centrifydc/ssh/ssh_config line 3: Applying options for *\r\ndebug1: auto-mux: Trying existing master\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug2: mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux_client_request_session: entering\r\ndebug3: mux_client_request_alive: entering\r\ndebug3: mux_client_request_alive: done pid = 57768\r\ndebug3: mux_client_request_session: session request sent\r\ndebug1: mux_client_request_session: master session id: 2\r\ndebug3: mux_client_read_packet: read header failed: Broken pipe\r\ndebug2: Received exit status from master 2\r\nShared connection to server2 closed.\r\n", "module_stdout": "/home/user2/.ansible/tmp/ansible-tmp-1549081965.65-147775141838271/AnsiballZ_setup.py: line 3: _ANSIBALLZ_WRAPPER: command not found\r\n/home/user2/.ansible/tmp/ansible-tmp-1549081965.65-147775141838271/AnsiballZ_setup.py: line 4: syntax error near unexpected token`(‘\r\n/home/user2/.ansible/tmp/ansible-tmp-1549081965.65-147775141838271/AnsiballZ\_setup.py: line 4: `def \_ansiballz\_main():’\r\n",  
“msg”: “MODULE FAILURE\nSee stdout/stderr for the exact error”,  
“rc”: 2  
}  
to retry, use: --limit @/opt/test/scripts/Auto/site.retry

PLAY RECAP \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
server2 : ok=0 changed=0 unreachable=0 failed=1  
`

Source Ansible Server details:

`  
[user1@server1: Auto]$ uname -a  
Linux server1 3.10.0-957.el7.x86\_64 #1 SMP Thu Oct 4 20:48:51 UTC 2018 x86\_64 x86\_64 x86\_64 GNU/Linux

[user1@server1: Auto]$ ansible --version  
ansible 2.7.1  
config file = /etc/ansible/ansible.cfg  
configured module search path = [u’/home/user1/.ansible/plugins/modules’, u’/usr/share/ansible/plugins/modules’]  
ansible python module location = /usr/lib/python2.7/site-packages/ansible  
executable location = /bin/ansible  
python version = 2.7.5 (default, Sep 12 2018, 05:31:16) [GCC 4.8.5 20150623 (Red Hat 4.8.5-36)]

Ansible Host file details:  
tail -f /opt/test/scripts/Auto/hosts.txt  
[server2]  
server2 ansible\_ssh\_common\_args=“-t -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o ControlPersist=30m” ansible\_shell\_executable=/bin/bash ansible\_shell\_type=sh ANSIBLE\_HOST\_KEY\_CHECKING=false ansible\_python\_interpreter= ansible\_ssh\_private\_key\_file=/opt/test/scripts/ssh\_key/id\_rsa USER\_RUN=user2  
`

And now the Destination Server details:

`[user2@server2:~$](mailto:user2@server2:~$) uname -a SunOS server2 5.11 11.3 sun4v sparc sun4v [user2@server2:~$](mailto:user2@server2:~$) python --version Python 2.7.14`

Note: I wish to make changes only to my playbook and do not wish to change anything in ansible.cfg thus other playbooks should not be affected.

Can you please suggest how can I get this to work ?
