ansible-ffibk/roles/network-batman/templates/dummy.j2
2019-03-02 18:12:56 +01:00

9 lines
264 B
Django/Jinja

{% set ip4hex = item.ipv4_network | ipaddr('net') | ipaddr(magic) | ipaddr('address') | ip4_hex() -%}
{% set mac = '0200' + ip4hex -%}
#
# {{ ansible_managed }}
#
auto {{ item.id }}
iface {{ item.id }}
link-type dummy
hwaddress {{ mac | hwaddr('linux') }}