The entity name keys a role's instance directory, its compose project and its container name, and was derived only by stripping the longest matching category prefix. Two roles under different categories whose names share a suffix therefore collapse onto one entity and overwrite each other's rendered stack, which no provides: can repair. A literal entity_name in vars/main.yml now wins over the derivation. web-app-seaweedfs-console takes its shorter name back and declares the entity seaweedfs-console, which frees the seaweedfs key in its own services map for the engine consumer and removes the provides:, covers: and alias entries that stood in for it. A new lint pairs the declaration with the primary key it has to match, because a drift between them would drop the role from the provider set in silence. Compared across all 288 roles, exactly one entity changes, and it restores what main already keeps on disk, so no instance directory moves. The function and the filter lose their get_ prefix. Two lints read that prefix as the discriminator between the variable and the filter that fills it; both discriminate on the pipe now. Ansible's templar resolves a filter and a same-named variable independently, verified against ansible-core 2.20.2. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Cleanup Utilities 🧹
This directory contains helpers that mutate persistent on-host state during purge flows.
Scope 📋
Modules under utils/cleanup/ MUST limit themselves to wiping or normalising state that survives compose and volume purges (for example secrets, token stores, cached registry data) so the surrounding entity-keyed purge primitives stay focused on stack-level cleanup.
Modules under utils/cleanup/ MUST NOT take over responsibilities that belong to the entity-keyed purge primitives in scripts/container/purge/entity/ (database drop, compose down, filesystem removal).
Usage 🛠️
Every module here SHOULD expose a callable function for in-process use and a __main__ shim so the same code path is reachable from shell orchestrators via python -m utils.cleanup.<module>.
The host-side purge flow invokes these modules through the app-keyed orchestrator apps.sh.