I am creating a virtual machine using ansible. I received this error and do not know how to solve it. I am new student to both VMware and asnible. This is the error i received:
fatal: [localhost → localhost]: FAILED! => {“changed”: false, “msg”: “Unknown error while connecting to vCenter or ESXi API at vsecurity:443 : [Errno -3] Temporary failure in name resolution”}
Pleae your help is appreciated. I do not use a vcenter
You’re connecting to a host called ‘vsecurity’, but that doesn’t resolve to something.
At least not on the host you’re trying to run the playbook from.
Okay…thank you. I think now i am having a different error of certifiate.
fatal: [localhost → localhost]: FAILED! => {“changed”: false, “msg”: “Unable to connect to vCenter or ESXi API at vsecurity.com on TCP/443: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate has expired (_ssl.c:1123)”}
I tried to secure copy the rui.crt from vmware esxi via ssh to the ansible control node but it fails all the time.
You’re connecting to a host called ‘vsecurity’, but that doesn’t resolve to something.
At least not on the host you’re trying to run the playbook from.
Sure i will thanks. It is true, i am using the vmware_guest module where i ommited the validate certificate.
But now the problem has been with the dns.
when I test the management network, the hostname resolves to the dns, yet i ahve errors.
fatal: [localhost → localhost]: FAILED! => {“changed”: false, “msg”: “Unknown error while connecting to vCenter or ESXi API at vsecurity.localdomain:443 : [Errno -2] Name or service not known”}
Below is my commands…the control node is installed on the esxi