mesh-tunnel.cfg.j2 561 B

1234567891011
  1. {% for host in groups['all'] %}
  2. {% if hostvars[host]['inventory_hostname'] != inventory_hostname %}
  3. auto mesh-{{hostvars[host]['inventory_hostname_short']}}
  4. iface mesh-{{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 1 dev {{ primary_interface }}
  6. pre-up ip link set up dev $IFACE
  7. post-down ip link set down dev $IFACE
  8. post-down ip link del dev $IFACE
  9. {% endif %}
  10. {% endfor %}