fix(headscale): bootstrap the TLS cert on a fresh node #65
Loading…
Reference in a new issue
No description provided.
Delete branch "jfraeys/fix/headscale-fresh-node-cert"
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?
Staging run 457 got through 215 tasks of services.yml, then failed at
headscale : Extract certificate from Traefik acme.jsonwithDomain not found in acme.json. The role extracted the cert before starting Headscale, but Traefik only requests it once the Headscale router exists, so any fresh node (staging, and a DR rebuild of production) deadlocked. Production never hit it because its cert already exists.Now: extraction is non-fatal; if no cert is installed, create a 3-day self-signed placeholder; after Headscale is healthy, retry the extraction (40 x 10s) and restart Headscale once the real cert arrives. Steady state (cert present) skips both new steps. The extraction script moved into one role var shared by both tasks. Tested the script for: no acme.json (rc 0), other domain only (rc 1), domain present (installs, modes 644/600); placeholder command output; ansible-lint, yamllint, syntax-check. Behaviour change: a missing domain in acme.json no longer fails the first task when a cert is already installed. 🤖 Generated with Claude Code