ansible ssh error Unreachable.

ERROR: UNREACHABLE! => changed : false , msg:SSH error:data could not be sent to the remote host.Make sure this host can be reached over ssh", "unreachable": true

Hosts: [test] xxxxxx.local ansible_ssh_user=myname

ansible.cfg [defaults] host_key_checking = False

[ssh_connection] pipelining=true

I am running the playbook from Jenkins using execute shell `

ansible-playbook -i hosts playbook/app.yml

Ansible version 2.2.0.0

Often a credentials failure or naming failure rather than connectivity.

Check you can manually ssh to the target machine with the host name and username exactly as stated in your hosts file. And remove ssh pipelining to test if that's the issue.

I'm assuming you have set xxxxxx. to the name of a real server and "myname" to a real account on that server, right? :slight_smile:

Basically, debug this using the ping module and an adhoc command eg

ansible -m ping xxxxxx.whatever

and only go back to your playbook once that's working OK.

(Apologies for the multiple posts.)