From 24e7c110167adbf8f8d33d8a378f8765bc0371b0 Mon Sep 17 00:00:00 2001 From: Marnik Bercx Date: Wed, 22 Apr 2026 05:53:36 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=84=20Package:=20Move=20`update-notifi?= =?UTF-8?q?er`=20removal=20into=20packaging=20playbook?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Removing the `update-notifier` package during GUI customisation had the side-effect of invalidating apt state in a way that could surface later in the same provisioning run — the `ensure-apt-pip` refresh honoured `cache_valid_time: 86400` and skipped re-updating, so subsequent tasks occasionally failed to find standard packages like `ubuntu-desktop-minimal`, which would break provisioning even if they had already been installed. Move the purge out of `local/tasks/customise-gui.yml` and into `playbook-package.yml`, where it now runs right after the VM reload and before the disk cleanup. This keeps the Software Updater popup off the shipped image (the only place it actually matters — dev VMs re-provisioned locally can still show it, which is not an issue) without touching apt state mid-build. --- local/tasks/customise-gui.yml | 8 -------- playbook-package.yml | 4 ++++ 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/local/tasks/customise-gui.yml b/local/tasks/customise-gui.yml index 1e7bc65..5a3cc8f 100644 --- a/local/tasks/customise-gui.yml +++ b/local/tasks/customise-gui.yml @@ -63,11 +63,3 @@ ansible.builtin.command: cmd: dbus-run-session -- gio set /home/{{ vm_user }}/Desktop/firefox_firefox.desktop metadata::trusted true changed_when: true - -- name: Remove update-notifier - become: true - become_user: "{{ root_user }}" - ansible.builtin.apt: - name: update-notifier - state: absent - purge: true diff --git a/playbook-package.yml b/playbook-package.yml index f454714..b7a832c 100644 --- a/playbook-package.yml +++ b/playbook-package.yml @@ -47,6 +47,10 @@ ansible.builtin.shell: vagrant ssh-config > vagrant-ssh tags: [clean] + - name: Remove update-notifier + ansible.builtin.command: ssh -F vagrant-ssh default "sudo apt-get purge -y update-notifier" + tags: [clean] + - name: Clear bash history ansible.builtin.shell: ssh -F vagrant-ssh default "cat /dev/null > ~/.bash_history && history -c" tags: [clean]