From 98951565c853116d15ff5677ca19808bf081b2dc Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Fri, 10 May 2024 18:12:23 +0200 Subject: ubuntu-installer fixes --- roles/apps/publish/base/defaults/main.yml | 2 +- .../ubuntu/autoinstall/templates/autoinstall.yml.j2 | 16 ++++++++++------ 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/roles/apps/publish/base/defaults/main.yml b/roles/apps/publish/base/defaults/main.yml index 32e1af9f..b87a92e2 100644 --- a/roles/apps/publish/base/defaults/main.yml +++ b/roles/apps/publish/base/defaults/main.yml @@ -1,6 +1,6 @@ --- # apps_publish_zone__example: # name: example -# publisher: invetory-hostname-of-publishing-machine +# publisher: inventory-hostname-of-publishing-machine # certificate_provider: ... # certificate_ca_config: .... diff --git a/roles/installer/ubuntu/autoinstall/templates/autoinstall.yml.j2 b/roles/installer/ubuntu/autoinstall/templates/autoinstall.yml.j2 index 841ebf63..9911f654 100644 --- a/roles/installer/ubuntu/autoinstall/templates/autoinstall.yml.j2 +++ b/roles/installer/ubuntu/autoinstall/templates/autoinstall.yml.j2 @@ -219,6 +219,10 @@ autoinstall: write_files: - content: | #!/bin/bash + for i in $(seq 10 -1 1); do echo "waiting $i seconds for cloud-init to finish."; sleep 1; done + echo "******************************************************************************" + echo "***** getting rid of cloud-init and other crap we neither want nor need! *****" + echo "******************************************************************************" apt-get -y -q purge cloud-init cloud-guest-utils cloud-initramfs-copymods cloud-initramfs-dyn-netconf sosreport update-notifier-common ubuntu-pro-client {% if ubuntu_autoinstall_desktop is undefined %} apt-get -y -q purge snapd python3-cryptography gpg ssh-import-id @@ -237,7 +241,7 @@ autoinstall: path: /root/post-cleanup.sh permissions: '0755' runcmd: - - ['systemd-run', '-p', 'StandardOutput=journal+console', '--on-active=10', '/root/post-cleanup.sh'] + - ['systemd-run', '-p', 'StandardOutput=journal+console', '/root/post-cleanup.sh'] ssh: install-server: true @@ -259,15 +263,15 @@ autoinstall: - 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" {% endif %} - curtin in-target --target=/target -- apt-get -y -q purge multipath-tools open-vm-tools -{% if (install_codename | ubuntu_release_compare('>=', 'jammy')) %} +{% if (install_codename | ubuntu_release_compare('>=', 'jammy')) %} - curtin in-target --target=/target -- apt-get -y -q purge systemd-oomd -{% endif %} +{% endif %} +{% if (install_codename | ubuntu_release_compare('>=', 'noble')) %} + - curtin in-target --target=/target -- apt-get -y -q purge ubuntu-kernel-accessories +{% endif %} {% 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 ubuntu-advantage-tools sound-theme-freedesktop thin-provisioning-tools cryptsetup byobu open-iscsi btrfs-progs pollinate lxd-agent-loader ufw -{% if (install_codename | ubuntu_release_compare('>=', 'noble')) %} - - curtin in-target --target=/target -- apt-get -y -q purge ubuntu-kernel-accessories -{% endif %} {% if install.disks.primary != "software-raid" %} - curtin in-target --target=/target -- apt-get -y -q purge mdadm {% endif %} -- cgit v1.2.3