Files

19 lines
738 B
Django/Jinja

auto {{ item.name }}
{% if item.local_ipv6 %}
iface {{ item.name }} inet6 static
address {{ item.local_ipv6 }}
{% if item.mtu is defined %}
mtu {{ item.mtu }}
{% endif %}
{% if item.mode is defined and item.mode == "gretap" %}
pre-up ip link add {{ item.name }} type gretap remote {{ item.remote_endpoint }} local {{ item.local_endpoint }} {%- if item.ttl is defined %} ttl {{item.ttl}} {%- endif %}
{% else %}
pre-up ip link add {{ item.name }} type gre remote {{ item.remote_endpoint }} local {{ item.local_endpoint }} {%- if item.ttl is defined %} ttl {{item.ttl}} {%- endif %}
{% endif %}
{% endif %}
{% if item.local_ipv4 is defined %}
iface {{ item.name }} inet static
address {{ item.local_ipv4 }}
{% endif %}