Stop reusing one fact name for two deprecation checks

The `matrix_redis_` -> `redis_` check and the `redis_` -> `valkey_`
check both stored their matches in
`matrix_playbook_migration_redis_migration_vars`.

Facts persist for the whole play, so the second check was silently
overwriting the first one's value. Nothing reads these facts outside the
block that sets them, so this was harmless in practice, but it breaks as
soon as anyone reorders the checks, reads a fact later on, or disables
one of the two checks and expects the other's value to still be around.

Name the second one after its own check, like every other check here
does.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Slavi Pantaleev
2026-08-04 17:55:22 +03:00
parent cbc2dc3d0a
commit 6dbeb9418a
@@ -270,7 +270,7 @@
- when: matrix_playbook_migration_redis_valkey_migration_validation_enabled | bool - when: matrix_playbook_migration_redis_valkey_migration_validation_enabled | bool
block: block:
- ansible.builtin.set_fact: - ansible.builtin.set_fact:
matrix_playbook_migration_redis_migration_vars: |- matrix_playbook_migration_redis_valkey_migration_vars: |-
{{ lookup('ansible.builtin.varnames', '^redis_.+', wantlist=True) }} {{ lookup('ansible.builtin.varnames', '^redis_.+', wantlist=True) }}
- name: (Deprecation) Catch and report redis variables - name: (Deprecation) Catch and report redis variables
@@ -282,8 +282,8 @@
After renaming them, please do not forget to fetch the Ansible role. See docs/maintenance-upgrading-services.md for details about how to do so. After renaming them, please do not forget to fetch the Ansible role. See docs/maintenance-upgrading-services.md for details about how to do so.
The following variables in your configuration need to be renamed: {{ matrix_playbook_migration_redis_migration_vars | join(', ') }} The following variables in your configuration need to be renamed: {{ matrix_playbook_migration_redis_valkey_migration_vars | join(', ') }}
when: "matrix_playbook_migration_redis_migration_vars | length > 0" when: "matrix_playbook_migration_redis_valkey_migration_vars | length > 0"
- when: matrix_playbook_migration_keydb_valkey_migration_validation_enabled | bool - when: matrix_playbook_migration_keydb_valkey_migration_validation_enabled | bool
block: block: