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:
Dag Wieers 2017-06-28 19:08:04 +01:00 committed by Matt Davis
commit 5be32aa5af
4 changed files with 117 additions and 56 deletions

View file

@ -23,15 +23,31 @@
- name: assert the ping worked
assert:
that:
- "result.changed == false"
- "result.ping == 'pong'"
- not result|failed
- not result|changed
- result.ping == 'pong'
- name: ping with data
ping: data="testing"
ping:
data: testing
register: result
- name: assert the ping worked with data
assert:
that:
- "result.changed == false"
- "result.ping == 'testing'"
- not result|failed
- not result|changed
- result.ping == 'testing'
- name: ping with data=crash
ping:
data: crash
register: result
ignore_errors: yes
- name: assert the ping failed with data=boom
assert:
that:
- result|failed
- not result|changed
- "'Exception: boom' in result.module_stderr"