Files
computer-playbook/tasks/utils/apt/README.md
kevinveenbirkenbachandClaude Opus 4.8 65240096cf fix(bootstrap): gate apt-daily neutralize on a running systemd
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>
2026-07-18 19:53:20 +02:00

31 lines
977 B
Markdown

# apt readiness tasks
Included by [tasks/stages/01_constructor.yml](../../stages/01_constructor.yml)
before the first apt task of a play.
- [ready.yml](./ready.yml) is the entry point: it gates the neutralize
include on `DOCKER_IN_CONTAINER` and always waits for the dpkg lock.
- [neutralize.yml](./neutralize.yml) stops and masks the apt-daily units,
gated on a running systemd (`/run/systemd/system`, the sd_booted
convention).
```mermaid
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
```