# ansible ping failure

**URL:** <https://forum.ansible.com/t/ansible-ping-failure/26752>\
**Category:** Ansible Project\
**Created:** [February 15, 2018, 10:04pm UTC](https://forum.ansible.com/t/ansible-ping-failure/26752 "2018-02-15T22:04:01Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![0x4e6f43\_676573](https://avatars.discourse-cdn.com/v4/letter/0/7ab992/32.png) [@0x4e6f43\_676573](https://forum.ansible.com/u/0x4e6f43_676573)\
**Post date:** [February 15, 2018, 10:04pm UTC](https://forum.ansible.com/t/ansible-ping-failure/26752/1 "2018-02-15T22:04:01Z")

</div>

\*\*\* New to ansible & linux \*\*\*

I’ve installed ansible on a ZorinOS vm and am attempting (with no luck) to ping a host in the /etc/ansible/hosts file. I can ssh to the host and can also scp files from ansible to the host. Got to be a simple fix…

ZorinOS version: 12  
Ansible version: 2.4.3.0  
Python version: 2.7.12

zorinOs:~$ ansible all -m ping  
192.168.146.129 | FAILED! =\> {  
“changed”: false,  
“module\_stderr”: “Shared connection to 192.168.146.129 closed.\r\n”,  
“module\_stdout”: “/bin/sh: 1: /usr/bin/python: not found\r\n”,  
“msg”: “MODULE FAILURE”,  
“rc”: 0  
}

I also have the verbose output that I can share, if necessary.

---

<div class="post-metadata">

**Author:** ![sivel](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/sivel/32/1198_2.png) [@sivel](https://forum.ansible.com/u/sivel)\
**Post date:** [February 15, 2018, 10:26pm UTC](https://forum.ansible.com/t/ansible-ping-failure/26752/2 "2018-02-15T22:26:08Z")

</div>

The ping module is a full round trip test for ansible (not ICMP). It attempts to ssh to the host, invoke python on the remote host, use the python JSON module to return data.

Looking at the error, your remote host is missing python at `/usr/bin/python`. You may either need to install python on the remote host, which can be accomplished with the `raw` module (potentially). Or if python is already installed, but in a different location, you will need to set the `ansible_python_interpreter` variable for that host, pointing to the correct python binary.

---

<div class="post-metadata">

**Author:** ![0x4e6f43\_676573](https://avatars.discourse-cdn.com/v4/letter/0/7ab992/32.png) [@0x4e6f43\_676573](https://forum.ansible.com/u/0x4e6f43_676573)\
**Post date:** [February 15, 2018, 10:50pm UTC](https://forum.ansible.com/t/ansible-ping-failure/26752/3 "2018-02-15T22:50:13Z")

</div>

Matt,  
You’re correct. I was looking at the error message and had the same realization that i probably needed to install python on the remote host. After checking the python version on the remote host i found that python2 wasnt installed. installed, tested and passed.
