diff --git a/roles/alpine/templates/interfaces.j2 b/roles/alpine/templates/interfaces.j2 index 0ccf500..98126f0 100644 --- a/roles/alpine/templates/interfaces.j2 +++ b/roles/alpine/templates/interfaces.j2 @@ -1,5 +1,5 @@ -{# Loopback interface must be present so define it here if none exists. #} -{% if interfaces | rejectattr("name", "==", "lo") %} +{# Loopback interface must be present so create it here if none is defined in inventory. #} +{% if not interfaces | selectattr("name", "==", "lo") %} auto lo iface lo