Basic Ansible Ping Module Question

79 views
Skip to first unread message

jerewrig12345

unread,
Mar 19, 2017, 6:29:48 PM3/19/17
to Ansible Project
I'm just learning the Ansible basics in my lab. I have an Ansible VM that can't ping my virtual router. I have purposely shutdown the router interface for testing. Even though the router is down, the Ansible ping module makes it appear as if it is up. I thought this was designed to quickly check if my hosts were reachable via ssh but I could be wrong. What is this module really doing? Yes I'm new to this so apologies in advance for the basic questions. Thanks!

@ubuntu:~/jw-ansible$ ansible --version

ansible 2.2.1.0

  config file = /home/jeremywright/jw-ansible/ansible.cfg

  configured module search path = ['/usr/share/ansible']


jeremywright@ubuntu:~/jw-ansible$ ping 192.168.7.56

PING 192.168.7.56 (192.168.7.56) 56(84) bytes of data.

^C

--- 192.168.7.56 ping statistics ---

3 packets transmitted, 0 received, 100% packet loss, time 2010ms


jeremywright@ubuntu:~/jw-ansible$ ansible -i hosts 1000v -m ping

192.168.7.56 | SUCCESS => {

    "changed": false, 

    "ping": "pong"

}

Dick Davies

unread,
Mar 20, 2017, 4:38:15 AM3/20/17
to ansible list
Ansibles ping: task checks the host is 'manageable' - that login
works, python is recent enough and can generate json.

If the host is unreachable that sounds unlikely. Can you SSH to it?
> --
> 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.
> To post to this group, send email to ansible...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/3637d0a1-0bc0-49fd-817f-855483ea66a1%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages