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.

Luca Berton
5 min readMay 17, 2022

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.

--

--

Luca Berton
Luca Berton

Written by Luca Berton

I help creative Automation DevOps, Cloud Engineer, System Administrator, and IT Professional to succeed with Ansible Technology to automate more things everyday

No responses yet