1. did you try the --ask-pass command line option?
2. ssh keys are preferable to passwords, configure those first instead.
http://docs.ansible.com/ansible/intro_adhoc.html
On Wednesday, June 29, 2016 at 10:42:33 PM UTC+2, Hornbachner Simon wrote:
>
> 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
--
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/1b3f162b-5c73-486a-a95a-2d39ee6389ec%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.