---- hosts: alcatel  vars:    - ansible_network_os: nokia.sros.classic  vars_prompt:  connection: network_cli  gather_facts: No
  collections:  - nokia.sros
  tasks:  - name: Buscando status das portas    cli_command:      command: admin display-config    register: output1
  - name: show version    cli_command:      command: show port    register: output2

  - name: Configuracoes...    debug:      msg: |        {{output1.stdout_lines}}
  - name: Status das portas    debug:      msg: |        {{output2.stdout_lines}}...




root@lucas-VirtualBox:/etc/ansible/projects# ansible-playbook show_alcatel.yaml 
PLAY [alcatel] *************************************************************************************************************************************************************************************************************************************************
TASK [Buscando status das portas] ******************************************************************************************************************************************************************************************************************************ok: [192.168.1.98]
TASK [show version] ********************************************************************************************************************************************************************************************************************************************ok: [192.168.1.98]
TASK [Configuracoes...] ****************************************************************************************************************************************************************************************************************************************ok: [192.168.1.98] => {    "msg": [        "# TiMOS-B-12.0.R6 both/i386 ALCATEL SR 7750 Copyright (c) 2000-2014 Alcatel-Lucent.",        "",        "# All rights reserved. All use subject to applicable license agreements.",        "",        "# Built on Tue Sep 30 11:10:17 PDT 2014 by builder in /rel12.0/b1/R6/panos/main",        "",        "",        "# Generated MON JUN 21 01:01:17 2021 UTC",        "",        "exit all",        "configure",        "#--------------------------------------------------",        "echo \"System Configuration\"",        "#--------------------------------------------------",        "    system",        "        dns",        "        exit",        "        snmp",        "        exit",        "        time",        "            sntp",        "                shutdown",        "            exit",        "            zone UTC ",        "        exit",        "        thresholds",        "            rmon",        "            exit",        "        exit",        "    exit",        "#--------------------------------------------------",        "echo \"System Security Configuration\"",        "#--------------------------------------------------",        "    system",        "        security",        "            ssh",        "                preserve-key",        "                version 1-2",        "            exit",        "            no per-peer-queuing",        "            cpu-protection",        "                link-specific-rate max",        "                policy 254 create",        "                exit",        "                policy 255 create",        "                exit",        "                port-overall-rate 15000 ",        "            exit",        "        exit",        "    exit",        "#--------------------------------------------------",        "echo \"Log Configuration\"",        "#--------------------------------------------------",        "    log ",        "    exit ",        "#--------------------------------------------------",        "echo \"System Security Cpm Hw Filters and PKI Configuration\"",        "#--------------------------------------------------",        "    system",        "        security",        "        exit",        "    exit",        "#--------------------------------------------------",        "echo \"QoS Policy Configuration\"",        "#--------------------------------------------------",        "    qos",        "    exit",        "#--------------------------------------------------",        "echo \"Card Configuration\"",        "#--------------------------------------------------",        "    card 1",        "        card-type iom3-xp-b",        "        mda 1",        "            mda-type m5-1gb-sfp-b",        "            no shutdown",        "        exit",        "        no shutdown",        "    exit",        "#--------------------------------------------------",        "echo \"Port Configuration\"",        "#--------------------------------------------------",        "    port 1/1/1",        "        shutdown",        "        ethernet",        "        exit",        "    exit",        "    port 1/1/2",        "        ethernet",        "            mode access",        "        exit",        "        no shutdown",        "    exit",        "    port 1/1/3",        "        ethernet",        "        exit",        "        no shutdown",        "    exit",        "    port 1/1/4",        "        ethernet",        "        exit",        "        no shutdown",        "    exit",        "    port 1/1/5",        "        ethernet",        "        exit",        "        no shutdown",        "    exit",        "#--------------------------------------------------",        "echo \"System Sync-If-Timing Configuration\"",        "#--------------------------------------------------",        "    system",        "        sync-if-timing",        "            begin",        "            commit",        "        exit",        "    exit",        "#--------------------------------------------------",        "echo \"Management Router Configuration\"",        "#--------------------------------------------------",        "    router management",        "    exit",        "",        "#--------------------------------------------------",        "echo \"Router (Network Side) Configuration\"",        "#--------------------------------------------------",        "    router ",        "        interface \"system\"",        "            no shutdown",        "        exit",        "#--------------------------------------------------",        "echo \"Static Route Configuration\"",        "#--------------------------------------------------",        "        static-route 0.0.0.0/0 next-hop 192.168.1.254",        "#--------------------------------------------------",        "echo \"Web Portal Protocol Configuration\"",        "#--------------------------------------------------",        "    exit",        "",        "#--------------------------------------------------",        "echo \"Service Configuration\"",        "#--------------------------------------------------",        "    service",        "        customer 1 create",        "            description \"Default customer\"",        "        exit",        "        ies 10 customer 1 create",        "            interface \"TESTE\" create",        "            exit",        "        exit",        "        ies 10 customer 1 create",        "            interface \"TESTE\" create",        "                address 192.168.1.98/24",        "                sap 1/1/2 create",        "                exit",        "            exit",        "            no shutdown",        "        exit",        "    exit",        "#--------------------------------------------------",        "echo \"Router (Service Side) Configuration\"",        "#--------------------------------------------------",        "    router ",        "#--------------------------------------------------",        "echo \"WLAN Gateway Configuration\"",        "#--------------------------------------------------",        "    exit",        "",        "",        "exit all",        "",        "# Finished MON JUN 21 01:01:17 2021 UTC"    ]}
TASK [Status das portas] ***************************************************************************************************************************************************************************************************************************************ok: [192.168.1.98] => {    "msg": [        "===============================================================================",        "Ports on Slot 1",        "===============================================================================",        "Port        Admin Link Port    Cfg  Oper LAG/ Port Port Port   C/QS/S/XFP/",        "Id          State      State   MTU  MTU  Bndl Mode Encp Type   MDIMDX",        "-------------------------------------------------------------------------------",        "1/1/1       Down  No   Down    8936 8936    - netw null xcme   GIGE-LX  10KM",        "1/1/2       Up    Yes  Up      1514 1514    - accs null xcme   GIGE-LX  10KM",        "1/1/3       Up    Yes  Up      8936 8936    - netw null xcme   GIGE-LX  10KM",        "1/1/4       Up    Yes  Up      8936 8936    - netw null xcme   GIGE-LX  10KM",        "1/1/5       Up    Yes  Up      8936 8936    - netw null xcme   GIGE-LX  10KM",        "",        "===============================================================================",        "Ports on Slot A",        "===============================================================================",        "Port        Admin Link Port    Cfg  Oper LAG/ Port Port Port   C/QS/S/XFP/",        "Id          State      State   MTU  MTU  Bndl Mode Encp Type   MDIMDX",        "-------------------------------------------------------------------------------",        "A/1         Up    Yes  Up      1514 1514    - netw null faste  MDI",        "",        "===============================================================================",        "Ports on Slot B",        "===============================================================================",        "Port        Admin Link Port    Cfg  Oper LAG/ Port Port Port   C/QS/S/XFP/",        "Id          State      State   MTU  MTU  Bndl Mode Encp Type   MDIMDX",        "-------------------------------------------------------------------------------",        "B/1         Up    No   Ghost   1514 1514    - netw null faste  ",        "==============================================================================="    ]}
PLAY RECAP *****************************************************************************************************************************************************************************************************************************************************192.168.1.98               : ok=4    changed=0    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0   
root@lucas-VirtualBox:/etc/ansible/projects#