Debian Codegraph @

test/support/windows-integration/plugins/modules/win_ping.py

raw
1 #!/usr/bin/python
2 # -*- coding: utf-8 -*-
3
4 # Copyright: (c) 2012, Michael DeHaan <[email protected]>, and others
5 # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
6
7 # this is a windows documentation stub. actual code lives in the .ps1
8 # file of the same name
9
10 ANSIBLE_METADATA = {'metadata_version': '1.1',
11 'status': ['stableinterface'],
12 'supported_by': 'core'}
13
14 DOCUMENTATION = r"""
15 ---
16 module: win_ping
17 version_added: "1.7"
18 short_description: A windows version of the classic ping module
19 description:
20 - Checks management connectivity of a windows host.
21 - This is NOT ICMP ping, this is just a trivial test module.
22 - For non-Windows targets, use the M(ping) module instead.
23 - For Network targets, use the M(net_ping) module instead.
24 options:
25 data:
26 description:
27 - Alternate data to return instead of 'pong'.
28 - If this parameter is set to C(crash), the module will cause an exception.
29 type: str
30 default: pong
31 seealso:
32 - module: ping
33 author:
34 - Chris Church (@cchurch)
35 """
36
37 EXAMPLES = r"""
38 # Test connectivity to a windows host
39 # ansible winserver -m win_ping
40
41 - name: Example from an Ansible Playbook
42 win_ping:
43
44 - name: Induce an exception to see what happens
45 win_ping:
46 data: crash
47 """
48
49 RETURN = r"""
50 ping:
51 description: Value provided with the data parameter.
52 returned: success
53 type: str
54 sample: pong
55 """