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

18 lines
404 B
SYSTEMD
Raw Normal View History

2022-03-08 19:42:28 +01:00
[Match]
2023-06-23 08:12:05 +02:00
Name={{ rougail_variable }}
2022-03-08 19:42:28 +01:00
[Network]
2023-06-23 08:12:05 +02:00
{% set leader = general.network.interfaces.interface_names[rougail_index] %}
{% if leader.interface_type == 'dhcp' %}
2022-03-08 19:42:28 +01:00
DHCP=ipv4
2023-06-23 08:12:05 +02:00
{% else %}
2022-12-25 17:08:52 +01:00
DHCP=no
2023-06-23 08:12:05 +02:00
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 %}