summaryrefslogtreecommitdiff
path: root/roles/installer
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2021-09-10 19:14:14 +0200
committerChristian Pointner <equinox@spreadspace.org>2021-09-10 19:14:14 +0200
commit62f808def6fe5f082c685c696f62c794e23cf758 (patch)
tree2d5bcd634db600ae4eff3fc6e4e6024762e02023 /roles/installer
parentch-sensors update docs (diff)
ubuntu installer /swapfile vs /swap.img
Diffstat (limited to 'roles/installer')
-rw-r--r--roles/installer/debian/preseed/templates/preseed_ubuntu-bionic.cfg.j22
-rw-r--r--roles/installer/debian/preseed/templates/preseed_ubuntu-focal.cfg.j22
-rw-r--r--roles/installer/ubuntu/autoinstall/templates/autoinstall.yml.j22
3 files changed, 3 insertions, 3 deletions
diff --git a/roles/installer/debian/preseed/templates/preseed_ubuntu-bionic.cfg.j2 b/roles/installer/debian/preseed/templates/preseed_ubuntu-bionic.cfg.j2
index 5768ad9c..3f31f66b 100644
--- a/roles/installer/debian/preseed/templates/preseed_ubuntu-bionic.cfg.j2
+++ b/roles/installer/debian/preseed/templates/preseed_ubuntu-bionic.cfg.j2
@@ -89,7 +89,7 @@ d-i finish-install/reboot_in_progress note
d-i preseed/late_command string \
lvremove -f {{ host_name }}/dummy; \
- in-target bash -c "swapoff -a; sed -e '/^\/swapfile/d' -i /etc/fstab; rm -f /swapfile"; \
+ in-target bash -c "swapoff -a; sed -e '/^\/swapfile/d' -e '/^\/swap\.img/d' -i /etc/fstab; rm -f /swapfile /swap.img"; \
in-target bash -c "apt-get update -q && apt-get full-upgrade -y -q"; \
in-target bash -c "env SUDO_FORCE_REMOVE=yes apt-get purge -y -q ubuntu-minimal sudo ubuntu-advantage-tools"; \
{% if debian_preseed_no_netplan %}
diff --git a/roles/installer/debian/preseed/templates/preseed_ubuntu-focal.cfg.j2 b/roles/installer/debian/preseed/templates/preseed_ubuntu-focal.cfg.j2
index 25c5f13d..f895a668 100644
--- a/roles/installer/debian/preseed/templates/preseed_ubuntu-focal.cfg.j2
+++ b/roles/installer/debian/preseed/templates/preseed_ubuntu-focal.cfg.j2
@@ -89,7 +89,7 @@ d-i finish-install/reboot_in_progress note
d-i preseed/late_command string \
lvremove -f {{ host_name }}/dummy; \
- in-target bash -c "swapoff -a; sed -e '/^\/swapfile/d' -i /etc/fstab; rm -f /swapfile"; \
+ in-target bash -c "swapoff -a; sed -e '/^\/swapfile/d' -e '/^\/swap\.img/d' -i /etc/fstab; rm -f /swapfile /swap.img"; \
in-target bash -c "apt-get update -q && apt-get full-upgrade -y -q"; \
in-target bash -c "env SUDO_FORCE_REMOVE=yes apt-get purge -y -q ubuntu-minimal sudo ubuntu-advantage-tools"; \
{% if debian_preseed_no_netplan %}
diff --git a/roles/installer/ubuntu/autoinstall/templates/autoinstall.yml.j2 b/roles/installer/ubuntu/autoinstall/templates/autoinstall.yml.j2
index 763a03cb..8b4538d5 100644
--- a/roles/installer/ubuntu/autoinstall/templates/autoinstall.yml.j2
+++ b/roles/installer/ubuntu/autoinstall/templates/autoinstall.yml.j2
@@ -233,7 +233,7 @@ autoinstall:
{% endfor %}
late-commands:
- - curtin in-target --target=/target -- swapoff -a; sed -e '/^\/swapfile/d' -i /etc/fstab; rm -f /swapfile
+ - 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.*\)/Port {{ ansible_port }}/' -i /etc/ssh/sshd_config
{% endif %}