Did ansible use login root for SSH connection? I think Ansible try to login
with your username, not root. Use «ansible_ssh_user» in inventory file, or
«--user» in ansible arguments, or «User» in ~/.ssh/config.
On Friday, July 15, 2016 at 12:55:01 PM UTC+5, Jörg Kastning wrote:
>
> Hello there,
>
> before executing the following commands I started a ssh-agent bash and
> added my private key.
>
> Running the command "ansible all -m ping" checks succeeded but one. For
> one host I got the following error:
> host1.example.com | UNREACHABLE! => {
> "changed": false,
> "msg": "SSH Error: data could not be sent to the remote host. Make
> sure this host can be reached over ssh",
> "unreachable": true
> }
>
> But when I run the following command in the same shell, the connection is
> successful:
> ssh [email protected]
>
> The section in my inventory file looks like:
> [host-group]
> host[1:2].example.com
> host-test.example.com
>
> Only host1 fails, the other two are checkt successfully.
>
> I use ansible 2.1.0.0 from EPEL-Repo with RHEL 7.2.
>
> Could someone explain to me what's wrong here?
>
> Kind regards,
> Joerg
>
--
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/4b49e790-653f-42fe-8973-fd8bdaf06bb0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.