Hello Community,
I have created a Centos host in Azure and added the hosts to my Ansible inventory, however whenever I attempt to ping the host with ansible, from Azure Cloud Shell I get the error shown in image.
However, I can connect to the same host with ssh:
I have been trying to get this to work for two days now.
Im running Ansible version 2.4.3
Any guide (I mean any guide) will be greatly appreciated.
Cheers
Carlton
HI Bro,
Let me know if this helps you, because the same was bugging me and i took backup of authorized_keys file and removed it.
After that, I have ssh-copy-id user@remote_host (copied the ssh keys), then tried to ping which worked for me.
Thanks,
rajesh.
Hi Raj,
I’m new to this forum. I can’t actually see your answer?
Bro,
I tried your suggestion, but I still can’t ping with ansible… Do you have any other suggestions?
By default Azure VMs do not answer pings (Microsoft blocks that). So this is not ansible’s fault. Use something else to “ping” your VM instead.