On 22.08.2019 17:49, Steven Williams wrote:
---

- name: show version and other user level commands

  hosts: IOL_Routers

  gather_facts: false

  connection: network_cli

  become: yes


  tasks:

    - name: run multiple commands on remote nodes

      ios_command:

        commands:

          - show run

          - show ip int br


      register: print_output


    - debug: var=print_output.stdout_lines


You can filter them out after the fact at least

For only ! lines
  {{ print_output.stdout_lines | reject('equalto', '!') | list }}

All lines starting with !
  {{ print_output.stdout_lines | reject('search', '^!') | list }}

--
Kai Stian Olstad

--
You received this message because you are subscribed to the Google Groups "Ansible 
Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/84408ad3ef9325074a0df33f9fe732d6%40olstad.com.

Reply via email to