Ping my virtual machine through Ansible

Been wondering, since I’m new to Ansible, I am trying to ping my Virtual Machine which is running on a Bare-Metal ESXI 6.5 using Ansible’s ’ ansible ping -m <vm’s IP>’ but it seems unsuccessful even though I am able to ping the host itself which is the ESXI. Any idea on how to let Ansible detect my VM? Do I need to install pfSense and create WAN/LAN (I only have 1 nic though) to allow connections? Any help would be appreciated, thanks!

Hi Bob,

What happens if you do ‘ssh ’? Do you still need to provide a password?

Ping in this module is not the ping we are used to use, it just establishes a connection and returns ‘pong’ if all is working. It is not doing an ICMP ping (which I think you are expecting).

Yes, I am aware that the ansible ping is not the normally ping we do. Tried doing ssh , but it seems that the ssh port is not open and I’ll need to download the openssh-server package offline since I have no internet connection on my vm which is a pain in the butt. Thanks anyway.