---

- 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

~                                              

ok: [R01] => {

    "print_output.stdout_lines": [

        [

            "Building configuration...", 

            "", 

            "Current configuration : 1037 bytes", 

            "!", 

            "! Last configuration change at 20:30:43 EET Wed Aug 21 2019", 

            "!", 

            "version 15.4", 

            "service timestamps debug datetime msec", 

            "service timestamps log datetime msec", 

            "no service password-encryption", 

            "!", 

            "hostname R1", 

            "!", 

            "boot-start-marker", 

            "boot-end-marker", 

            "!", 

            "aqm-register-fnf", 

            "!", 

            "!", 

            "no aaa new-model", 

            "clock timezone EET 2 0", 

            "mmi polling-interval 60", 

            "no mmi auto-configure", 

            "no mmi pvc", 

            "mmi snmp-timeout 180", 

            "!", 

            "!", 

            "!", 

            "!", 

            "!", 

            "!", 

            "", 

            "", 

            "!", 

            "!", 

            "!", 

            "!", 

            "ip domain name lab.net", 

            "ip cef", 

            "no ipv6 cef", 

            "!", 

            "multilink bundle-name authenticated", 

            "!", 

            "!", 

            "!", 

            "!", 

            "!", 

            "!", 

            "!", 

            "!", 

            "username cisco privilege 15 password 0 cisco", 

            "!", 

            "redundancy", 

            "!", 

            "!", 

            "! ", 

            "!", 

            "!", 

            "!", 

            "!", 

            "!", 

            "!", 

            "!", 

            "!", 

            "!", 

            "!", 

            "!", 

            "!", 

            "interface Ethernet0/0", 

            " ip address 10.20.250.100 255.255.255.0", 

            "!", 

            "interface Ethernet0/1", 

            " no ip address", 

            " shutdown", 

            "!", 

            "interface Ethernet0/2", 

            " no ip address", 

            " shutdown", 

            "!", 

            "interface Ethernet0/3", 

            " no ip address", 

            " shutdown", 

            "!", 

            "ip forward-protocol nd", 

            "!", 

            "!", 

            "no ip http server", 

            "no ip http secure-server", 

            "ip route 0.0.0.0 0.0.0.0 10.20.250.1", 

            "!", 

            "!", 

            "!", 

            "!", 

            "control-plane", 

            "!", 

            "!", 

            "!", 

            "!", 

            "!", 

            "!", 

            "!", 

            "!", 

            "line con 0", 

            " logging synchronous", 

            "line aux 0", 

            "line vty 0 4", 

            " login local", 

            " transport input all", 

            "!", 

            "!", 

            "end"

-- 
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/291d8680-b036-4c7d-ad46-a4bcad58aa93%40googlegroups.com.

Reply via email to