mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-08 11:46:35 +00:00
Every Ansible rescue: block used to carry ad-hoc per-role failure dumps that drifted apart and captured different subsets. Replace them all with one diagnostics script (scripts/system/diagnostics/rescue.sh) that snapshots containers (full logs plus inspect per container), swarm services (ps plus logs per service), journal, host resources, runtime info and stats into a per-run folder and always exits 1 so the deploy still fails. A new lint enforces the shape: every rescue ends with the script, at most one nocheck-justified extra task before it (postgres pg_hba dump, xwiki extension-repo probe), and a nocheck rescue-recovery exemption for the one block that must genuinely recover: keycloak object updates, where a cross-node reschedule needs a swarm-wide node re-resolve plus a delegate_to change that only a rescue can express; its recovery is kept and now also captures diagnostics before the terminal failure. The snapshot folder path is a group_vars SPOT: DIR_RESCUE_DIAGNOSTICS and DIR_VAR_LIB live in group_vars/all/05_paths.yml as plain strings; new env handlers derive INFINITO_RESCUE_DIAGNOSTICS_DIR and INFINITO_DIR_VAR_LIB from it for the generated .env, replacing the default.env entries, and the play-level environment forwards the value to every task host so rescue.sh needs no second default. CI uploads the folder like the inventory and playwright artifacts: compose copies it out of the deploy container in dedicated.sh, swarm captures per node (manager and both workers) into node-named subfolders. Deleting the ad-hoc dumps orphaned helper files (postgres inspect_container, terminator docker_diagnostics, peertube diagnostics, matomo bootstrap debug, xwiki and openresty rescue includes) and 14 role vars; all removed. Generic pieces of those dumps (runtime version and info, stats, dmesg oom evidence, swapon) moved into the SPOT script instead. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
CI Deploy Scripts
This directory holds the executable CI deploy flows under scripts/tests/deploy/ci/.
For local deploy flows, use ../local/README.md.
Entry Points
| Script | What it does | Notes |
|---|---|---|
all.sh |
Runs one app across all selected distros, serially. | Uses dedicated.sh for the per-distro deploy loop. |
dedicated.sh |
Deploys one app on one distro twice against the same stack. | Performs the full CI cleanup after the run. |