ping – Try to connect to host, verify a usable python and return
pong on success¶
- A trivial test module, this module always returns
pongon successful contact. It does not make sense in playbooks, but it is useful from
/usr/bin/ansibleto verify the ability to login and that a usable Python is configured.
- This is NOT ICMP ping, this is just a trivial test module that requires Python on the remote-node.
- For Windows targets, use the win_ping module instead.
- For Network targets, use the net_ping module instead.
Data to return for the
If this parameter is set to
- net_ping – Tests reachability using ping from a network device
- The official documentation on the net_ping module.
- win_ping – A windows version of the classic ping module
- The official documentation on the win_ping module.
# Test we can logon to 'webservers' and execute python with json lib. # ansible webservers -m ping # Example from an Ansible Playbook - ping: # Induce an exception to see what happens - ping: data: crash
Common return values are documented here, the following are the fields unique to this module:
value provided with the data parameter