Merge "Fix default IPv6 BGP peer for BIRD"

This commit is contained in:
Jenkins 2016-12-09 16:03:21 +00:00 committed by Gerrit Code Review
commit 097ab80d9b

View File

@ -30,7 +30,15 @@ bird_bgp_asn: 65000
bird_bgp_ipv4_peer_ip: "{{ ansible_default_ipv4['gateway'] }}"
#calculate the first address in the subnet since the IPv6 "gateway" may be a
#link local address that we cannot peer to.
bird_bgp_ipv6_peer_ip: "{{ ((ansible_default_ipv6['address'] ~ '/' ~ ansible_default_ipv6['prefix']) | ipaddr('network') ~ '/' ~ ansible_default_ipv6['prefix']) | ipaddr('net') | ipaddr(1) | ipaddr('address') }}"
bird_bgp_ipv6_peer_ip: >-
{% if ansible_default_ipv6['address'] is defined
and ansible_default_ipv6['prefix'] is defined %}
{{
((ansible_default_ipv6['address'] ~ '/' ~ ansible_default_ipv6['prefix']) |
ipaddr('network') ~ '/' ~ ansible_default_ipv6['prefix']
) | ipaddr('net') | ipaddr(1) | ipaddr('address')
}}
{% endif %}
bird_ipv4_protocols:
kernel: |