# Error doing ansible ping on VM

**URL:** <https://forum.ansible.com/t/error-doing-ansible-ping-on-vm/24587>\
**Category:** Ansible Project\
**Tags:** ubuntu\
**Created:** [May 28, 2017, 3:33pm UTC](https://forum.ansible.com/t/error-doing-ansible-ping-on-vm/24587 "2017-05-28T15:33:57Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bob\_Nian](https://avatars.discourse-cdn.com/v4/letter/b/5e9695/32.png) [@Bob\_Nian](https://forum.ansible.com/u/Bob_Nian)\
**Post date:** [May 28, 2017, 3:33pm UTC](https://forum.ansible.com/t/error-doing-ansible-ping-on-vm/24587/1 "2017-05-28T15:33:57Z")

</div>

I am running CentOS on my bare-metal installation of esxi 6.5 host . While I am able to do ansible ping to my esxi 6.5 host from my Master Node that’s running Ubuntu, I am unable to do ansible ping my CentOS using ‘ansible -m ping all’ even though I am being able to do normal ssh from my CentOS to my Master Node and from Master Node to CentOS.

**Host file**  
esxi-host  
[root@192.168.1.10](mailto:root@192.168.1.10)

**Output after running ‘ansible -m ping all’**

esxi-host | SUCCESS =\> {  
“changed”: false,  
“ping”: “pong”  
}  
[root@192.168.1.10](mailto:root@192.168.1.10) | FAILED! =\> {  
“failed”: true,  
“msg”: “failed to transfer file to /root/.ansible/tmp/ansible-tmp-1495975641.67-89953239612864/ping.py:\n\nssh: Could not resolve hostname 192.168.1.10]: Name or service not known\r\nlost connection\n”  
}

Even after trying to put scp\_if\_ssh=True on my ansible.cfg, this still happen. Any help would be appreciated!
