---
- name: "Run command and parse with textfsm {{ parser }}"
  ansible.utils.cli_parse:
    command: "ifconfig"
    parser:
      name: ansible.utils.textfsm
    ansible.builtin.set_fact: myfact
  register: ifconfig_out

- name: "Check parser output {{ parser }}"
  ansible.builtin.assert:
    that: "{{ item }}"
  with_items:
    - "{{ myfact is defined }}"
    - "{{ ifconfig_out['stdout'] is defined }}"
    - "{{ ifconfig_out['stdout_lines'] is defined }}"
    - "{{ ifconfig_out['parsed'] is defined }}"
    - "{{ ifconfig_out['parsed'][0]['Interface'] is defined }}"
