From d1cf462f6415c811261b3d086648cd6db8c45df0 Mon Sep 17 00:00:00 2001 From: Timotej Lazar Date: Wed, 16 Jul 2025 13:07:15 +0200 Subject: [PATCH] alpine: drop hints from interface configuration Turns out ifupdown-ng ignores "inet static" and "inet loopback" hints on iface lines. The interface named "lo" is always used as loopback. --- roles/alpine/templates/interfaces.j2 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/roles/alpine/templates/interfaces.j2 b/roles/alpine/templates/interfaces.j2 index 021e564..0ccf500 100644 --- a/roles/alpine/templates/interfaces.j2 +++ b/roles/alpine/templates/interfaces.j2 @@ -1,7 +1,7 @@ {# Loopback interface must be present so define it here if none exists. #} {% if interfaces | rejectattr("name", "==", "lo") %} auto lo -iface lo inet loopback +iface lo {% endif -%} @@ -12,7 +12,7 @@ iface lo inet loopback | rejectattr('mgmt_only') | selectattr('enabled') %} auto {{ iface.name }} -iface {{ iface.name }} inet {% if iface.name == "lo" %}loopback{% else %}static{% endif +%} +iface {{ iface.name }} {% if iface.mtu %} mtu {{ iface.mtu }} {% endif %}