dataset/seed/systemd/templates/network

27 lines
659 B
Text

#RISOTTO: do not compare
{% set intnb = rougail_index %}
[Match]
{% if netwokd_interface_name_type == 'host' %}
Name=host{{ intnb }}
{% else %}
Name={{ rougail_variable }}
{% endif %}
[Link]
RequiredForOnline=yes
[Network]
LinkLocalAddressing=no
DHCP=no
{% set parent = general.network['interface_' + intnb|string] %}
{% set cidr = parent['network_eth' + intnb|string].split('/')[1] %}
Address={{ parent['ip_eth' + intnb|string] }}/{{ cidr }}
{% set gateway = parent['gateway_eth' + intnb|string] %}
{% if gateway %}
Gateway={{ gateway }}
{% endif %}
{% set dns = general.network.ip_dns %}
{% if dns %}
DNS={{ dns }}
ConfigureWithoutCarrier=yes
{% endif %}