I'm not able to connect to a host in Ansible. This is the error:
192.168.1.12 | UNREACHABLE! => {
"changed": false,
"msg": "ERROR! SSH encountered an unknown error during the connection. We recommend you re-run the command using -vvvv, which
will enable SSH debugging output to help diagnose the issue",
"unreachable": true }
This is my hosts
file:
[test]
192.168.1.12
And this is the ad-hoc instruction:
ansible all -m ping
I'm able to connect via raw ssh
Best Answer
The error it returns says it all, the host is unreachable as ssh doesn't work. See what the ping command does in ansible:
If you can do raw ssh, doesn't ensure ansible can. You need to setup key based ssh or add passowrd option:
Ref: http://docs.ansible.com/ansible/intro_getting_started.html