diff options
-rw-r--r-- | roles/installer/ubuntu/autoinstall/templates/autoinstall.yml.j2 | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/roles/installer/ubuntu/autoinstall/templates/autoinstall.yml.j2 b/roles/installer/ubuntu/autoinstall/templates/autoinstall.yml.j2 index efee3941..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" |