Member-only story
Ansible troubleshooting — VMware Unknown error while connecting to vCenter or ESXi
Let’s troubleshoot together the Ansible fatal error “Unknown error while connecting to vCenter or ESXi API, [Errno -2] Name or service not known” to find the root cause, misspelled hostname in your Ansible Playbook, a connection problem connecting eventually using a secure VPN connection and successfully run our Ansible For VMware Playbook code.
Today we’re going to talk about Ansible troubleshooting, specifically about the “Unknown error while connecting to vCenter or ESXi API, [Errno -2] Name or service not known” message and enable Ansible For VMware.
This fatal error message happens when the Ansible controller is not able to connect to your VMware Infrastructure. The root cause might be a misspelled hostname in your Ansible Playbook, a connection problem connecting eventually using a secure VPN connection, or a configuration on the firewall on the target host.