Ping Module : Why ansible wants to SSH to the server for which I am trying a ping?

305 views
Skip to first unread message

Suneel Gali

unread,
Jun 22, 2015, 7:46:53 AM6/22/15
to ansible...@googlegroups.com
Hi Team,

I just started working on ansible and using online documentation to try.

I just ran my first command : ansible all -m ping

Why ansible wants to SSH to the server for which I am trying ping?

It does not make sense (until I am missing some thing) to connect to the server when I just want to ping the server.

I added a Windows machine (the server is up and running) in the host file and the ping command failed on SSH.

If I am trying to run a command on remote server, SSH connection is required. Why for "ping"?


Thanks,
Suneel

Uwe Sauter

unread,
Jun 22, 2015, 7:50:59 AM6/22/15
to ansible...@googlegroups.com
The "ping" module is *NOT* Ansible trying to reach a host via ICMP message. Ansible will try to connect to the host via SSH and
execute the "ping" module which just generates a "pong" answer.
> --
> 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 ansible-proje...@googlegroups.com
> <mailto:ansible-proje...@googlegroups.com>.
> To post to this group, send email to ansible...@googlegroups.com <mailto:ansible...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/42379306-69cb-41e1-b408-7e480b460bf0%40googlegroups.com
> <https://groups.google.com/d/msgid/ansible-project/42379306-69cb-41e1-b408-7e480b460bf0%40googlegroups.com?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/d/optout.

Brian Coca

unread,
Jun 22, 2015, 8:10:42 AM6/22/15
to ansible...@googlegroups.com

The ping module is to verify that ansibl we can login to the host and has the base requirement s to execute modules. It is does not correspond to the ping networking tool (except a s a concept).

Reply all
Reply to author
Forward
0 new messages