Note
This module is part of ansible-base
and included in all Ansible installations. In most cases, you can use the short module name ping even without specifying the collections:
keyword. Despite that, we recommend you use the FQCN for easy linking to the module documentation and to avoid conflicting with other collections that may have the same module name.
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.Parameter | Choices/Defaults | Comments |
---|---|---|
data string | Default: "pong" | Data to return for the ping return value.If this parameter is set to crash , the module will cause an exception. |
See also
The official documentation on the ansible.netcommon.net_ping module.
The official documentation on the ansible.windows.win_ping module.
# Test we can logon to 'webservers' and execute python with json lib. # ansible webservers -m ping - name: Example from an Ansible Playbook ping: - name: 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:
Key | Returned | Description |
---|---|---|
ping string | success | value provided with the data parameter Sample: pong |
© 2012–2018 Michael DeHaan
© 2018–2019 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/2.10/collections/ansible/builtin/ping_module.html