This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- before | |
+++ after | |
@@ -10,24 +10,51 @@ | |
"address_family[1].af_type[0].legacy_redirect_ip_action.send": true, | |
"address_family[1].af_type[0].loops": 4, | |
"address_family[1].af_type[0].no_install": true, | |
- "address_family[1].af_type[0].output_queue_priority_expedited": true, | |
+ "address_family[1].af_type[0].prefix_limit.forever": true, | |
+ "address_family[1].af_type[0].prefix_limit.limit_threshold": 100, | |
+ "address_family[1].af_type[0].prefix_limit.maximum": 15, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- name: Gather current BGP address family configuration from the device | |
junipernetworks.junos.junos_bgp_address_family: | |
state: gathered | |
register: result | |
- name: Find out diff between intended and current configuration | |
ansible.utils.fact_diff: | |
before: "{{ bgp_address_family|ansible.utils.to_paths }}" | |
after: "{{ result['gathered']|ansible.utils.to_paths }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
address_family: | |
- af_type: | |
- accepted_prefix_limit: | |
idle_timeout_value: 2001 | |
limit_threshold: 98 | |
maximum: 20 | |
damping: true | |
defer_initial_multipath_build: | |
maximum_delay: 2 | |
type: signaling |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Before Device Config: | |
===================== | |
vagrant@vsrx# show routing-options | |
autonomous-system 65534 loops 3 asdot-notation; | |
vagrant@vsrx# show protocols bgp | |
family inet { | |
unicast { | |
local-ipv4-address 9.9.9.9; | |
extended-nexthop; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Before Device Config: | |
===================== | |
vagrant@vsrx# show routing-options | |
autonomous-system 65534 loops 3 asdot-notation; | |
vagrant@vsrx# show protocols bgp | |
family inet { | |
flow { | |
loops 4; | |
no-install; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
address_family: | |
- af_type: | |
- accepted_prefix_limit: | |
idle_timeout_value: 2001 | |
limit_threshold: 98 | |
maximum: 20 | |
damping: true | |
defer_initial_multipath_build: | |
maximum_delay: 2 | |
type: signaling |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[junos]$ cat lab_inventory/host_vars/junos/bgp_address_family.yaml | |
bgp_address_family: | |
address_family: | |
- af_type: | |
- accepted_prefix_limit: | |
idle_timeout_value: 2001 | |
limit_threshold: 98 | |
maximum: 20 | |
damping: true | |
defer_initial_multipath_build: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- name: convert configured BGP address family resource to structured data | |
hosts: junos | |
vars: | |
inventory_dir: "lab_inventory" | |
inventory_hostname: "junos" | |
gather_facts: false | |
tasks: | |
- name: Use the bgp_address_family resource module to gather the current config |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vagrant@vsrx# show routing-options | |
autonomous-system 65534 loops 3 asdot-notation; | |
vagrant@vsrx# show protocols bgp | |
family inet { | |
flow { | |
loops 4; | |
no-install; | |
output-queue-priority expedited; | |
legacy-redirect-ip-action { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- name: IOS_BGP | |
hosts: ios-lab | |
collections: | |
- cisco.ios.ios | |
tasks: | |
- name: Configure global BGP with bgp_global | |
cisco.ios.ios_bgp_global: | |
config: |