Ahoy hoy Ansiblers,
I can't get Ansible to work from my Fedora 23 box. I don't have any
firewall running, but can't even connect to localhost. Doing ssh user@m
yhost manually works perfectly. And most interestingly, if I check the
SSH log, sshd says that it "accepted password for user" when I try the
ansible ping module. But ansible keeps insisting that the SSH
connection failed. I'm really out of ideas here. Can anyone help me?
Here's some (what I think as revelant) information.
[USER@MYHOST try-ansible]$ cat ansible-hosts
[localhost]
127.0.0.1
[USER@MYHOST try-ansible]$ cat /etc/redhat-release
Fedora release 23 (Twenty Three)
[USER@MYHOST try-ansible]$ ansible -i ansible-hosts localhost -m ping
-vvvv --ask-pass
Using /etc/ansible/ansible.cfg as config file
SSH password:
Loaded callback minimal of type stdout, v2.0
<127.0.0.1> ESTABLISH SSH CONNECTION FOR USER: None
<127.0.0.1> SSH: EXEC sshpass -d12 ssh -C -vvv -o ControlMaster=auto -o
ControlPersist=60s -o StrictHostKeyChecking=no -o ConnectTimeout=10 -o
ControlPath=$HOME/.ansible/cp/ansible-ssh-%C 127.0.0.1 '/bin/sh -c
'"'"'( umask 77 && mkdir -p "` echo $HOME/.ansible/tmp/ansible-tmp-
1467180026.69-79439094193283 `" && echo ansible-tmp-1467180026.69-
79439094193283="` echo $HOME/.ansible/tmp/ansible-tmp-1467180026.69-
79439094193283 `" ) && sleep 0'"'"''
127.0.0.1 | UNREACHABLE! => {
"changed": false,
"msg": "Failed to connect to the host via ssh.",
"unreachable": true
}
[USER@MYHOST try-ansible]$ sudo journalctl -xn -u sshd
Jun 29 08:38:51 MYHOST sshd[23839]: pam_succeed_if(sshd:auth): no
condition detected; module succeeded
Jun 29 08:38:51 MYHOST sshd[23839]: pam_sss(sshd:auth): authentication
success; logname= uid=0 euid=0 tty=ssh ruser= rhost=127.0.0.1
user=31100822
Jun 29 08:38:51 MYHOST sshd[23839]: pam_succeed_if(sshd:account): no
condition detected; module succeeded
Jun 29 08:38:51 MYHOST sshd[23839]: Accepted password for USER from
127.0.0.1 port 57864 ssh2
Thanks in advance,
Simon