mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-06 10:59:59 +00:00
Replace scripts/system/diagnostics/rescue.sh with utils/diagnostics/ container.py: one workflow call on failure captures the current level (containers with logs+inspect, swarm services, journal, host resources, in-play role dumps) and recurses itself through every DiD boundary via self-copy, from the runner down to the innermost runtime (RESCUE_MAX_DEPTH). compose and swarm now share an identical failure step; the swarm per-node collector wrapper is gone. All 17 script-only Ansible rescue: blocks are deleted and their bare block: wrappers inlined (plus a wordpress leftover); the three justified blocks (postgres pg_hba, xwiki extensions, keycloak cross-node recovery) keep their evidence tasks and now end in a fail task. Two lints enforce the state: rescue: is forbidden without a '# nocheck: rescue-<reason>' first-task marker, and a block without rescue/always/when or another scoping key must be inlined. sys-service-terminator hoists become to the include apply. Also move routine/08_cleanup.sh to utils/clean/teardown.sh and topology/ to utils/topology/ so routine/ holds only the sequenced flow. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
21 lines
602 B
YAML
21 lines
602 B
YAML
---
|
|
- name: "📐 Normalize final run list"
|
|
ansible.builtin.set_fact:
|
|
system_service_run_list: "{{ (system_service_run_list | default([])) | unique }}"
|
|
|
|
- name: "👁️ Show final run list (debug)"
|
|
ansible.builtin.debug:
|
|
var: system_service_run_list
|
|
when: MODE_DEBUG | bool
|
|
|
|
- name: "▶️ Run collected services"
|
|
ansible.builtin.include_tasks:
|
|
file: 01_run_one.yml
|
|
apply:
|
|
become: true
|
|
loop: "{{ system_service_run_list }}"
|
|
loop_control:
|
|
loop_var: system_service_run_unit
|
|
label: "{{ system_service_run_unit }}"
|
|
when: (system_service_run_list | length) > 0
|