Files
computer-playbook/roles/web-app-kix/tasks/utils/patch/db_credentials.yml
kevinveenbirkenbachandClaude Opus 5 f32812cca0 fix(kix): match the DatabasePw line 01main actually carries
8986b21270 wrote the patch expression from the OTRS convention, looking for
`$Self->{'DatabasePw'} = '...';`. The file does not use that form. Now that
kix_kix_config persists, the line can be read instead of guessed:

    01main:13: 'DatabasePw'     => 'oo4ca3...',

A perl hash entry, the same shape friendica's php array uses, so the expression
becomes friendica's with a different key and terminator.

The wrong expression surfaced because of 2c4e0e18b, on its first run: the deploy
stopped with

    FAILED: no line in 01main matches the patch expression

Before that commit the same deploy would have printed PATCHED and gone green while
01main kept its pre-rotation password -- which is exactly how friendica looked fixed
for months.

Checked against the real line rather than a sample: sed -E with the new expression
returns `'DatabasePw'     => 'NEWPW',` and rc 0, and grep finds DatabasePw on that
line only.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-31 22:20:07 +02:00

8 lines
334 B
YAML

---
- name: "🔑 Realign the password KIX persisted in its config"
include_tasks: "{{ lookup('path_absolute', 'roles/sys-svc-rdbms/tasks/utils/patch_persisted_password.yml') }}"
vars:
patch_volume: "kix_kix_config"
patch_config_rel: "01main"
patch_expression: "s|('DatabasePw'\\s*=>\\s*')[^']*(',)|\\1@PASSWORD@\\2|"