Configuration Management Tool

Ansible_user=UNREACHABLE {Failed to connect to the host via ssh: ssh: Could not resolve hostname (Name or service not known, unreachable true)

The following message below has a lot of errors (dependencies) associated.

Error: ansible_user=administrator | UNREACHABLE! => {
"changed": false, "msg": "Failed to connect to the host via ssh: ssh: Could not resolve hostname ansible_user=administrator: Name or service not known",
"unreachable": true

Note: The connection that is being initiated here is to a Windows machine.

Solution: To resolve this error, please follow the following steps below
– Ensure the inventory file is configured properly and ensure that the “ansible_connection=winrm” is included in your inventory. Domain authentication requires using krb5. On how to configure kerberos, see the following article

ansible_port = 5986

When this is configured correctly, the following error will disappear.
– Configure the remote host system to connect with the Ansible Control node. This will permit the connection between the Windows host system and the Ansible server.

For the differences between the NTLM and Kerberos, see the following article

For how a remote windows device is configured to support Ansible, see the following link

Notify of
Inline Feedbacks
View all comments
Would love your thoughts, please comment.x
Kindly subscribe to TechDirectArchive
This is default text for notification bar