ansible.windows.win_ping (2.3.0) — module

A windows version of the classic ping module

Authors: Chris Church (@cchurch)

Install collection

Install with ansible-galaxy collection install ansible.windows:==2.3.0


Add to requirements.yml

  collections:
    - name: ansible.windows
      version: 2.3.0

Description

Checks management connectivity of a windows host.

This is NOT ICMP ping, this is just a trivial test module.

For non-Windows targets, use the M(ansible.builtin.ping) module instead.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
# Test connectivity to a windows host
# ansible winserver -m ansible.windows.win_ping

- name: Example from an Ansible Playbook
  ansible.windows.win_ping:
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Induce an exception to see what happens
  ansible.windows.win_ping:
    data: crash

Inputs

    
data:
    default: pong
    description:
    - Alternate data to return instead of 'pong'.
    - If this parameter is set to C(crash), the module will cause an exception.
    type: str

Outputs

ping:
  description: Value provided with the data parameter.
  returned: success
  sample: pong
  type: str

See also