mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-25 14:20:22 -07:00
Move ping and win_ping closer together (#26028)
So in an effort to verify if Windows modules are feature complete compared to the python equivalent, I stumbled upon these differences. This PR includes: - Add missing 'data' option from documentation - Simplify ping module - Update integration tests to test exception
This commit is contained in:
parent
56d33a2967
commit
5be32aa5af
4 changed files with 117 additions and 56 deletions
|
@ -25,7 +25,6 @@ ANSIBLE_METADATA = {'metadata_version': '1.0',
|
|||
'status': ['stableinterface'],
|
||||
'supported_by': 'core'}
|
||||
|
||||
|
||||
DOCUMENTATION = r'''
|
||||
---
|
||||
module: win_ping
|
||||
|
@ -38,11 +37,13 @@ description:
|
|||
options:
|
||||
data:
|
||||
description:
|
||||
- Alternate data to return instead of 'pong'
|
||||
default: 'pong'
|
||||
- Alternate data to return instead of 'pong'.
|
||||
- If this parameter is set to C(crash), the module will cause an exception.
|
||||
default: pong
|
||||
notes:
|
||||
- For non-Windows targets, use the M(ping) module instead.
|
||||
author: "Chris Church (@cchurch)"
|
||||
author:
|
||||
- Chris Church (@cchurch)
|
||||
'''
|
||||
|
||||
EXAMPLES = r'''
|
||||
|
@ -52,7 +53,15 @@ EXAMPLES = r'''
|
|||
# Example from an Ansible Playbook
|
||||
- win_ping:
|
||||
|
||||
# Induce a crash to see what happens
|
||||
# Induce an exception to see what happens
|
||||
- win_ping:
|
||||
data: crash
|
||||
'''
|
||||
|
||||
RETURN = '''
|
||||
ping:
|
||||
description: value provided with the data parameter
|
||||
returned: success
|
||||
type: string
|
||||
sample: pong
|
||||
'''
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue