You are reading an unmaintained version of the Ansible documentation. Unmaintained Ansible versions can contain unfixed security vulnerabilities (CVE). Please upgrade to a maintained version. See the latest Ansible documentation.
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 win_ping module instead.
# 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
This module is flagged as stableinterface which means that the maintainers for this module guarantee that no backward incompatible interface changes will be made.
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>