Catch and report bridge variables that use pre-rename prefixes

A single prefix-level catch in matrix_playbook_migration covers all
renamed bridge variable prefixes at once. It always runs (unlike the
per-role validate_config tasks, which only run when a role is enabled),
so a stale old-style _enabled variable cannot silently disable a bridge.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Slavi Pantaleev
2026-07-16 15:07:38 +03:00
parent 24f5d66d4d
commit 0b5b472425
2 changed files with 24 additions and 0 deletions
@@ -73,6 +73,9 @@ matrix_playbook_migration_matrix_jitsi_migration_validation_enabled: true
# Controls if (`matrix_bot_postmoogle_` -> `matrix_bridge_postmoogle_`) validation will run.
matrix_playbook_migration_matrix_bridge_postmoogle_migration_validation_enabled: true
# Controls if validation for the July 2026 bridge variable prefix renames (e.g. `matrix_mautrix_telegram_` -> `matrix_bridge_mautrix_telegram_`) will run.
matrix_playbook_migration_bridge_prefix_rename_validation_enabled: true
# Controls if the old apt repository (likely without a `signed-by` option) on Debian-based systems will be removed.
#
# Older versions of the Docker role (5.x, 6.x) used to install a repository at a path like: `/etc/apt/sources.list.d/download_docker_com_linux_*`
@@ -923,3 +923,24 @@
when:
- matrix_playbook_migration_matrix_synapse_admin_ketesa_variable_transition_checks_enabled | bool
- "lookup('ansible.builtin.varnames', '^matrix_synapse_admin_(enabled|base_path|config|container|hostname|path_prefix|http_|floc_|hsts_|restart_|systemd_)', wantlist=True) | length > 0"
# In July 2026, all bridge roles (`roles/custom/matrix-bridge-*`) had their variable prefixes renamed to a uniform scheme,
# where the variable prefix matches the role directory name (e.g. `matrix_mautrix_telegram_` -> `matrix_bridge_mautrix_telegram_`).
# This catches all old-style prefixes at once and points people to the CHANGELOG, which contains the full rename map.
# Prefixes of bridges removed from the playbook before this rename (e.g. `matrix_mautrix_facebook_`) are intentionally not matched here.
# They are caught by their own dedicated tasks above, which ask for removal instead of renaming.
- name: (Deprecation) Catch and report bridge variables that use pre-rename prefixes
ansible.builtin.fail:
msg: |-
Your configuration contains bridge variables which now have different names.
All bridge variables were renamed so that each variable prefix matches its role directory name (`matrix_bridge_*`).
For example, `matrix_mautrix_telegram_enabled` is now `matrix_bridge_mautrix_telegram_enabled`.
Please rename all such variables in your configuration file (vars.yml).
See the `Bridge variables have been renamed` entry in the CHANGELOG (https://github.com/spantaleev/matrix-docker-ansible-deploy/blob/master/CHANGELOG.md) for the full rename map.
The following variables in your configuration need to be renamed: {{ lookup('ansible.builtin.varnames', '^matrix_(appservice_discord|appservice_irc|beeper_linkedin|heisenbridge|hookshot|mautrix_androidsms|mautrix_bluesky|mautrix_discord|mautrix_gmessages|mautrix_googlechat|mautrix_gvoice|mautrix_imessage|mautrix_meta_instagram|mautrix_meta_messenger|mautrix_signal|mautrix_slack|mautrix_telegram|mautrix_twitter|mautrix_whatsapp|mautrix_wsproxy|meshtastic_relay|mx_puppet_groupme|mx_puppet_steam|postmoogle|rustpush_bridge|sms_bridge|steam_bridge|wechat)_.+', wantlist=True) | join(', ') }}
when:
- matrix_playbook_migration_bridge_prefix_rename_validation_enabled | bool
- "lookup('ansible.builtin.varnames', '^matrix_(appservice_discord|appservice_irc|beeper_linkedin|heisenbridge|hookshot|mautrix_androidsms|mautrix_bluesky|mautrix_discord|mautrix_gmessages|mautrix_googlechat|mautrix_gvoice|mautrix_imessage|mautrix_meta_instagram|mautrix_meta_messenger|mautrix_signal|mautrix_slack|mautrix_telegram|mautrix_twitter|mautrix_whatsapp|mautrix_wsproxy|meshtastic_relay|mx_puppet_groupme|mx_puppet_steam|postmoogle|rustpush_bridge|sms_bridge|steam_bridge|wechat)_.+', wantlist=True) | length > 0"