From 7c3376d3a527a308e3ca4a641afd3fe043194096 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Wed, 4 Nov 2020 22:20:24 +0100 Subject: harmonize preseed files for server and workstations --- .../debian/preseed/templates/preseed_ubuntu-focal.cfg.j2 | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'roles/installer/debian/preseed/templates/preseed_ubuntu-focal.cfg.j2') 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 81aaa9cc..76f6a045 100644 --- a/roles/installer/debian/preseed/templates/preseed_ubuntu-focal.cfg.j2 +++ b/roles/installer/debian/preseed/templates/preseed_ubuntu-focal.cfg.j2 @@ -57,10 +57,15 @@ d-i clock-setup/ntp boolean false {% include 'partman_config.j2' %} -{% if preseed_virtual_machine %} +{% if preseed_kernel_image is defined %} +d-i base-installer/kernel/image string {{ preseed_kernel_image }} +{% elif preseed_virtual_machine %} d-i base-installer/kernel/image string linux-virtual {% endif %} +{% if preseed_no_splash %} d-i debian-installer/splash boolean false +d-i debian-installer/add-kernel-opts string nosplash +{% endif %} d-i base-installer/install-recommends boolean false d-i apt-setup/security_host string {{ apt_repo_providers[hostvars[install_hostname].apt_repo_provider].ubuntu.host }} @@ -69,8 +74,8 @@ d-i apt-setup/security_path string {{ apt_repo_providers[hostvars[install_hostna d-i apt-setup/multiarch string amd64 {% endif %} -tasksel tasksel/first multiselect -d-i pkgsel/include string openssh-server {{ hostvars[install_hostname].python_basename }} {{ hostvars[install_hostname].python_basename }}-apt ifupdown +tasksel tasksel/first multiselect {{ preseed_install_tasks | join(', ') }} +d-i pkgsel/include string openssh-server {{ hostvars[install_hostname].python_basename }} {{ hostvars[install_hostname].python_basename }}-apt{% if preseed_no_netplan %} ifupdown{% endif %}{{ '' }} d-i pkgsel/upgrade select safe-upgrade popularity-contest popularity-contest/participate boolean false d-i pkgsel/update-policy select none @@ -82,6 +87,7 @@ d-i preseed/late_command string \ lvremove -f {{ hostvars[install_hostname].host_name }}/dummy; \ in-target bash -c "swapoff -a; sed -e '/^\/swapfile/d' -i /etc/fstab; rm -f /swapfile"; \ 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 preseed_no_netplan %} in-target bash -c "apt-get purge -y -q netplan.io && apt-get autoremove -y -q && rm -rf /etc/netplan"; \ {% endif %} -- cgit v1.2.3