ansible/roles/debian/templates/systemd.network

26 lines
363 B
SYSTEMD

# {{ ansible_managed }}
[Match]
Name=e*
{% if dns is defined %}
[Network]
DNS={{ dns }}
{% endif %}
{% if ipv4 is defined %}
[Address]
Address={{ipv4}}
{% if ipv4.split("/")[1] is equalto "32" %}
Peer={{ipv4Yroute}}/32
{% endif %}
[Route]
Gateway={{ipv4route}}
{% endif %}
{% if ipv6 is defined %}
[Network]
Address={{ipv6}}
Gateway={{ipv6route}}
{% endif %}