ansible-ffibk/roles/network-meshbridge/templates/bridge.j2

24 lines
783 B
Plaintext
Raw Normal View History

#
# {{ ansible_managed }}
#
2019-03-02 18:10:48 +01:00
2017-11-06 21:24:56 +01:00
auto {{ item.id }}br
iface {{ item.id }}br
address {{ item.ipv4_network | ipaddr('net') | ipaddr(magic) | ipaddr('ip/prefix') }}
{% for prefix in item.ipv6_ula %}
address {{ prefix | ipaddr('net') | ipsubnet(64, 0) | ipaddr(magic) | ipaddr('ip/prefix') }}
{% endfor %}
{% for prefix in item.ipv6_public %}
address {{ prefix | ipaddr('net') | ipsubnet(64, 0) | ipaddr(magic) | ipaddr('ip/prefix') }}
{% endfor %}
2019-03-02 18:10:48 +01:00
{% if mesh_gw_prefixes is defined %}
{% for prefix in mesh_gw_prefixes[item.id].ipv6_public %}
address {{ prefix | ipaddr('net') | ipsubnet(64, 0) | ipaddr(1) | ipaddr('ip/prefix') }}
{% endfor %}
{% endif %}
2017-11-06 21:24:56 +01:00
bridge-ports {{ item.id }}bat
{% if server_type == 'gateway' %}
ip-forward on
ip6-forward on
{% endif %}