dataset/seed/host-systemd-machined/templates/dhcp.network

17 lines
404 B
SYSTEMD

[Match]
Name={{ rougail_variable }}
[Network]
{% set leader = general.network.interfaces.interface_names[rougail_index] %}
{% if leader.interface_type == 'dhcp' %}
DHCP=ipv4
{% else %}
DHCP=no
Address={{ leader.interface_ip }}
{% if leader.first_interface %}
Gateway={{ leader.interface_gateway }}
{% for dns in leader.interface_domain_name_servers %}
DNS={{ dns }}
{% endfor %}
{% endif %}
{% endif %}