Reputation: 91
I have previously used the vmware_tools connection type with ansible. However, recently I've been noticing that it is failing with some HTTPSConnection errors seen below.
`TASK [Gathering Facts] ************************
Friday 28 October 2022 20:11:54 -0400 (0:00:00.011) 0:00:00.011
ok: [linux1]
ok: [linux2]
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: requests.exceptions.ConnectionError: HTTPSConnectionPool(host='akr-r730-05.stec.local', port=443): Max retries exceeded with url: /guestFile?id=696&token=523abf8b-8bc0-d71b-b844-2fc62de4af59696 (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7fbb51d0e460>: Failed to establish a new connection: [Errno -2] Name or service not known'))
fatal: [windows1]: FAILED! => {"msg": "Unexpected failure during module execution.", "stdout": ""}
`
This is an exact duplicate of the issue in https://stackoverflow.com/questions/71648710. However, they decided to answer it by saying 'Why would you want to use it?' and I don't have enough points to comment. I know I'm not supposed to ask questions that have already been asked, but it got marked as answered, and the answer was a question.
The reasons:
I'm curious if anyone else has encountered this, or if anyone has any information on how it might be corrected.
This happens intermittently sometimes, sometimes it always happens in the same place on the playbook. It's not always during fact gathering.
Upvotes: 2
Views: 514
Reputation: 91
I hadn't noticed that my connection url was linking to the host, and not the vCenter server. The system that I began running this on did not have the hosts entries that my local workstation did.
Upon updating the hosts file, the connection attempts, it still times out, but I think it might be related to network restrictions.
Upvotes: 0