Modulo https://galaxy.ansible.com/junipernetworks/junos

ansible-galaxy collection install juniper.device


---


-




  name: get interfaces


  hosts: junos


  gather_facts: false


  tasks:


    - name: Acessando e coletando versao...

      junipernetworks.junos.junos_command:   chamando o modulo junos

        commands:

        - show version

        - show interfaces terse


      register: response


    - name: Coletando configuracoes...

      junipernetworks.junos.junos_command:

        commands: show configuration


      register: response1


    - name: getting status

      debug: var=response.stdout_lines


    - name: Configuracao

      debug: var=response1.stdout_lines