From c269796d99e0024170f0e3bacd2cfbfd266b0faa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torma=20Krist=C3=B3f?= Date: Sat, 30 Mar 2024 14:20:34 +0100 Subject: [PATCH] Update roles/netplan/templates/netplan.yaml --- roles/netplan/templates/netplan.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/netplan/templates/netplan.yaml b/roles/netplan/templates/netplan.yaml index a1ca000..a802c9d 100644 --- a/roles/netplan/templates/netplan.yaml +++ b/roles/netplan/templates/netplan.yaml @@ -6,9 +6,9 @@ network: {{ ansible_default_ipv4.interface }}: dhcp4: true dhcp-identifier: mac +{% if netplan.default_gateway is defined and netplan.default_gateway|length > 0 %} dhcp4-overrides: use-routes: false -{% if netplan.default_gateway is defined and netplan.default_gateway|length > 0 %} gateway4: {{netplan.default_gateway}} {% endif %} {% if netplan.additionalinterfaces is defined and netplan.additionalinterfaces|length > 0 %}