2017-09-05 12:01:27 +02:00
|
|
|
{% set ip4hex = item.value.ipv4_network | ipaddr('net') | ipaddr(magic) | ipaddr('address') | ip4_hex() -%}
|
|
|
|
{% set mac = '0201' + ip4hex -%}
|
|
|
|
#
|
|
|
|
# {{ ansible_managed }}
|
|
|
|
#
|
|
|
|
auto {{ item.key }}BAT
|
2017-10-03 14:37:39 +02:00
|
|
|
iface {{ item.key }}BAT
|
|
|
|
hwaddress {{ mac | hwaddr('linux') }}
|
|
|
|
batman-ifaces {{ item.key }}0 {{ item.key }}VPN {{ item.key }}igVPN
|
|
|
|
batman-hop-penalty {{ item.value.batman.hop_penalty }}
|
|
|
|
post-up /usr/sbin/batctl -m $IFACE it {{ item.value.batman.it }}
|
|
|
|
post-up /usr/sbin/batctl -m $IFACE gw {{ item.value.batman.gw }}
|
|
|
|
post-up /usr/sbin/batctl -m $IFACE mm {{ item.value.batman.mm }}
|
|
|
|
post-up /usr/sbin/batctl -m $IFACE dat {{ item.value.batman.dat }}
|