mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-06 10:59:59 +00:00
The guide job runs the README command in a plain docker-run container where systemd is not PID 1, so stopping apt-daily died with "Service is in unknown state". Extract the neutralize block into tasks/utils/apt/neutralize.yml behind the sd_booted check (/run/systemd/system); ready.yml keeps the container gate on the include and always waits for the dpkg lock. A README documents the gate chain with a mermaid schema. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
977 B
977 B
apt readiness tasks
Included by tasks/stages/01_constructor.yml before the first apt task of a play.
- ready.yml is the entry point: it gates the neutralize
include on
DOCKER_IN_CONTAINERand always waits for the dpkg lock. - neutralize.yml stops and masks the apt-daily units,
gated on a running systemd (
/run/systemd/system, the sd_booted convention).
flowchart TB
stage01["01_constructor.yml"]
ready["ready.yml"]
incontainer{"DOCKER_IN_CONTAINER?"}
neutralize["neutralize.yml"]
sdbooted{"/run/systemd/system exists?"}
stopmask["stop and mask the apt-daily timers and services"]
wait["wait for the dpkg lock"]
stage01 --> ready
ready --> incontainer
incontainer -->|"true"| neutralize
incontainer -->|"false"| wait
neutralize --> sdbooted
sdbooted -->|"true"| stopmask
sdbooted -->|"false"| wait
stopmask --> wait