mirror of https://github.com/ansible/ansible.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
702 B
YAML
27 lines
702 B
YAML
4 years ago
|
- 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
|