I can connect to the remote host via ssh, but ansible fails to connect. I'm 
loading the key using ssh.

If I run:
ansible vm-to-deploy-to -m ping -e "ansible_ssh_port=15674" -e 
"ansible_ssh_user=djeyewater"

Result is:
192.168.127.28 | UNREACHABLE! => {
    "changed": false,
    "msg": "Authentication or permission failure. In some cases, you may 
have been able to authenticate and did not have permissions on the remote 
directory. Consider changing the remote temp path in ansible.cfg to a path 
rooted in \"/tmp\". Failed command was: ( umask 77 && mkdir -p \"` echo 
/tmp/provision/ansible-tmp-1498908230.64-195102459534727 `\" && echo 
ansible-tmp-1498908230.64-195102459534727=\"` echo 
/tmp/provision/ansible-tmp-1498908230.64-195102459534727 `\" ), exited with 
result 1",
    "unreachable": true
}

But if I connect manually:
ssh -C -vvv -o ControlMaster=auto -o ControlPersist=60s -o 
KbdInteractiveAuthentication=no -o 
PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey 
-o PasswordAuthentication=no -o ConnectTimeout=10 -o 
ControlPath=/home/vagrant/.ansible/cp/ansible-ssh-%h-%p-%r 
[email protected] -p 15674

 and run that failed command, all is OK:
$ umask 77 && mkdir -p \"` echo 
/tmp/provision/ansible-tmp-1498908230.64-195102459534727 `\" && echo 
ansible-tmp-1498908230.64-195102459534727=\"` echo 
/tmp/provision/ansible-tmp-1498908230.64-195102459534727 `\"
ansible-tmp-1498908230.64-195102459534727="/tmp/provision/ansible-tmp-1498908230.64-195102459534727"
$ echo $?
0


So not sure what's going wrong when I try to connect using ansible?

-- 
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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/2a113d07-7582-4d4b-84ff-396564f0c457%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to