19 lines
518 B
YAML
19 lines
518 B
YAML
---
|
|
- name: "{{ parser }} Run command and parse with ttp"
|
|
ansible.utils.cli_parse:
|
|
command: "df -h"
|
|
parser:
|
|
name: ansible.utils.ttp
|
|
set_fact: myfact
|
|
register: df_h_out
|
|
|
|
- name: "{{ parser }} Check parser output"
|
|
assert:
|
|
that: "{{ item }}"
|
|
with_items:
|
|
- "{{ myfact is defined }}"
|
|
- "{{ df_h_out['stdout'] is defined }}"
|
|
- "{{ df_h_out['stdout_lines'] is defined }}"
|
|
- "{{ df_h_out['parsed'] is defined }}"
|
|
- "{{ df_h_out['parsed'][0][0][0]['Filesystem'] is defined }}"
|