In this recipe, we will outline how to execute operational commands on Juniper devices and store these outputs in text files for further processing.
Retrieving operational data from Juniper devices
Getting ready
NETCONF must be enabled on the Juniper devices in order to follow along with this recipe.
How to do it...
- Install the jxmlease Python package, as follows:
$ pip3 install jxmlease
- Create a new playbook called pb_get_ospf_peers.yml and populate it with the following task to extract OSPF peering information:
---
- name: "Get OSPF Status"
hosts: junos...