community.openwrt.ping module – Verify ability to communicate with OpenWrt targets

Note

This module is part of the community.openwrt collection (version 0.5.0).

It is not included in ansible-core. To check whether it is installed, run ansible-galaxy collection list.

To install it, use: ansible-galaxy collection install community.openwrt.

To use it in a playbook, specify: community.openwrt.ping.

Synopsis

  • The community.openwrt.ping module tests the ability to log in to remote OpenWrt machines and execute commands.

  • This is a simple way to verify that your host is reachable and that you have valid credentials.

Note

This module has a corresponding action plugin.

Parameters

Parameter

Comments

data

any

Data to return in the ping response.

The special value crash causes the module to crash with an error.

Attributes

Attribute

Support

Description

check_mode

Support: full

This action does not modify state.

Can run in check_mode and return changed status prediction without modifying target.

diff_mode

Support: N/A

This action does not modify state.

Returns details on what has changed (or possibly needs changing in check_mode), when in diff mode.

platform

Platform: OpenWrt

Target platform for this module.

Notes

Note

  • This module is designed for OpenWrt devices without Python installed.

  • This module does not support check mode.

Examples

- name: Test connection to OpenWrt device
  community.openwrt.ping:

- name: Test with custom data
  community.openwrt.ping:
    data: hello

Return Values

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

Key

Description

data

any

The data that was sent to the module.

Returned: when data is provided

Sample: "hello"

ping

string

Response from the ping module.

Returned: always

Sample: "pong"

Authors

  • Markus Weippert (@gekmihesg)