ansible-ffibk/roles/network-fastd/templates/fastd-mesh.j2
Tobias Hachmer 53d30c8ded Restructure fastd configuration to define multiple instances easily
- introduce mesh subdictionary `fastd`
 - change fastd instance naming
 - change fastd network interface naming (identical with fastd instance
names)
 - change mac address prefixes
2017-10-07 00:57:35 +02:00

8 lines
308 B
Django/Jinja

{% set ip4hex = item.0.ipv4_network | ipaddr('net') | ipaddr(magic) | ipaddr('address') | ip4_hex() -%}
{% set mac = '022' + item.1.id|string + ip4hex -%}
#
# {{ ansible_managed }}
#
auto {{ item.0.id }}VPN-{{ item.1.mtu }}
iface {{ item.0.id }}VPN-{{ item.1.mtu }}
hwaddress {{ mac | hwaddr('linux') }}