summaryrefslogtreecommitdiff
path: root/roles/installer
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2020-11-04 22:20:24 +0100
committerChristian Pointner <equinox@spreadspace.org>2020-11-04 22:22:11 +0100
commit7c3376d3a527a308e3ca4a641afd3fe043194096 (patch)
tree0700fff7253809383ca1c345892bffdf3bf674dd /roles/installer
parentupgrade collabora code to 6.4 (diff)
harmonize preseed files for server and workstations
Diffstat (limited to 'roles/installer')
-rw-r--r--roles/installer/debian/iso/templates/isolinux.cfg.j22
-rw-r--r--roles/installer/debian/preseed/defaults/main.yml6
-rw-r--r--roles/installer/debian/preseed/templates/preseed_debian-bullseye.cfg.j26
-rw-r--r--roles/installer/debian/preseed/templates/preseed_debian-buster.cfg.j26
-rw-r--r--roles/installer/debian/preseed/templates/preseed_debian-jessie.cfg.j26
-rw-r--r--roles/installer/debian/preseed/templates/preseed_debian-stretch.cfg.j26
-rw-r--r--roles/installer/debian/preseed/templates/preseed_ubuntu-bionic.cfg.j212
-rw-r--r--roles/installer/debian/preseed/templates/preseed_ubuntu-focal.cfg.j212
-rw-r--r--roles/installer/debian/preseed/templates/preseed_ubuntu-xenial.cfg.j210
-rw-r--r--roles/installer/debian/preseed/templates/preseed_xubuntu-focal-desktop.cfg.j213
-rw-r--r--roles/installer/debian/usb/templates/syslinux.cfg.j22
11 files changed, 64 insertions, 17 deletions
diff --git a/roles/installer/debian/iso/templates/isolinux.cfg.j2 b/roles/installer/debian/iso/templates/isolinux.cfg.j2
index 3656b435..c7bf1246 100644
--- a/roles/installer/debian/iso/templates/isolinux.cfg.j2
+++ b/roles/installer/debian/iso/templates/isolinux.cfg.j2
@@ -12,4 +12,4 @@ SAY **
LABEL {{ install_hostname }}
KERNEL linux
INITRD initrd.gz
- APPEND install fb=false {{ (hostvars[install_hostname].install_cooked.kernel_cmdline | default([])) | join(' ') }}
+ APPEND auto=true fb=false {{ (hostvars[install_hostname].install_cooked.kernel_cmdline | default([])) | join(' ') }}
diff --git a/roles/installer/debian/preseed/defaults/main.yml b/roles/installer/debian/preseed/defaults/main.yml
index 078b5448..2ad4e32a 100644
--- a/roles/installer/debian/preseed/defaults/main.yml
+++ b/roles/installer/debian/preseed/defaults/main.yml
@@ -5,7 +5,10 @@
# preseed_force_net_ifnames_policy: path
preseed_no_netplan: no
+# preseed_kernel_image:
preseed_virtual_machine: no
+preseed_no_splash: yes
+
preseed_efi_esp_size: 128
preseed_swraid_boot_size: 256
@@ -29,3 +32,6 @@ preseed_system_lvm_volumes_default:
- noatime
- nodev
- noexec
+
+
+preseed_install_tasks: []
diff --git a/roles/installer/debian/preseed/templates/preseed_debian-bullseye.cfg.j2 b/roles/installer/debian/preseed/templates/preseed_debian-bullseye.cfg.j2
index 650f0708..d02ab496 100644
--- a/roles/installer/debian/preseed/templates/preseed_debian-bullseye.cfg.j2
+++ b/roles/installer/debian/preseed/templates/preseed_debian-bullseye.cfg.j2
@@ -49,11 +49,15 @@ d-i clock-setup/ntp boolean false
{% include 'partman_config.j2' %}
+{% if preseed_kernel_image is defined %}
+d-i base-installer/kernel/image string {{ preseed_kernel_image }}
+{% 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].debian_security.host }}
d-i apt-setup/security_path string {{ apt_repo_providers[hostvars[install_hostname].apt_repo_provider].debian_security.path }}
-tasksel tasksel/first multiselect
+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
d-i pkgsel/upgrade select safe-upgrade
popularity-contest popularity-contest/participate boolean false
diff --git a/roles/installer/debian/preseed/templates/preseed_debian-buster.cfg.j2 b/roles/installer/debian/preseed/templates/preseed_debian-buster.cfg.j2
index 37408ed1..fa70d2b9 100644
--- a/roles/installer/debian/preseed/templates/preseed_debian-buster.cfg.j2
+++ b/roles/installer/debian/preseed/templates/preseed_debian-buster.cfg.j2
@@ -49,11 +49,15 @@ d-i clock-setup/ntp boolean false
{% include 'partman_config.j2' %}
+{% if preseed_kernel_image is defined %}
+d-i base-installer/kernel/image string {{ preseed_kernel_image }}
+{% 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].debian_security.host }}
d-i apt-setup/security_path string {{ apt_repo_providers[hostvars[install_hostname].apt_repo_provider].debian_security.path }}
-tasksel tasksel/first multiselect
+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
d-i pkgsel/upgrade select safe-upgrade
popularity-contest popularity-contest/participate boolean false
diff --git a/roles/installer/debian/preseed/templates/preseed_debian-jessie.cfg.j2 b/roles/installer/debian/preseed/templates/preseed_debian-jessie.cfg.j2
index c46dba37..d033b3b0 100644
--- a/roles/installer/debian/preseed/templates/preseed_debian-jessie.cfg.j2
+++ b/roles/installer/debian/preseed/templates/preseed_debian-jessie.cfg.j2
@@ -49,11 +49,15 @@ d-i clock-setup/ntp boolean false
{% include 'partman_config.j2' %}
+{% if preseed_kernel_image is defined %}
+d-i base-installer/kernel/image string {{ preseed_kernel_image }}
+{% endif %}
+
d-i base-installer/install-recommends boolean false
d-i apt-setup/security_host string
#d-i apt-setup/security_host string
-tasksel tasksel/first multiselect
+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
d-i pkgsel/upgrade select safe-upgrade
popularity-contest popularity-contest/participate boolean false
diff --git a/roles/installer/debian/preseed/templates/preseed_debian-stretch.cfg.j2 b/roles/installer/debian/preseed/templates/preseed_debian-stretch.cfg.j2
index e9782453..0528f33c 100644
--- a/roles/installer/debian/preseed/templates/preseed_debian-stretch.cfg.j2
+++ b/roles/installer/debian/preseed/templates/preseed_debian-stretch.cfg.j2
@@ -49,11 +49,15 @@ d-i clock-setup/ntp boolean false
{% include 'partman_config.j2' %}
+{% if preseed_kernel_image is defined %}
+d-i base-installer/kernel/image string {{ preseed_kernel_image }}
+{% 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].debian_security.host }}
d-i apt-setup/security_path string {{ apt_repo_providers[hostvars[install_hostname].apt_repo_provider].debian_security.path }}
-tasksel tasksel/first multiselect
+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
d-i pkgsel/upgrade select safe-upgrade
popularity-contest popularity-contest/participate boolean false
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 a08fd2ab..61f08552 100644
--- a/roles/installer/debian/preseed/templates/preseed_ubuntu-bionic.cfg.j2
+++ b/roles/installer/debian/preseed/templates/preseed_ubuntu-bionic.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 %}
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 %}
diff --git a/roles/installer/debian/preseed/templates/preseed_ubuntu-xenial.cfg.j2 b/roles/installer/debian/preseed/templates/preseed_ubuntu-xenial.cfg.j2
index a62956af..28d68250 100644
--- a/roles/installer/debian/preseed/templates/preseed_ubuntu-xenial.cfg.j2
+++ b/roles/installer/debian/preseed/templates/preseed_ubuntu-xenial.cfg.j2
@@ -54,10 +54,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 }}
@@ -66,7 +71,7 @@ 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
+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
d-i pkgsel/upgrade select safe-upgrade
popularity-contest popularity-contest/participate boolean false
@@ -78,6 +83,7 @@ d-i finish-install/reboot_in_progress note
d-i preseed/late_command string \
lvremove -f {{ hostvars[install_hostname].host_name }}/dummy; \
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"; \
in-target bash -c "sed -e 's/^allow-hotplug/auto/' -i /etc/network/interfaces"; \
{% if preseed_force_net_ifnames_policy is defined %}
mkdir -p /target/etc/systemd/network; \
diff --git a/roles/installer/debian/preseed/templates/preseed_xubuntu-focal-desktop.cfg.j2 b/roles/installer/debian/preseed/templates/preseed_xubuntu-focal-desktop.cfg.j2
index c89d0df3..ee4eb717 100644
--- a/roles/installer/debian/preseed/templates/preseed_xubuntu-focal-desktop.cfg.j2
+++ b/roles/installer/debian/preseed/templates/preseed_xubuntu-focal-desktop.cfg.j2
@@ -60,9 +60,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 }}
@@ -71,8 +77,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 xubuntu-desktop
-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
@@ -84,6 +90,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 %}
diff --git a/roles/installer/debian/usb/templates/syslinux.cfg.j2 b/roles/installer/debian/usb/templates/syslinux.cfg.j2
index f26fb45f..c6acadd3 100644
--- a/roles/installer/debian/usb/templates/syslinux.cfg.j2
+++ b/roles/installer/debian/usb/templates/syslinux.cfg.j2
@@ -21,5 +21,5 @@ LABEL {{ host }}
MENU LABEL automatic installer for {{ host }}
KERNEL {{ syslinux_base_path }}linux
INITRD {{ syslinux_base_path }}initrd.{{ host }}.gz
- APPEND install fb=false {{ (hostvars[host].install_cooked.kernel_cmdline | default([])) | join(' ') }}
+ APPEND auto=true fb=false {{ (hostvars[host].install_cooked.kernel_cmdline | default([])) | join(' ') }}
{% endfor %}