2014-09-26 01:01:01 +00:00
|
|
|
#!/usr/bin/python
|
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
|
2018-02-25 02:09:54 +00:00
|
|
|
# Copyright: (c) 2012, Michael DeHaan <michael.dehaan@gmail.com>, and others
|
|
|
|
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
2014-09-26 01:01:01 +00:00
|
|
|
|
|
|
|
# this is a windows documentation stub. actual code lives in the .ps1
|
|
|
|
# file of the same name
|
|
|
|
|
2017-08-16 03:16:38 +00:00
|
|
|
ANSIBLE_METADATA = {'metadata_version': '1.1',
|
2017-03-14 16:07:22 +00:00
|
|
|
'status': ['stableinterface'],
|
|
|
|
'supported_by': 'core'}
|
|
|
|
|
2017-01-19 01:57:33 +00:00
|
|
|
DOCUMENTATION = r'''
|
2014-09-26 01:01:01 +00:00
|
|
|
---
|
|
|
|
module: win_ping
|
|
|
|
version_added: "1.7"
|
2017-06-26 15:26:53 +00:00
|
|
|
short_description: A windows version of the classic ping module
|
2014-09-26 01:01:01 +00:00
|
|
|
description:
|
2017-06-26 15:26:53 +00:00
|
|
|
- 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.
|
2018-01-17 14:02:06 +00:00
|
|
|
- For Network targets, use the M(net_ping) module instead.
|
2014-09-26 01:01:01 +00:00
|
|
|
options:
|
|
|
|
data:
|
|
|
|
description:
|
2017-06-28 18:08:04 +00:00
|
|
|
- Alternate data to return instead of 'pong'.
|
|
|
|
- If this parameter is set to C(crash), the module will cause an exception.
|
|
|
|
default: pong
|
2017-06-26 15:26:53 +00:00
|
|
|
notes:
|
|
|
|
- For non-Windows targets, use the M(ping) module instead.
|
2018-01-17 14:02:06 +00:00
|
|
|
- For Network targets, use the M(net_ping) module instead.
|
2017-06-28 18:08:04 +00:00
|
|
|
author:
|
|
|
|
- Chris Church (@cchurch)
|
2014-09-26 01:01:01 +00:00
|
|
|
'''
|
|
|
|
|
2017-01-19 01:57:33 +00:00
|
|
|
EXAMPLES = r'''
|
2014-09-26 01:01:01 +00:00
|
|
|
# Test connectivity to a windows host
|
2017-02-07 21:39:24 +00:00
|
|
|
# ansible winserver -m win_ping
|
2014-09-26 01:01:01 +00:00
|
|
|
|
|
|
|
# Example from an Ansible Playbook
|
2017-01-27 15:30:51 +00:00
|
|
|
- win_ping:
|
|
|
|
|
2017-06-28 18:08:04 +00:00
|
|
|
# Induce an exception to see what happens
|
2017-01-27 15:30:51 +00:00
|
|
|
- win_ping:
|
|
|
|
data: crash
|
2014-09-26 01:01:01 +00:00
|
|
|
'''
|
2017-06-28 18:08:04 +00:00
|
|
|
|
|
|
|
RETURN = '''
|
|
|
|
ping:
|
|
|
|
description: value provided with the data parameter
|
|
|
|
returned: success
|
|
|
|
type: string
|
|
|
|
sample: pong
|
|
|
|
'''
|