2017-10-06 22:58:00 +02:00
|
|
|
{% set ip4hex = item.ipv4_network | ipaddr('net') | ipaddr(magic) | ipaddr('address') | ip4_hex() -%}
|
2017-09-05 12:01:27 +02:00
|
|
|
{% set mac = '0210' + ip4hex -%}
|
|
|
|
#
|
|
|
|
# {{ ansible_managed }}
|
|
|
|
#
|
2017-11-06 21:24:56 +01:00
|
|
|
auto {{ item.id }}br
|
|
|
|
iface {{ item.id }}br
|
2018-02-06 06:00:16 +01:00
|
|
|
# hwaddress {{ mac | hwaddr('linux') }} <-- preferred way, not working - ipv6 addresses not set on boot
|
|
|
|
pre-up /sbin/ip link set address {{ mac | hwaddr('linux') }} dev $IFACE # ^^^ dirty workaround to get rid of
|
2017-10-06 22:58:00 +02:00
|
|
|
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') }}
|
2017-09-05 12:01:27 +02:00
|
|
|
{% endfor %}
|
2017-10-06 22:58:00 +02:00
|
|
|
{% for prefix in item.ipv6_public %}
|
|
|
|
address {{ prefix | ipaddr('net') | ipsubnet(64, 0) | ipaddr(magic) | ipaddr('ip/prefix') }}
|
2017-09-05 12:01:27 +02:00
|
|
|
{% endfor %}
|
2017-11-06 21:24:56 +01:00
|
|
|
bridge-ports {{ item.id }}bat
|