ansible.builtin.win_ping (v2.9.27) — module

A windows version of the classic ping module

| "added in version" 1.7 of ansible.builtin"

Authors: Chris Church (@cchurch)

stableinterface | supported by core

Install Ansible via pip

Install with pip install ansible==2.9.27

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(ping) module instead.

For Network targets, use the M(net_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 win_ping

- name: Example from an Ansible Playbook
  win_ping:
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Induce an exception to see what happens
  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