ping - Try to connect to host, verify a usable python and return pong on success


  • A trivial test module, this module always returns pong on successful contact. It does not make sense in playbooks, but it is useful from /usr/bin/ansible to verify the ability to login and that a usable python is configured.
  • This is NOT ICMP ping, this is just a trivial test module.
  • For Windows targets, use the ping module instead.


parameter required default choices comments
no pong
Data to return for the ping return value.
If this parameter is set to crash, the module will cause an exception.


# 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

Return Values

Common return values are documented here Return Values, the following are the fields unique to this module:

name description returned type sample
value provided with the data parameter
success string pong



  • For Windows targets, use the ping module instead.


This module is flagged as stableinterface which means that the maintainers for this module guarantee that no backward incompatible interface changes will be made.

Maintenance Info

For more information about Red Hat’s this support of this module, please refer to this knowledge base article<https://access.redhat.com/articles/rhel-top-support-policies>

For help in developing on modules, should you be so inclined, please read Community Information & Contributing, Testing Ansible and Developing Modules.

© 2012–2017 Michael DeHaan
© 2017 Red Hat, Inc.
Licensed under the GNU General Public License version 3.