From 7148cac71ffbf4dcdbddc1f44b1bdd4fc9c9fc0f Mon Sep 17 00:00:00 2001 From: Markus Fensterer Date: Fri, 8 Nov 2024 11:22:22 +0100 Subject: [PATCH] conditional address --- partition/roles/systemd-networkd/templates/vlan.network.j2 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/partition/roles/systemd-networkd/templates/vlan.network.j2 b/partition/roles/systemd-networkd/templates/vlan.network.j2 index 4eb64f43..389236c5 100644 --- a/partition/roles/systemd-networkd/templates/vlan.network.j2 +++ b/partition/roles/systemd-networkd/templates/vlan.network.j2 @@ -5,5 +5,7 @@ Type=vlan [Link] MTUBytes={{ item.mtu | default(systemd_networkd_mtu) }} +{% if item.address is defined %} [Network] Address={{ item.address }} +{% endif %}