Treat omitted host_apps.enabled as true (#36)
Sync runner checkout / sync (push) Successful in 6s

Closes #35.

## Summary
- `#33` used Jinja `rejectattr('enabled', 'equalto', false)` to skip stopped apps. That filter **requires** the key, so every `host_apps` row that omits `enabled` (the documented default) crashed deploy on all webservers before git/compose.
- Filter with `item.enabled | default(true)` instead, in `app-deploy` and `web-static`. `print_forge` (`enabled: false`) still skipped. `url_shortening_service` and every other omitted-key row deploy again.

## Test plan
- [ ] `ansible-playbook playbooks/deploy-apps.yml --syntax-check`
- [ ] Redeploy `url_shortening_service` beta: `deploy.sh --app url_shortening_service --env beta --ref <sha>`
- [ ] Confirm `print_forge` is still not started (no compose up on 8007/8019)

Reviewed-on: #36
This commit was merged in pull request #36.
This commit is contained in:
2026-09-16 08:21:29 -07:00
parent 726ad971cb
commit 658152088e
3 changed files with 26 additions and 4 deletions
+2 -1
View File
@@ -250,7 +250,8 @@ a DB.
Optional `compose_profiles: [worker]` activates docker compose profiles on that
host only (used for `monica_site` / `college_craft` / `print_forge` dj-queue singleton on adama).
Optional `enabled: false` skips deploy (CI included) but keeps the row for ports
and `stop.sh`. Omit the key (or `true`) to deploy as before.
and `stop.sh`. Omit the key (or `true`) to deploy as before. Do not use Jinja
`rejectattr('enabled')` — missing key is an error, not "enabled".
- Django app = one compose project per env: project name `<app>_<env>`, host port from `host_apps`.
Ports match across app hosts so NPM can balance `adama:PORT` + `roslin:PORT` + `starbuck:PORT` + `apollo:PORT`.