From 7429fc076d24fbda6862bf28d1512b0356873acc Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Sat, 8 Jun 2024 22:40:17 +0200 Subject: ubuntu/installer: make gateway optional --- roles/installer/ubuntu/autoinstall/templates/autoinstall.yml.j2 | 2 ++ 1 file changed, 2 insertions(+) (limited to 'roles/installer/ubuntu') diff --git a/roles/installer/ubuntu/autoinstall/templates/autoinstall.yml.j2 b/roles/installer/ubuntu/autoinstall/templates/autoinstall.yml.j2 index fd78bc4d..8857cf2d 100644 --- a/roles/installer/ubuntu/autoinstall/templates/autoinstall.yml.j2 +++ b/roles/installer/ubuntu/autoinstall/templates/autoinstall.yml.j2 @@ -19,9 +19,11 @@ autoinstall: {% else %} addresses: - {{ network.primary.address }} +{% if 'gataway' in network.primary %} routes: - to: default via: {{ network.primary.gateway }} +{% endif %} {% if (network.nameservers | default([]) | length) > 0 %} nameservers: search: [ {{ network.domain }} ] -- cgit v1.2.3