I´ve installed everything by the book to start with Ansible, but when I´m trying to test ansible connection
with command:
The target machine LinuxMint machine is unreachable
Labb
Rocky 8.5 - Controller
LinuxMint 20.3 - Target
RedHat 8 -Target
Host-file on Rocky:
Error message (Target Machine Redhat is giving error message on DNS name, maybe because none of the machines are domain joined?):
I really appreciate your answer
with command:
ansible linuxclients -m ping
The target machine LinuxMint machine is unreachable
Labb
Rocky 8.5 - Controller
LinuxMint 20.3 - Target
RedHat 8 -Target
Host-file on Rocky:
[linuxclients]
LinuxMint
123.458.78.910
RedHat
123.458.78.911
ansible linuxclients -m ping
Error message (Target Machine Redhat is giving error message on DNS name, maybe because none of the machines are domain joined?):
RedHat | UNREACHABLE! => {
"changed": false,
"msg": "Failed to connect to the host via ssh: ssh: Could not resolve hostname redhat: Name or service not known",
"unreachable": true
}
LinuxMint | UNREACHABLE! => {
"changed": false,
"msg": "Failed to connect to the host via ssh: ssh: Could not resolve hostname linuxmint: Name or service not known",
"unreachable": true
}
123.458.78.910 | UNREACHABLE! => {
"changed": false,
"msg": "Failed to connect to the host via ssh: [email protected]: Permission denied (publickey,password).",
"unreachable": true
}
Enter passphrase for key '/root/.ssh/id_rsa':
123.458.78.911| SUCCESS => {
"ansible_facts": {
"discovered_interpreter_python": "/usr/libexec/platform-python"
},
"changed": false,
"ping": "pong"
}
I really appreciate your answer
Last edited: