In this recipe, we will outline how to push the configuration that we have generated via Jinja2 templates in all the previous sections on Juniper devices using Ansible. This provides us with the capability to push any custom configuration that we create to our Juniper devices.
This recipe requires NETCONF to be enabled on the Juniper devices.
- In the pb_junos_push_con file, add the following task:
$ cat pb_jnpr_net_build.yml
<-- Output Trimmed for brevity ------>
- name: "Deploy Configuration...