diff --git a/roles/network-batman/README.md b/roles/network-batman/README.md index c90a6f1..5b93e05 100644 --- a/roles/network-batman/README.md +++ b/roles/network-batman/README.md @@ -21,6 +21,19 @@ meshes: gw: # string: gateway mode mm: # boolean: multicast mode dat: # boolean: distributed arp table + hop_penalty: # integer: hop penalty +... + fastd: + nodes: + instances: + - id: 0 # integer + mtu: # integer + ... + intragate: + instances: + - id: 0 # integer + mtu: # integer + ... ยดยดยด - Host Variable `magic` diff --git a/roles/network-batman/templates/batman.j2 b/roles/network-batman/templates/batman.j2 index 7639794..9c655cb 100644 --- a/roles/network-batman/templates/batman.j2 +++ b/roles/network-batman/templates/batman.j2 @@ -1,3 +1,4 @@ +#jinja2: trim_blocks:False {% set ip4hex = item.ipv4_network | ipaddr('net') | ipaddr(magic) | ipaddr('address') | ip4_hex() -%} {% set mac = '0201' + ip4hex -%} # @@ -6,7 +7,7 @@ auto {{ item.id }}BAT iface {{ item.id }}BAT hwaddress {{ mac | hwaddr('linux') }} - batman-ifaces {{ item.id }}0 {{ item.id }}VPN {{ item.id }}igVPN + batman-ifaces {{ item.id }}0 {% for instance in item.fastd.nodes.instances %}{{ item.id }}VPN-{{ instance.mtu }}{% if not loop.last %} {% endif %}{% endfor %} {% for instance in item.fastd.intragate.instances %}{{ item.id }}igVPN-{{ instance.mtu }}{% if not loop.last %} {% endif %}{% endfor %} batman-hop-penalty {{ item.batman.hop_penalty }} post-up /usr/sbin/batctl -m $IFACE it {{ item.batman.it }} post-up /usr/sbin/batctl -m $IFACE gw {{ item.batman.gw }}