44 lines
873 B
Plaintext
44 lines
873 B
Plaintext
|
[Match]
|
||
|
Name={{ item.name | regex_replace('^[0-9]*-', '') | regex_replace('\.netdev', '') }}
|
||
|
|
||
|
[Link]
|
||
|
ARP={{ item.arp }}
|
||
|
|
||
|
[Network]
|
||
|
{% if item.nameserver.ipv4 is defined %}
|
||
|
{% for nameserver in item.nameserver.ipv4 %}
|
||
|
DNS={{ nameserver }}
|
||
|
{% endfor %}
|
||
|
{% endif %}
|
||
|
{% if item.nameserver.ipv6 is defined %}
|
||
|
{% for nameserver in item.nameserver.ipv6 %}
|
||
|
DNS={{ nameserver }}
|
||
|
{% endfor %}
|
||
|
{% endif %}
|
||
|
|
||
|
{% if item.address.ipv4 is defined %}
|
||
|
[Address]
|
||
|
Address={{ item.address.ipv4 }}
|
||
|
{% endif %}
|
||
|
|
||
|
{% if item.address.ipv6 is defined %}
|
||
|
[Address]
|
||
|
Address={{ item.address.ipv6 }}
|
||
|
{% endif %}
|
||
|
|
||
|
{% if item.gateway.ipv4 is defined %}
|
||
|
[Route]
|
||
|
Destination=0.0.0.0/0
|
||
|
Gateway={{ item.gateway.ipv4 }}
|
||
|
Scope=global
|
||
|
Protocol=static
|
||
|
Type=unicast
|
||
|
{% endif %}
|
||
|
|
||
|
{% if item.gateway.ipv6 is defined %}
|
||
|
[Route]
|
||
|
Destination=::/0
|
||
|
Gateway={{ item.gateway.ipv4 }}
|
||
|
Protocol=static
|
||
|
Type=unicast
|
||
|
{% endif %}
|