diff options
Diffstat (limited to 'roles/installer/ubuntu/autoinstall/templates')
-rw-r--r-- | roles/installer/ubuntu/autoinstall/templates/autoinstall.yml.j2 | 6 |
1 files changed, 4 insertions, 2 deletions
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 |