From 5a520e6b0380956c3e11c19b497d248324483b36 Mon Sep 17 00:00:00 2001 From: Slavi Pantaleev Date: Mon, 19 Feb 2024 10:34:09 +0200 Subject: [PATCH] Add validation task for potential conflict between mautrix-instagram and mautrix-meta-instagram Related to https://github.com/spantaleev/matrix-docker-ansible-deploy/issues/3138 and 367af472ea2e659f2cd --- roles/custom/matrix-base/tasks/validate_config.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/roles/custom/matrix-base/tasks/validate_config.yml b/roles/custom/matrix-base/tasks/validate_config.yml index d96fda89070..3ca6061b449 100644 --- a/roles/custom/matrix-base/tasks/validate_config.yml +++ b/roles/custom/matrix-base/tasks/validate_config.yml @@ -85,3 +85,15 @@ To clean up your server from mx-puppet-skype's presence, see this changelog entry: https://github.com/spantaleev/matrix-docker-ansible-deploy/blob/master/CHANGELOG.md#mx-puppet-skype-removal. If you still need bridging to Skype, consider switching to the go-skype bridge instead. See `docs/configuring-playbook-bridge-go-skype-bridge.md`. when: "'matrix_mx_puppet_skype_enabled' in vars" + +- name: Fail if mautrix-instagram and mautrix-meta-instagram are in conflict + ansible.builtin.fail: + msg: >- + Your configuration enables both the old mautrix-instagram bridge and the new mautrix-meta-instagram bridge. + By default, both bridges are configured to use the same bridge bot username (`@{{ matrix_mautrix_meta_instagram_appservice_username }}:{{ matrix_domain }}`) which is a conflict. + We recommend that you disable at least one of the bridges (preferrably the old mautrix-instagram bridge), or to resolve the conflict in another way. + To resolve the conflict without disabling a bridge, consider adjusting one of `matrix_mautrix_instagram_appservice_bot_username` or `matrix_mautrix_meta_instagram_appservice_username` - they both have a value of {{ matrix_mautrix_meta_instagram_appservice_username }} right now. + when: + - matrix_mautrix_instagram_enabled | bool + - matrix_mautrix_meta_instagram_enabled | bool + - matrix_mautrix_instagram_appservice_bot_username == matrix_mautrix_meta_instagram_appservice_username