Configuring Juniper interfaces
In this recipe, we will configure the interfaces on our Juniper core routers. The attributes that will be configured include the IP address and interface description information. The junos_interface declarative module will not be used in this section; instead, we will add the necessary Juniper templates to our config_generation role. This will demonstrate how developing a role with reusability in mind can vastly speed up a network automation strategy.
Reminder
The code for the Ansible role can be found in https://github.com/PacktPublishing/Network-Automation-Cookbook_2nd_Edition/tree/main/chapters/roles.
To set the stage, the following diagram shows the interface followed by a table with the IP address schema that you will be building out. The diagram provides a logical network diagram for our core network topology, including interface names and logical endpoint connections.

Figure 5.2 - Juniper core
The preceding...