Hi,

I'm trying to connect to remote host through SSH and a Private Key to run a 
simple test to start working with Ansible to generate my inventories:

ansible -m ping -i hosts test1 -vvv


Hosts file have a simple configuration

[test]


test1 ansible_host=remote_host ansible_user=remote_user 
ansible_private_key_file=/var/jenkins_home/ansible/id_rsa

SSH is working fine to connect to remote server with this key:

jenkins@0bde7f6019a2:~/ansible$ ssh -i id_rsa remote_user@remote_host

Enter passphrase for key 'id_rsa': 

Last login: Fri Jul  5 12:10:51 2019 from jenkins.jenkins_net

While trying to do the connection with ansible seems to have problems I 
can't find or troubleshoot, the error indicates:

*test1 | UNREACHABLE! => {*

*    "changed": false, *

*    "msg": "Failed to connect to the host via ssh: Control socket 
connect(/var/jenkins_home/.ansible/cp/45a4bb8b49): Connection 
refused\r\nFailed to connect to new control master", *

*    "unreachable": true*

*}*


Any help will or advice be appreciated.


Best regards,

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/41557231-d666-4af9-9c1c-aedfc54fd0b9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to