feat(ansible): provision docker-ce on kai-server, replacing snap docker (private /tmp blocks warded) #450
Labels
No labels
burndown-2026-06
coherence-core
consult
headless
interactive
P0
P1
P2
P3
P4
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
coilyco-flight-deck/infrastructure#450
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Why
kai-server's
dockeris the snap package (/snap/bin/docker, canonical rev 3505). Snap confinement gives the docker CLI a private/tmpand only thehomeinterface, so any host-/tmppath handed to the CLI (--env-file,-vmounts, unix sockets) fails to open. This blocks every warded container mode on kai-server:Root cause + the four ward touchpoints are catalogued in coilyco-flight-deck/ward#557 (ward adds a fail-fast preflight there). This issue is the host remediation: swap snap docker for docker-ce so the CLI shares the host filesystem view.
No role owns docker today -
dev-harnessandsignozonlycommand -v dockerand assume it exists. Docker was hand-provisioned as snap. This adds the missing provisioning, the doctrinally-correct rollout home (authoring lives in ward; the fleet converge lives here).Design
Mirror the existing snap-purge idiom already in
playbooks/ser8-bootstrap.yml(it doessnap remove --purge microk8s). This is the first apt +become: trueprovisioning role in the repo, so it sets the schema - ground it againstser8-bootstrap.ymlanddocs/ansible-safety-model.md.New
roles/docker(idempotent,become: trueat role level):snap remove --purge docker, guarded like the microk8s purge (tolerate 'not installed').ansible.builtin.deb822_repository/apt_key+apt_repository).docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin.dockerdenabled + started (ansible.builtin.systemd).usermod -aG docker {{ ansible_user }}sokairuns docker without sudo (matches how snap docker was reachable as kai)./usr/bin/docker, not/snap/bin/docker, at the end.Wiring: gate to kai-server initially (
when: inventory_hostname == 'kai-server'), ordered beforedev-harnessinplaybooks/sync.ymlso the docker-CLI check downstream sees docker-ce. Decide explicitly whether ser8 (k3s standby, does it run warded?) also wants docker-ce before widening the gate - default NO until confirmed, to avoid purging a working docker on a host that does not need the swap.Docs: add
docs/ansible-docker-role.md, link it fromdocs/ansible.mdanddocs/FEATURES.md(trifecta). Note the become/apt-first-instance indocs/ansible-safety-model.mdif it establishes a new privileged pattern.Verify
After the role lands, Kai runs the converge with sudo on kai-server, then
command -v docker->/usr/bin/dockerandwarded directorsurfaces a session cleanly (no exit-125). The converge is operator-run (sudo, host-mutating), not agent-run.Immediate unblock (optional, before the role lands)
Manual on kai-server:
sudo snap remove docker, install docker-ce from Docker's apt repo,sudo usermod -aG docker kai, re-login. But the role is the durable fix - prefer landing it.Diagnosed from a director surface on kai-server, 2026-07-03. See ward#557.
🔒 Reserved by
ward agent --driver claude— containerengineer-claude-infrastructure-450on hostKAI-DESKTOP-TOWERis carrying this issue (reserved 2026-07-03T08:10:33Z). Concurrentward agentruns are blocked until it finishes or the reservation goes stale (2h0m0s TTL);--forceoverrides.— Claude (she/her), via
ward agentWARD-OUTCOME: done - roles/docker swaps snap docker for docker-ce on kai-server (purge, apt repo + keyring, install, dockerd, docker group, /usr/bin/docker assert), wired before dev-harness, landed on main.
The role itself went smoothly. It maps almost one-to-one onto the snap-purge idiom in
ser8-bootstrap.ymland the sibling docker-consuming roles, so the schema was already there to copy. What actually fought back was the pre-commit gate, not the feature. HEAD was already un-committable - the recent MSYS-path-conversion commits left 4-5 line comment blocks that trip thealways_runcode-comments 2-line cap, so nothing could land until I collapsed those in a separate hygiene commit. Then pylint'suv runwanted a Python 3.13 the container's read-only/opt/uvcould not install, so I had to repointUV_PYTHON_INSTALL_DIRat a writable dir to get the gate green. I also learned the code-comments YAML rule the hard way: it only scans tracked files, so my role's inline comments passed--all-fileswhile untracked and then failed the instant Igit added, which sent me folding them up into the header block.Confidence in the code is decent but honestly untested. There is no ansible in this container and the converge is operator-run (sudo, host-mutating), so I could not exercise the role - the spots worth an eyeball are the
deb822_repositoryentry and the suite/architecture templating. Worth filing: the two container-env frictions above (read-only/opt/uvbreaking uv-run pylint, and HEAD landing with cap-busting comment blocks), and the still-open question of whether ser8 wants docker-ce before the kai-server gate widens - I kept it NO per the issue.