summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--inventory/host_vars/ch-equinox-t450s.yml1
-rw-r--r--inventory/host_vars/ch-equinox-ws.yml1
-rw-r--r--roles/installer/ubuntu/autoinstall/defaults/main.yml1
-rw-r--r--roles/installer/ubuntu/autoinstall/templates/autoinstall.yml.j221
4 files changed, 17 insertions, 7 deletions
diff --git a/inventory/host_vars/ch-equinox-t450s.yml b/inventory/host_vars/ch-equinox-t450s.yml
index 07e593d3..5c2d9a97 100644
--- a/inventory/host_vars/ch-equinox-t450s.yml
+++ b/inventory/host_vars/ch-equinox-t450s.yml
@@ -95,7 +95,6 @@ ws_base_extra_packages:
- dh-lua
- dh-make
- dh-python
- - dh-systemd
- devscripts
- dfu-programmer
- docker.io
diff --git a/inventory/host_vars/ch-equinox-ws.yml b/inventory/host_vars/ch-equinox-ws.yml
index 8d1b1dc7..7552382a 100644
--- a/inventory/host_vars/ch-equinox-ws.yml
+++ b/inventory/host_vars/ch-equinox-ws.yml
@@ -96,7 +96,6 @@ ws_base_extra_packages:
- dh-lua
- dh-make
- dh-python
- - dh-systemd
- devscripts
- dfu-programmer
- docker.io
diff --git a/roles/installer/ubuntu/autoinstall/defaults/main.yml b/roles/installer/ubuntu/autoinstall/defaults/main.yml
index 1115442e..a470dfac 100644
--- a/roles/installer/ubuntu/autoinstall/defaults/main.yml
+++ b/roles/installer/ubuntu/autoinstall/defaults/main.yml
@@ -10,6 +10,7 @@ ubuntu_autoinstall_timezone: Europe/Vienna
# ubuntu_autoinstall_kernel_image:
ubuntu_autoinstall_virtual_machine: no
+# ubuntu_autoinstall_desktop: xubuntu
ubuntu_autoinstall_efi_esp_size: 128M
diff --git a/roles/installer/ubuntu/autoinstall/templates/autoinstall.yml.j2 b/roles/installer/ubuntu/autoinstall/templates/autoinstall.yml.j2
index 7add2640..4d83c6b2 100644
--- a/roles/installer/ubuntu/autoinstall/templates/autoinstall.yml.j2
+++ b/roles/installer/ubuntu/autoinstall/templates/autoinstall.yml.j2
@@ -211,7 +211,10 @@ autoinstall:
- {{ key }}
{% endfor %}
runcmd:
- - [ apt-get, -y, -q, purge, snapd, cloud-init, cloud-guest-utils, cloud-initramfs-copymods, cloud-initramfs-dyn-netconf, python3-cryptography, gpg, sosreport, update-notifier-common, ssh-import-id ]
+ - [ apt-get, -y, -q, purge, cloud-init, cloud-guest-utils, cloud-initramfs-copymods, cloud-initramfs-dyn-netconf, sosreport, update-notifier-common ]
+{% if ubuntu_autoinstall_desktop is undefined %}
+ - [ apt-get, -y, -q, purge, snapd, python3-cryptography, gpg, ssh-import-id ]
+{% endif %}
- [ rm, -rf, /etc/cloud, /var/lib/cloud ]
- [ apt-get, -y, -q, auto-remove ]
- [ bash, -c, 'dpkg -l | grep "^rc" | awk "{ print(\$2) }" | xargs dpkg -P' ]
@@ -228,6 +231,9 @@ autoinstall:
packages:
- python3
- python3-apt
+{% if ubuntu_autoinstall_desktop is defined %}
+ - {{ ubuntu_autoinstall_desktop }}-desktop^
+{% endif %}
{% for task in ubuntu_autoinstall_install_tasks %}
- {{ task }}^
{% endfor %}
@@ -237,20 +243,25 @@ autoinstall:
{% 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 %}
- - curtin in-target --target=/target -- apt-mark manual iputils-ping isc-dhcp-client netcat-openbsd netplan.io sudo
- - curtin in-target --target=/target -- apt-get -y -q purge policykit-1 multipath-tools ubuntu-minimal unattended-upgrades sound-theme-freedesktop thin-provisioning-tools cryptsetup byobu open-iscsi btrfs-progs pollinate lxd-agent-loader open-vm-tools
+ - curtin in-target --target=/target -- apt-get -y -q purge multipath-tools open-vm-tools
{% if ubuntu_installer_codename != 'focal' %}
- curtin in-target --target=/target -- apt-get -y -q purge systemd-oomd
{% endif %}
-{% if install.disks.primary != "software-raid" %}
+{% if ubuntu_autoinstall_desktop is undefined %}
+ - curtin in-target --target=/target -- apt-mark manual iputils-ping isc-dhcp-client netcat-openbsd netplan.io sudo
+ - curtin in-target --target=/target -- apt-get -y -q purge policykit-1 ubuntu-minimal unattended-upgrades sound-theme-freedesktop thin-provisioning-tools cryptsetup byobu open-iscsi btrfs-progs pollinate lxd-agent-loader
+{% if install.disks.primary != "software-raid" %}
- curtin in-target --target=/target -- apt-get -y -q purge mdadm
-{% endif %}
+{% endif %}
- curtin in-target --target=/target -- env SUDO_FORCE_REMOVE=yes apt-get -y -q purge sudo
+{% endif %}
- curtin in-target --target=/target -- apt-get -y -q autoremove
- curtin in-target --target=/target -- bash -c 'dpkg -l | grep "^rc" | awk "{ print(\$2) }" | xargs dpkg -P'
+{% if ubuntu_autoinstall_desktop is undefined %}
{# purging the snapd package here would trigger a bug in den postrm script because some filesystems in /run/ can not be unmounted... #}
{# to workadound this issue we only remove the package here and rely on cloud-init to fully purge it on first boot (see user-data: above) #}
- curtin in-target --target=/target -- apt-get -y -q remove snapd
+{% endif %}
- curtin in-target --target=/target -- bash -c 'apt-get update -q && apt-get full-upgrade -y -q'
{% if ubuntu_autoinstall_kernel_image is defined or ubuntu_autoinstall_virtual_machine %}