summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2024-06-08 22:40:17 +0200
committerChristian Pointner <equinox@spreadspace.org>2024-06-08 22:40:17 +0200
commit7429fc076d24fbda6862bf28d1512b0356873acc (patch)
treebadc6b639440ea6b70e9bc21bfdf8bbf09d314e9
parentdebian/installer: make gateway and nameservers optional (diff)
ubuntu/installer: make gateway optional
-rw-r--r--inventory/host_vars/ch-tarvos.yml1
-rw-r--r--roles/installer/ubuntu/autoinstall/templates/autoinstall.yml.j22
2 files changed, 3 insertions, 0 deletions
diff --git a/inventory/host_vars/ch-tarvos.yml b/inventory/host_vars/ch-tarvos.yml
index f92255b3..1b457d84 100644
--- a/inventory/host_vars/ch-tarvos.yml
+++ b/inventory/host_vars/ch-tarvos.yml
@@ -12,6 +12,7 @@ debian_preseed_install_tasks:
install:
+ efi: no
disks:
primary: /dev/disk/by-id/ata-Samsung_SSD_850_PRO_128GB_S1SMNSAG201847J
system_lvm:
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 }} ]