In this recipe, we will outline how to execute operational commands on Juniper devices and store these outputs in text files for further processing.
NETCONF must be enabled on the Juniper devices in order to follow along with this recipe.
- 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"