mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-10 04:36:40 +00:00
LITELLM_BACKEND_ROLES read lookup('deployment').groups, which deployment.py
fills from group_names. That variable is host-scoped: it lists only the groups
the host currently being processed belongs to.
On a swarm round the manager carries svc-ai-ollama, svc-ai-lmstudio and
svc-ai-litellm while the workers carry three groups and none of them is an AI
backend. Both branches of LITELLM_CHAT_MODEL therefore missed on a worker and,
with OPENROUTER_API_KEY empty, the model resolved to the empty string.
Only one task made that visible. Every stateful task in the gateway include
carries delegate_to STACK_HOST plus run_once, so it templates in the manager's
scope and wrote the correct model into the database. The assert carries
neither, so it re-templated in each worker's own scope and failed there while
the manager passed.
The manager-only membership is not a placement decision. The swarm test
inventory is provisioned with a single --host MGR, so every role of the round's
closure gets that one host, and extend_inventory then widens only
svc-swarm-node, svc-storage-nfs-client, svc-storage-nfs-server and the round's
own application. The three AI roles declare no placement at all; they are
manager-only because nothing widened them.
Add an inventory selector next to the host-scoped one, built from the play-wide
groups magic var, skipping groups without hosts and Ansible's implicit all and
ungrouped, sorted so the cache key is stable. The key takes it too, or two
hosts with equal group_names but different inventories would share an entry.
The blast radius is two readers, both in 16_ai.yml, and both ask only whether
svc-ai-ollama or svc-ai-lmstudio is present. On the manager the new value gains
exactly svc-storage-nfs-server and svc-bkp-nfs-2-local, neither of which either
reader tests, so the manager's answer does not move and only the workers change,
to match it.
This is the third step on the same line. 46a16127fc set .running; b149ad0d22
corrected that to .groups because a targeted apps= round leaves only the
command-line roles in the whitelist. .groups solves the targeted round and not
the multi-host one, because group_names stays host-scoped either way.
Measured in a two-host play with a real group_vars file and the real lookup:
the worker resolves ollama false through group_names and true through the new
selector, the manager is true both ways, and the assert that failed in CI
passes on both hosts.
Requirement 036 named the host-scoped backend selection as the thing that has
to change and deferred it. That residual is closed, so the paragraph now
describes the selector in use and why the two rejected ones are wrong.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Requirements 📋
This directory contains project requirements documents. Its scope is user stories and acceptance criteria that define what the project must do and that guide agent-assisted implementation.
Archive
- 001 - Nextcloud Talk TURN relay
- 001 - Service Registry Refactoring
- 003 - Reduce
applicationsandusersto lookup-only access - 004 - Generic RBAC role auto-provisioning via OpenLDAP
- 005 - WordPress Multisite support for OIDC-driven RBAC
- 006 - Service-gated Playwright tests
- 007 - WordPress to Discourse post round-trip
- 015 - KIX Service Management integration
- 016 - web-app-hugo (Static Site Generator)
- 012 - Package Cache (Nexus 3 OSS)
- 013 - Sub-Beta-to-Beta Lifecycle Promotion for
web-*Roles - 015: Self-built Moodle image (replaces
bitnamilegacy/moodle) - 015 - OpenCloud and OpenTalk IAM integration
- 021 - SSO Flavor Migration (oauth2 + oidc → unified
ssoservice) - 008 - Role Meta Layout Refactoring
- 009 - Per-Role Networks and Ports Migration
- 010 - Role Meta
run_after/lifecycleMigration - 011 - Role
meta/info.ymlMigration - 016 - Fediwall multi-wall via OIDC-protected runtime upload
- 019 - Playwright meta/services.yml parity coverage
- 020 - CI Run 25705903504 Deploy-Failure Remediation Loop
- 022 - Zammad Helpdesk Role with OIDC SSO
- 023 - Setup Penpot
- 025 - Matrix Role Ansible Flavor (matrix-docker-ansible-deploy)
- 028 - atmo.rsvp (AT Protocol Events) Role + Mobilizon/ActivityPub Bridge
- 031 - svc-net-tor: Tor Onion-Service Provider (injected alongside the clearnet domain)