blob: 165352aab89063fc3dd15b999446e088ff79b951 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
- name: ensure we clean module output well
hosts: localhost
gather_facts: false
tasks:
- name: call module that spews extra stuff
bad_json:
register: clean_json
ignore_errors: true
- name: all expected is there
assert:
that:
- clean_json is success
- clean_json is not changed
- "clean_json['msg'] == 'good json response'"
- name: all non wanted is not there
assert:
that:
- item not in clean_json.values()
loop:
- this stuff should be ignored
- [ looks like a json list]
- '[ looks like a json list]'
- ' looks like a json list'
- moar garbage
|