From a50362b9cf842cba7d92a0563b34d07ba0943527 Mon Sep 17 00:00:00 2001 From: Jose Date: Wed, 5 Nov 2025 19:16:01 +0100 Subject: [PATCH] =?UTF-8?q?chore=20=F0=9F=93=A6:=20Update=20apt=20cache=20?= =?UTF-8?q?and=20install=20all=20available=20updates=20for=20setupacdc.yml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Updated the setupacdc.yml task to include installing an updated apt cache, upgrading packages, and performing a non-interactive Ubuntu release upgrade. This change enhances the overall reliability of the setup process. --- tasks/setupacdc.yml | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/tasks/setupacdc.yml b/tasks/setupacdc.yml index a0f6d79..d412ab1 100644 --- a/tasks/setupacdc.yml +++ b/tasks/setupacdc.yml @@ -151,13 +151,29 @@ notify: Restart sshd tags: [timezone] + - name: Update apt cache + ansible.builtin.apt: + update_cache: true + + - name: Install all available updates + ansible.builtin.apt: + upgrade: dist + autoremove: true + + - name: Reboot if a new kernel was installed + ansible.builtin.reboot: + msg: "Rebooting after full upgrade" + connect_timeout: 5 + reboot_timeout: 600 + when: ansible_facts.packages is not defined or + ansible_facts.packages['linux-image-generic'] is defined + - name: Ensure update-manager-core is installed ansible.builtin.apt: name: update-manager-core state: present - update_cache: true - - name: Run Ubuntu release upgrade (non-interactive) + - name: Perform Ubuntu release upgrade non-interactively ansible.builtin.command: cmd: do-release-upgrade -f DistUpgradeViewNonInteractive register: upgrade_output