# ping is not working

**URL:** <https://forum.ansible.com/t/ping-is-not-working/30336>\
**Category:** Ansible Project\
**Created:** [May 15, 2019, 9:34am UTC](https://forum.ansible.com/t/ping-is-not-working/30336 "2019-05-15T09:34:43Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ebrahim\_Kutty](https://avatars.discourse-cdn.com/v4/letter/e/c0e974/32.png) [@Ebrahim\_Kutty](https://forum.ansible.com/u/Ebrahim_Kutty)\
**Post date:** [May 15, 2019, 9:34am UTC](https://forum.ansible.com/t/ping-is-not-working/30336/1 "2019-05-15T09:34:43Z")

</div>

When I test ping command with ansible, I am getting the below error, (red colored)

/etc/ansible$ more hosts  
[root@192.168.100.128](mailto:root@192.168.100.128)

/etc/ansible$ more ansible.cfg  
[defaults]  
remote\_tmp = /tmp/ansible-$USER  
#remote\_tmp = $HOME/.ansible/tmp  
local\_tmp = $HOME/.ansible/tmp

---

<div class="post-metadata">

**Author:** ![Kai\_Stian\_Olstad](https://avatars.discourse-cdn.com/v4/letter/k/e19adc/32.png) [@Kai\_Stian\_Olstad](https://forum.ansible.com/u/Kai_Stian_Olstad)\
**Post date:** [May 15, 2019, 12:57pm UTC](https://forum.ansible.com/t/ping-is-not-working/30336/2 "2019-05-15T12:57:04Z")

</div>

This is not correct inventory syntax  
[https://docs.ansible.com/ansible/latest/user\_guide/intro\_inventory.html](https://docs.ansible.com/ansible/latest/user_guide/intro_inventory.html)

look at the ansible\_user in the link

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/ansible/original/1X/1882d9a01da5d8996a862359b0913cc568a39b84.svg) [@system](https://forum.ansible.com/u/system)\
**Post date:** [May 15, 2019, 3:04pm UTC](https://forum.ansible.com/t/ping-is-not-working/30336/3 "2019-05-15T15:04:05Z")

</div>

The error suggests your target has a very old version of python `with`  
was introduced in Python 2.6 (iirc), which is the minimum supported by  
current versions of Ansible.  
Support for older versions of Python was dropped in Ansible 2.4.

You probably need to upgrade the python on the target and/or point to  
a newer version via ansible\_python\_inteprteter

@kai, user@host is valid inventory syntax, it is not something we  
recommend but it does work.

---

<div class="post-metadata">

**Author:** ![Ebrahim\_Kutty](https://avatars.discourse-cdn.com/v4/letter/e/c0e974/32.png) [@Ebrahim\_Kutty](https://forum.ansible.com/u/Ebrahim_Kutty)\
**Post date:** [May 16, 2019, 6:59am UTC](https://forum.ansible.com/t/ping-is-not-working/30336/4 "2019-05-16T06:59:09Z")

</div>

Yes, it is correct. the python version on the target is 2.4.

Thanks for your valuable answer.

---

<div class="post-metadata">

**Author:** ![Shan\_Mugarajan](https://avatars.discourse-cdn.com/v4/letter/s/e19b73/32.png) [@Shan\_Mugarajan](https://forum.ansible.com/u/Shan_Mugarajan)\
**Post date:** [May 16, 2019, 7:02am UTC](https://forum.ansible.com/t/ping-is-not-working/30336/5 "2019-05-16T07:02:20Z")

</div>

Make sure your are typing the password as the authentication mechanism may be keyboard interactive for the ssh user by passing -k option when running the command
