summaryrefslogtreecommitdiff
path: root/roles/installer/ubuntu/autoinstall/templates/autoinstall.yml.j2
diff options
context:
space:
mode:
Diffstat (limited to 'roles/installer/ubuntu/autoinstall/templates/autoinstall.yml.j2')
-rw-r--r--roles/installer/ubuntu/autoinstall/templates/autoinstall.yml.j211
1 files changed, 8 insertions, 3 deletions
diff --git a/roles/installer/ubuntu/autoinstall/templates/autoinstall.yml.j2 b/roles/installer/ubuntu/autoinstall/templates/autoinstall.yml.j2
index 9911f654..efee3941 100644
--- a/roles/installer/ubuntu/autoinstall/templates/autoinstall.yml.j2
+++ b/roles/installer/ubuntu/autoinstall/templates/autoinstall.yml.j2
@@ -19,10 +19,14 @@ autoinstall:
{% else %}
addresses:
- {{ network.primary.address }}
- gateway4: {{ network.primary.gateway }}
+{% if 'gateway' in network.primary %}
+ routes:
+ - to: default
+ via: {{ network.primary.gateway }}
+{% endif %}
{% if (network.nameservers | default([]) | length) > 0 %}
nameservers:
- search: [ {{ host_domain }} ]
+ search: [ {{ network.domain }} ]
addresses: [ {{ network.nameservers | join(', ') }} ]
{% endif %}
{% endif %}
@@ -219,6 +223,7 @@ autoinstall:
write_files:
- content: |
#!/bin/bash
+ set -e
for i in $(seq 10 -1 1); do echo "waiting $i seconds for cloud-init to finish."; sleep 1; done
echo "******************************************************************************"
echo "***** getting rid of cloud-init and other crap we neither want nor need! *****"
@@ -267,7 +272,7 @@ autoinstall:
- curtin in-target --target=/target -- apt-get -y -q purge systemd-oomd
{% endif %}
{% if (install_codename | ubuntu_release_compare('>=', 'noble')) %}
- - curtin in-target --target=/target -- apt-get -y -q purge ubuntu-kernel-accessories
+ - curtin in-target --target=/target -- apt-get -y -q purge ubuntu-kernel-accessories ubuntu-pro-client lxd-installer unminimize
{% endif %}
{% if ubuntu_autoinstall_desktop is undefined %}
- curtin in-target --target=/target -- apt-mark manual iputils-ping isc-dhcp-client netcat-openbsd netplan.io sudo