Merge "Set source IPv4 address from inventory vars"
This commit is contained in:
commit
625972e077
|
@ -23,6 +23,7 @@ tripleo_frr_bfd: false
|
||||||
tripleo_frr_bgp: false
|
tripleo_frr_bgp: false
|
||||||
tripleo_frr_bgp_ipv4: true
|
tripleo_frr_bgp_ipv4: true
|
||||||
tripleo_frr_bgp_ipv4_allowas_in: false
|
tripleo_frr_bgp_ipv4_allowas_in: false
|
||||||
|
tripleo_frr_bgp_ipv4_src_network: ctlplane
|
||||||
tripleo_frr_bgp_ipv6: true
|
tripleo_frr_bgp_ipv6: true
|
||||||
tripleo_frr_bgp_ipv6_allowas_in: false
|
tripleo_frr_bgp_ipv6_allowas_in: false
|
||||||
tripleo_frr_bgp_uplinks_scope: internal
|
tripleo_frr_bgp_uplinks_scope: internal
|
||||||
|
@ -31,4 +32,3 @@ tripleo_frr_hostname: "{{ ansible_hostname }}"
|
||||||
tripleo_frr_log_level: informational
|
tripleo_frr_log_level: informational
|
||||||
tripleo_frr_watchfrr: true
|
tripleo_frr_watchfrr: true
|
||||||
tripleo_frr_zebra: false
|
tripleo_frr_zebra: false
|
||||||
tripleo_frr_bgp_ipv4_default_src_map: {}
|
|
||||||
|
|
|
@ -44,13 +44,11 @@ router bgp {{ tripleo_frr_bgp_asn }}
|
||||||
ip prefix-list only-default permit 0.0.0.0/0
|
ip prefix-list only-default permit 0.0.0.0/0
|
||||||
ip prefix-list only-host-prefixes permit 0.0.0.0/0 ge 32
|
ip prefix-list only-host-prefixes permit 0.0.0.0/0 ge 32
|
||||||
|
|
||||||
{% if tripleo_frr_bgp_ipv4_default_src_map|length > 0 and tripleo_frr_hostname in tripleo_frr_bgp_ipv4_default_src_map %}
|
|
||||||
route-map rm-only-default permit 10
|
route-map rm-only-default permit 10
|
||||||
match ip address prefix-list only-default
|
match ip address prefix-list only-default
|
||||||
set src {{ tripleo_frr_bgp_ipv4_default_src_map[tripleo_frr_hostname] }}
|
set src {{ hostvars[inventory_hostname][tripleo_frr_bgp_ipv4_src_network ~ '_ip'] }}
|
||||||
|
|
||||||
ip protocol bgp route-map rm-only-default
|
ip protocol bgp route-map rm-only-default
|
||||||
{% endif %} {# tripleo_frr_bgp_ipv4_default_src_map #}
|
|
||||||
{% endif %} {# tripleo_frr_bgp_ipv4 #}
|
{% endif %} {# tripleo_frr_bgp_ipv4 #}
|
||||||
|
|
||||||
{% if tripleo_frr_bgp_ipv6 %}
|
{% if tripleo_frr_bgp_ipv6 %}
|
||||||
|
|
Loading…
Reference in New Issue