From 590d778e5acb39f34b0507702ffb42137e6caa53 Mon Sep 17 00:00:00 2001 From: Samuel James Date: Thu, 3 Sep 2026 16:04:56 +0000 Subject: [PATCH] thinkcenter-update: add dpkg/apt self-heal step (prevents half-configured-package cascade failures) --- life-church/playbooks/thinkcenter-update.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/life-church/playbooks/thinkcenter-update.yml b/life-church/playbooks/thinkcenter-update.yml index 52a0b1f..56534ee 100644 --- a/life-church/playbooks/thinkcenter-update.yml +++ b/life-church/playbooks/thinkcenter-update.yml @@ -70,6 +70,14 @@ that: inventory_hostname == 'thinkcenter' fail_msg: "Refusing to run — this play is scoped to thinkcenter only." + - name: "[selfheal] Repair any half-configured dpkg/apt state (prevents cascade failures)" + ansible.builtin.shell: | + dpkg --configure -a || true + apt-get -y -f install || true + register: dpkg_selfheal + changed_when: "'Setting up' in (dpkg_selfheal.stdout | default(''))" + failed_when: false + - name: "[apt] Update cache + full dist-upgrade" ansible.builtin.apt: update_cache: true