feat: add gated Compose deploy and make inventory the host source of truth
Keep sanitized Compose sources in-repo with a confirmation-gated Ansible playbook, add repo-wide validation, tighten runbook ownership/STOP/review metadata, and archive stale research docs. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -18,6 +18,12 @@ account with sudo. Do a read-only health pass before any reconciliation.
|
||||
- Mutating playbooks require explicit confirmation variables; do not bypass them.
|
||||
- If a reconcile target or service name is not allowlisted, `STOP` — do not invent one.
|
||||
|
||||
## Ownership
|
||||
|
||||
- Owner: personal ops (Windy)
|
||||
- Last reviewed: 2026-08-17
|
||||
- Related systems: Ansible control-plane + all inventory hosts
|
||||
|
||||
## Health report (read-only)
|
||||
|
||||
```bash
|
||||
@@ -63,6 +69,27 @@ Do not use this playbook for a Mailcow update, database migration, DNS record
|
||||
change, or secret rotation. Those operations require their dedicated reviewed
|
||||
and, where appropriate, interactive procedures.
|
||||
|
||||
## Deploy repo-owned Compose (static projects)
|
||||
|
||||
Repo source: `compose/<project>/compose.yml` (non-secret; secrets come from the
|
||||
server-local `.env` via `${VAR}`). Mechanism and per-project status:
|
||||
[`compose/README.md`](../compose/README.md).
|
||||
|
||||
```bash
|
||||
# Read-only: staged-file diff + allowlist/confirmation asserts, no writes
|
||||
ansible-playbook playbooks/compose-deploy.yml --limit vaultwarden --check --diff
|
||||
ansible-playbook playbooks/compose-deploy.yml --limit powerdns --check --diff
|
||||
|
||||
# Apply: stage repo file → validate `docker compose config -q` against the
|
||||
# server .env → backup current file (*.bak-<ts>) → promote → `up -d` (gated)
|
||||
ansible-playbook playbooks/compose-deploy.yml --limit vaultwarden \
|
||||
-e '{"compose_deploy_confirm": true}'
|
||||
```
|
||||
|
||||
The playbook never writes, reads, or transfers the server `.env`. A failed
|
||||
validation never touches the live compose file. Hosts without an allowlisted
|
||||
`compose_repo_project` fail the assert — do not invent targets.
|
||||
|
||||
## Host-level maintenance
|
||||
|
||||
These playbooks cover every inventory host, including the Matrix K3s node:
|
||||
|
||||
Reference in New Issue
Block a user