summaryrefslogtreecommitdiff
path: root/roles/installer/ubuntu
diff options
context:
space:
mode:
Diffstat (limited to 'roles/installer/ubuntu')
-rw-r--r--roles/installer/ubuntu/autoinstall/defaults/main.yml2
-rw-r--r--roles/installer/ubuntu/autoinstall/templates/autoinstall.yml.j26
2 files changed, 5 insertions, 3 deletions
diff --git a/roles/installer/ubuntu/autoinstall/defaults/main.yml b/roles/installer/ubuntu/autoinstall/defaults/main.yml
index 50a35ae1..16d08a19 100644
--- a/roles/installer/ubuntu/autoinstall/defaults/main.yml
+++ b/roles/installer/ubuntu/autoinstall/defaults/main.yml
@@ -6,7 +6,7 @@ ubuntu_autoinstall_locale: en_US
ubuntu_autoinstall_keyboard_layout: de
ubuntu_autoinstall_keyboard_variant: nodeadkeys
-ubuntu_autoinstall_timezone: Europe/Vienna
+ubuntu_autoinstall_timezone: "{{ base_timezone | default('Europe/Vienna') }}"
# ubuntu_autoinstall_kernel_image:
ubuntu_autoinstall_virtual_machine: no
diff --git a/roles/installer/ubuntu/autoinstall/templates/autoinstall.yml.j2 b/roles/installer/ubuntu/autoinstall/templates/autoinstall.yml.j2
index 1de70b70..24cce9b7 100644
--- a/roles/installer/ubuntu/autoinstall/templates/autoinstall.yml.j2
+++ b/roles/installer/ubuntu/autoinstall/templates/autoinstall.yml.j2
@@ -237,6 +237,9 @@ autoinstall:
dpkg -l | grep "^rc" | awk "{ print(\$2) }" | xargs -r dpkg -P
sed '/^PasswordAuthentication /d' -i '/etc/ssh/sshd_config'
rm -f '/etc/ssh/sshd_config.d/50-cloud-init.conf'
+ swapoff -a
+ sed -e '/^\/swapfile/d' -e '/^\/swap\.img/d' -i /etc/fstab
+ rm -f /swapfile /swap.img
rm -f /root/post-cleanup.sh
{% if ubuntu_autoinstall_poweroff_when_done %}
poweroff
@@ -262,7 +265,6 @@ autoinstall:
{% endfor %}
late-commands:
- - curtin in-target --target=/target -- swapoff -a; sed -e '/^\/swapfile/d' -e '/^\/swap\.img/d' -i /etc/fstab; rm -f /swapfile /swap.img
{% if ansible_port is defined %}
- curtin in-target --target=/target -- sed -e 's/^\s*#*\s*Port\s\s*[0-9][0-9]*$/Port {{ ansible_port }}/' -i /etc/ssh/sshd_config
- curtin in-target --target=/target -- bash -c "mkdir -p /etc/systemd/system/ssh.socket.d; echo -e '[Socket]\nListenStream=\nListenStream={{ ansible_port }}' > /etc/systemd/system/ssh.socket.d/port.conf"
@@ -272,7 +274,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 ubuntu-pro-client lxd-installer
+ - 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