mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-08 19:56:53 +00:00
A Multisite subsite served `/wp-login.php` with no SSO entry point even once the OIDC settings reached every site (e1901fb88e), because the plugin was never running there: wp plugin activate <name> --path=<docroot> Without `--network` that activates the main site only, so a subsite had the settings and no plugin. `--network` appears on no branch of this repository, so the gap was everywhere. `services.wordpress.multisite.enabled` now resolves once, in vars/main.yml, and feeds the activation, the multisite conversion gate and playwright.env.j2, which until now recomputed the same lookup inline. The conversion gate also drops a `| default(false)` on a key meta/services.yml always declares. The installer moves out of Ansible into files/shell/install_plugin.sh. Eight tasks interlocking through register/when/until/failed_when read as one linear script, and the contract arrives as environment assignments. The container address stays an inline shell assignment rather than an `environment:` entry because in swarm it is the literal text `"$(resolve-container-id ...)"`, which only the shell evaluates; the body streams over stdin because swarm workers carry no role checkout (03ed52eea5). Moving the logic across languages would have dropped the WP-CLI 255 contract to shellcheck coverage, since the suite has no shell tests. The unit suite therefore now drives the real script against a stubbed `container` wrapper instead of evaluating the task file's `when:` expressions, which exercises the behaviour rather than the text describing it. A mutation pass over that suite -- eight mutations, each required to turn its own guard red -- found two defects before any deploy: * `set -e` is suspended inside an `if` condition, so a probe folded into `if needs_install; then` turned an unreadable version into "nothing to do". The version read is now a standalone call that aborts with 67. * a bare `return` propagates the status of the preceding test, so `[ -n "$WP_PINNED_VERSION" ] || return` aborted the script whenever an unpinned plugin was already present -- the path every redeploy takes. The second hid behind a vacuously passing check, which is why the suite gained exit-code assertions where it previously only counted calls. This commit carries a fix and a refactor together. The `--network` fix lives inside the extracted script's activate(), so separating them would mean reverting the extraction, committing the flag, and reapplying it. No deploy has run any of this, in compose or in swarm. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>