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 djeyewater@192.168.127.28 -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?