The client update converges defaultClientScopes and optionalClientScopes
and fails with "Desired client scope does not exist in the realm" for a
scope the realm lacks. A realm imported from the current dictionary has
them all, but a realm an older release created does not, and the RBAC
scope was only created later, in 04_rbac_client_scope.yml, after the
convergence had already failed. The Keycloak stage on echoserver stopped
there on its legacy realm.
01_client.yml now reads the realm's client scopes and creates every scope
of KEYCLOAK_DICTIONARY_REALM.clientScopes that is missing, before the
convergence; existing scopes are left alone, and on an imported realm the
step creates nothing. The RBAC-only create in 04 is gone with it.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
web-opt-rdr-domains includes the TLS layer with application_id bound to
domain, so the lazy domain: "{{ _tls_domain }}" the issuance include passed
on resolved through itself and Ansible reported "Recursive loop detected in
template" for every redirect source on echoserver. issue.yml now resolves
the domain into a fact first and passes that.
Two steps ran on every include although their outcome could not change:
- removing the CA trust variables from /etc/environment, three lineinfile
calls each time; it now runs once per host, and sys-ca-selfsigned resets
the flag when it writes the variables, so a play mixing both modes ends
in the same state as before
- the re-check of the certificate files, which could only fail after an
issuance; it moved into issue.yml with the issuance it verifies
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
With AUTO_BUILD_ALIASES enabled, current_play_redirect_domains adds
<entity>.<DOMAIN_PRIMARY> as a redirect source for every application whose
canonical domain differs. web-opt-rdr-domains then asks the tls and cert
lookups about each source, but resolve_term only knew the domains mapping
and applications[*].domains, so the Keycloak stage on echoserver stopped
with "tls: domain 'funkwhale.infinito.nexus' not found".
redirect_targets() turns CURRENT_PLAY_REDIRECT_DOMAINS into a source to
target map, and resolve_term falls back to it, one hop, only where it
raised before, so every term that resolved keeps its answer. The tls and
cert lookups pass the map.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
certbundle names its lineages certbundle-<hash>-<n>, while the cert lookup
reads live/<domain>/fullchain.pem. Since 16023dbc9b removed cert_folder_find,
nothing joined the two, so every letsencrypt deploy with the SAN flavor
stopped at "Let's Encrypt certificate files not found after issuance".
library/cert_link_domains.py points live/<domain> at the newest lineage
whose SAN covers the domain, using the same CertUtils lookup as
cert_check_exists, and swaps the link atomically. A real lineage directory
is left alone, and a domain without a certificate is only reported, so the
letsencrypt re-check still fails loudly on it.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The exact config of a deprecated domain was located through
lookup('nginx', 'files.domain', domain), which asks the tls lookup for
the domain's protocol. A deprecated domain is by definition no longer
served, so the lookup failed with "tls: domain 'flock.town' not found"
and stopped the Keycloak stage on echoserver. The find that already
collected the subdomain configs now also matches <domain>.conf, below
http/ or https/ alike, and the lookup-based task is gone.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
`MODE_CLEANUP` says what to tidy on the deployed system: prune unused Docker
resources, clear Mastodon caches, switch an LDAP user list from `present` to
`exact`. Eight roles read it that way. The dedicated runner read the same flag
and ran `make clean` in the control repository instead, which is
`git clean -fdX` over every ignored path there.
`inventories/production/` is one of those paths. The published host install
guide provisions into it and then deploys against `$INVENTORY/.password`, so
the deploy deleted the vault password it was about to use:
Removing inventories/production/
[ERROR] The vault password file .../inventories/production/.password was
not found
Reproduced in CI on two unrelated rows, arm64/zfs/debian and
amd64/btrfs/centos, so it is neither architecture nor filesystem specific.
The coupling was a name collision, not a decision. 7e5990aa16 generated the
MODE_* flags from `01_modes.yml` and removed the legacy skip flags, and the
repository clean - which had had a flag of its own - was attached to the
generated `MODE_CLEANUP` because one now existed by that name. No other deploy
path does this; `container`, `development` and `swarm` never call `make` at
all.
`make clean` keeps its own entry points, `make setup-clean`, `make clean-sudo`
and `infinito --git-clean`, where a caller asks for it deliberately.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Ansible adds -tt to every task it cannot pipeline when the task
escalates, so ansible.builtin.script ran on a pty, which merges stderr
into stdout and carries whatever the remote session writes to its
terminal. On echoserver, systemd's OSC 3008 context sequence trailed the
JSON of the PostgreSQL cluster detector and from_json stopped the
Phase 3 deploy; the Keycloak group-id reads would have taken the same
bytes into their ids. The mesh transport already asked for no tty per
host for the same reason; the repository default now does it for every
SSH host, so dedicated deploys return the bytes CI and the mesh test.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The swapfile script ran fire-and-forget with poll 0, so Ansible killed it
after ASYNC_TIME. swap-forge 1.0.0 filled a RAM-sized btrfs swapfile
with dd, which on echoserver wrote 28 GiB in those 300 seconds, stalled
btrfs commits long enough for a concurrent sudo to time out, and left a
file of the wrong size that the next deploy deleted and wrote again.
The task now waits for the script, and v1.0.1 allocates with fallocate,
so the run takes seconds.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The resume check stats the pending marker after 04_files.yml has
written it, so it fired in every run that changed a compose file,
logged that the last compose up never completed, and notified
compose-build on top of the compose-up the change had already
notified. A PR CI compose deploy showed it for every role
("Resume the compose up a failed run left pending => changed" right
after "Mark compose up pending => changed").
The marker task now registers its result, and the resume task skips a
marker that this run wrote. A marker a failed run left behind is
unchanged when the file task meets it, so it is still resumed.
Refs #1169
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
A delegated task inherits the play's become and runs sudo on the
controller. The lint flags every delegate_to: localhost whose task,
enclosing block or play does not drop become, include apply: blocks
included, and accepts a localhost-become marker for a step that needs
root there. The e2e test roles only stat repository files and pack to
/tmp, so they drop become; the token-store mirror below
/var/lib/infinito and the NFS controller mount keep it with a marker.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
playbook.yml enables become for the whole play, and a task delegated to
localhost inherits it, so the stat of the role's compose template in
sys-svc-rdbms ran sudo on the control node. The dedicated deploy of
echoserver from an operator workstation stopped there with "sudo: a
password is required"; CI never noticed because its controller is root.
The rdbms consumer stat, the CDN lock-file find and the runner release
lookup are the same case, and none of them needs root.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Shopware's init never ran system:update:finish or the plugin updates
after an image bump, so 6.7.3.1 data on 6.7.13.0 kept its old scheduled
tasks and indexers. The init container now records the shopware/core
version in deployment.version and runs the update chain once whenever
the image ships another one.
EspoCRM's ready marker was boot-once, so a new image never reached the
upstream migrate, and the role's `upgrade -y` with failed_when false hid
that. The marker now names the image version, the deploy asserts that
the data reports it, and the wrapper refuses data written by a newer
EspoCRM. Before the upstream entrypoint runs on existing data, the
wrapper drops data/cache, whose 9.x metadata hides config:get from the
10.x CLI and sent upstream into its install action, and adds the default
and base currency to currencyList, whose absence made every rebuild
divide by zero.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The pending-up marker followed compose.yml, .env and the compose override
but not the role's optional Dockerfile. A run that changed only the
Dockerfile and failed before `compose up` left no marker, so the next run
neither rebuilt nor recreated the containers. The marker now also follows
the Dockerfile task.
Resuming a pending marker notified only compose-up. The compose pull
skips buildable services (`--ignore-buildable`) and only compose-build
builds them, so a resumed up started the previous image. The resume task
now notifies compose-build as well; without a build section in the
project, `compose build` builds nothing.
Reported by CodeRabbit on #1174.
Refs #1169
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
meta/domains.yml lands on the top-level `domains` key of the merged
application, yet three readers still looked under `server.domains`,
which no role fills any more:
- current_play_redirect_domains built every mapping from an empty
config, so each app redirected to itself and was dropped. Neither
`domains.aliases` nor AUTO_BUILD_ALIASES produced a single redirect,
and echoserver's update check listed nextcloud.infinito.nexus and the
other entity domains as dropped by the upgrade.
- csp_skip_domains never found the canonical of a disabled service.
- the logout filter's fallback returned no domains.
The unit tests fed the old layout and passed regardless. They now use
the merged one, and a new test builds the redirect from keycloak's real
role defaults.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
apply_tor_node_onion rewrote host_vars through utils.cache.yaml, whose
!vault constructor returns a plain string and, depending on import order,
wins over the VaultScalar constructor of utils.handler.vault. Provision
calls it after generating credentials, so with svc-net-tor in the include
every credential lost its tag and Ansible rendered the raw ciphertext:
redis got --requirepass '$ANSIBLE_VAULT...', compose cut env values to
";1.1;AES256" and the openldap ldapsm bind failed with result 49.
Write through the round-trip helpers like every other writer in the
package. test_preserves_existing_vault_credentials passes again.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
pull.yml pulls, on the target host, every pinned image of the applications the host deploys, the same closure the update check judges, and lists the images a role builds itself instead. It never touches a container, retries each pull a bounded number of times and fails loudly with the image and the registry error. The update_check filter moves next to the new update_pull filter into plugins/filter/update/, and both read the code pins from one helper.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
is_database() compared the whole repository part of the image reference
against postgres, mariadb, redis, memcached and mongo. Every reference
with a registry or namespace prefix, every derivative image and every
locally built `<engine>_custom` image therefore counted as application
data and went to the mass storage. On a local stack the central
databases report `postgres_custom:18` and `openldap_custom:13.7-slim`,
both classified False and moved to the HDD.
The check now takes the last path component of the reference, drops
digest, tag and a `_custom` suffix, and compares it against the engines
the svc-db-* providers and the app-local databases run: elasticsearch,
mariadb, memcached, mongo, mysql, openldap, opensearch, postgis,
postgres, qdrant, rabbitmq, redis, typesense, valkey.
Volumes the script already symlinked stay where they are; a database
volume misplaced on the HDD has to be moved back by hand.
Fixes#1163
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The template is single-quoted on purpose, because docker expands $n, $p and $bs, not the shell; SC2016 failed make lint-shellcheck on it.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The wizard bypass left ERPNext without a Company, so no app could create quotes, orders or invoices. The deploy now creates the Company from the service provider's name and country, with the currency from ERPNext's country data and an abbreviation that defaults to the name's initials, plus a fiscal year, five tax accounts, a cash account and the default company. It never rewrites an existing Company and fails loudly on a country ERPNext does not know. The README generator marks roles that read the service provider country, and the CI replay fills the placeholder.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The entrypoint stamped an installed volume with the image's version and kept the old tree, so a newer pin never reached it and the CreateUser patch stayed out. On boot it now runs SuiteCRM's own suitecrm:app:upgrade and upgrade-finalize with the image's patched tree as the package, resumes an interrupted upgrade, stamps the version the tree really has, and refuses a tree newer than the pin.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Three docstrings from #1173 claimed that ensure() leaves only the pinned
release on PATH or replaces whatever version PATH finds. It does neither:
it installs the release into /usr/local/bin and fails unless PATH then
resolves to it, so a distribution copy such as /usr/bin/shfmt stays on
disk behind it.
The test module and ensure() lose their docstrings; the module docstring
of the installer returns to the form its siblings use ("Install hadolint
via GitHub-release prebuilt binary.").
Reported by CodeRabbit on #1173.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
CentOS jobs also die on "Failed to download metadata for repo 'epel':
Cannot download repomd.xml ... All mirrors were tried" (feature/store-i18n
run 39658756830, Baserow#0 and Nextcloud#8 aarch64): the failing host's
librepo log shows mirrors that answered and then failed the checksum the
metalink expects, the stale-metalink signature already pinned away for
the CentOS Stream repos, plus TLS errors from two mirrors.
centos_mirror.sh now also rewrites the EPEL repo files: each section's
own commented `#baseurl=https://download.example/pub/epel/...` template
becomes the baseurl on dl.fedoraproject.org and the Fedora metalink line
goes. Using the file's template keeps the path variables of whichever
epel-release is installed (`$releasever${stream:+s}` on CentOS Stream,
`releasever_minor` in newer releases). A file whose metalinks lack that
template stops the script with an error instead of losing its source.
The Dockerfile runs the script again right after
scripts/install/filesystem.sh. Its first run precedes the EPEL install
(filesystem.sh adds epel-release for btrfs-progs), so the image shipped an
unpinned epel.repo, and the failing call, sys-svc-ssh's OpenSSH install,
runs before roles/update/tasks/centos.yml pins anything.
On CentOS Stream the template resolves to epel/10s/, which on
dl.fedoraproject.org serves the same aarch64 repomd.xml as epel/10.4/, the
only path the epel-10s metalink lists.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
With the psql command tags gone the OIDC plugin task stays `ok`, but PeerTube
was still force-recreated on every deploy: "Back-fill column defaults so
bootstrap INSERT keeps NOT NULL" runs an unconditional `ALTER TABLE …
SET DEFAULT`, database_query reports every non-SELECT as changed, and the
task notifies compose-up, which runs `compose up -d --force-recreate`.
A SELECT on information_schema.columns now lists the bootstrap columns
(`nodeVersion`, `nodeABIVersion`) that still have no default, and the ALTER
with its compose-up notification runs only when that list is not empty. A
fresh database still gets the defaults before PeerTube's bootstrap INSERT
retries; every later deploy skips the task. The unused register of the
ALTER task is gone, and both read-only checks now live under
files/sql/check-application/ as the sibling-prefix rule requires.
Refs #1164
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
With `-tA` psql drops headers and the row-count footer but still prints
the command tag of every write statement. A guarded
`UPDATE … RETURNING` that matched nothing therefore came back as
`rows: [['UPDATE 0']]`, and web-app-peertube's oidc/enable.yml, which
judges its change by the row count, reported `changed` and restarted
PeerTube on every deploy after the first.
The PostgreSQL rows flags are now `-qtA`. Probed against a running
postgres container:
-tA -> CREATE TABLE / INSERT 0 1 / UPDATE 0 / 3 / UPDATE 1
-qtA -> 3
SELECT output and the MariaDB path (`--batch --skip-column-names`, no
status line) are unchanged.
Fixes#1164
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>