batman-tunnel.cfg.j2 595 B

1234567891011
  1. {% for host in groups['batman'] %}
  2. {% if hostvars[host]['inventory_hostname'] != inventory_hostname %}
  3. auto batman-{{hostvars[host]['inventory_hostname_short']}}
  4. iface batman-{{hostvars[host]['inventory_hostname_short']}} inet manual
  5. pre-up ip link add $IFACE type ip6gretap remote {{hostvars[host]['primary_v6_address']|ipaddr('address')}} local {{primary_v6_address|ipaddr('address')}} key 2 dev {{ primary_interface }}
  6. pre-up ip link set up dev $IFACE
  7. up batctl if add $IFACE
  8. post-down ip link set down dev $IFACE
  9. post-down ip link del dev $IFACE
  10. {% endif %}
  11. {% endfor %}