Collecting Juniper device facts using Ansible
This recipe will provide you with a playbook to validate BGP on the Juniper core devices that you configured. You will retrieve operational state data using the junos_rpc module and then validate the data retrieved. Let’s get started by creating the playbook to validate our device facts:
- Create a new playbook called
pb_validate_facts.yml:root@cookbook-lab:~/cookbook-lab/chapters/ch05# vi pb_validate_facts.yml --- - name: “Collect and Validate Juniper Core Facts” hosts: “juniper_crpd” tasks: - name: “Collect BGP Facts Using RPC” junipernetworks.junos.junos_rpc: (1) rpc: get-bgp-summary-information register: bgp_information ...