April 2020
Intermediate to advanced
482 pages
15h 16m
English
The junos_config module also supports the rollback feature supported by Junos OS, therefore we can add another task to roll back the configuration and control how it is run, as follows:
$ cat pb_jnpr_net_build.yml<-- Output Trimmed for brevity ------>- name: "Rollback config" junos_config: rollback: "{{ rollback | default('1') | int }}" tags: rollback, never
In the preceding playbook, we roll back to the last version of the configuration. However, by changing the number in the rollback attribute, we can control the version of the configuration to which we want to roll back. Also, we are using the tags in order to only execute this task when we specify the rollback tag during the playbook run, as shown in the following code ...
Read now
Unlock full access