2025-02-28 18:41:23 +09:00
# SPDX-FileCopyrightText: 2022 - 2025 Slavi Pantaleev
# SPDX-FileCopyrightText: 2022 MDAD project contributors
2025-03-05 13:30:50 +09:00
# SPDX-FileCopyrightText: 2024 - 2025 Suguru Hirahara
2025-02-28 18:41:23 +09:00
#
# SPDX-License-Identifier: AGPL-3.0-or-later
2022-01-30 17:46:40 +01:00
---
2022-11-30 08:13:39 +02:00
- name : (Deprecation) Catch and report renamed Hookshot variables
ansible.builtin.fail :
msg : >-
Your configuration contains a variable, which now has a different name.
2025-03-05 13:30:50 +09:00
Please rename the variable (`{{ item.old }}` -> `{{ item.new }}`) on your configuration file (vars.yml).
2025-07-26 17:49:52 +03:00
when : "lookup('ansible.builtin.varnames', ('^' + item.old + '$'), wantlist=True) | length > 0"
2022-11-30 08:13:39 +02:00
with_items :
- {'old': 'matrix_hookshot_feeds_interval', 'new' : 'matrix_hookshot_feeds_pollIntervalSeconds' }
- {'old': 'matrix_hookshot_generic_urlprefix', 'new' : 'matrix_hookshot_generic_urlPrefix' }
- {'old': 'matrix_hookshot_generic_allow_js_transformation_functions', 'new' : 'matrix_hookshot_generic_allowJsTransformationFunctions' }
- {'old': 'matrix_hookshot_generic_user_id_prefix', 'new' : 'matrix_hookshot_generic_userIdPrefix' }
- {'old': 'matrix_hookshot_github_secret', 'new' : 'matrix_hookshot_github_webhook_secret' }
- {'old': 'matrix_hookshot_github_appid', 'new' : 'matrix_hookshot_github_auth_id' }
- {'old': 'matrix_hookshot_github_oauth_id', 'new' : 'matrix_hookshot_github_oauth_client_id' }
- {'old': 'matrix_hookshot_github_oauth_secret', 'new' : 'matrix_hookshot_github_oauth_client_secret' }
- {'old': 'matrix_hookshot_github_oauth_uri', 'new' : 'matrix_hookshot_github_oauth_redirect_uri' }
- {'old': 'matrix_hookshot_github_ignore_hooks', 'new' : 'matrix_hookshot_github_defaultOptions_ignoreHooks' }
- {'old': 'matrix_hookshot_github_command_prefix', 'new' : 'matrix_hookshot_github_defaultOptions_commandPrefix' }
- {'old': 'matrix_hookshot_github_showIssueRoomLink', 'new' : 'matrix_hookshot_github_defaultOptions_showIssueRoomLink' }
- {'old': 'matrix_hookshot_github_pr_diff', 'new' : 'matrix_hookshot_github_defaultOptions_prDiff' }
- {'old': 'matrix_hookshot_github_including_labels', 'new' : 'matrix_hookshot_github_defaultOptions_includingLabels' }
- {'old': 'matrix_hookshot_github_excluding_labels', 'new' : 'matrix_hookshot_github_defaultOptions_excludingLabels' }
- {'old': 'matrix_hookshot_github_hotlink_prefix', 'new' : 'matrix_hookshot_github_defaultOptions_hotlinkIssues_prefix' }
- {'old': 'matrix_hookshot_jira_secret', 'new' : 'matrix_hookshot_jira_webhook_secret' }
- {'old': 'matrix_hookshot_jira_oauth_id', 'new' : 'matrix_hookshot_jira_oauth_client_id' }
- {'old': 'matrix_hookshot_jira_oauth_secret', 'new' : 'matrix_hookshot_jira_oauth_client_secret' }
- {'old': 'matrix_hookshot_jira_oauth_uri', 'new' : 'matrix_hookshot_jira_oauth_client_secret' }
- {'old': 'matrix_hookshot_gitlab_secret', 'new' : 'matrix_hookshot_gitlab_webhook_secret' }
2024-01-09 09:56:21 +02:00
- {'old': 'matrix_hookshot_ident', 'new' : 'matrix_hookshot_identifier' }
2024-04-17 15:34:56 +03:00
- {'old': 'matrix_hookshot_queue_host', 'new' : 'matrix_hookshot_cache_redis_host' }
- {'old': 'matrix_hookshot_queue_port', 'new' : 'matrix_hookshot_cache_redis_port' }
2024-11-29 17:51:11 +02:00
- {'old': 'matrix_hookshot_experimental_encryption_enabled', 'new' : 'matrix_hookshot_encryption_enabled' }
2025-02-24 07:59:37 +02:00
- {'old': 'matrix_hookshot_docker_image_name_prefix', 'new' : 'matrix_hookshot_docker_image_registry_prefix' }
2025-05-16 22:45:37 +03:00
- {'old': 'matrix_hookshot_provisioning_enabled', 'new' : '<removed - see https://github.com/matrix-org/matrix-hookshot/pull/931 and the `matrix_hookshot_widgets_*` variables>' }
- {'old': 'matrix_hookshot_provisioning_port', 'new' : '<removed - see https://github.com/matrix-org/matrix-hookshot/pull/931 and the `matrix_hookshot_widgets_*` variables>' }
- {'old': 'matrix_hookshot_provisioning_secret', 'new' : '<removed - see https://github.com/matrix-org/matrix-hookshot/pull/931 and the `matrix_hookshot_widgets_*` variables>' }
- {'old': 'matrix_hookshot_provisioning_internal', 'new' : '<removed - see https://github.com/matrix-org/matrix-hookshot/pull/931 and the `matrix_hookshot_widgets_*` variables>' }
- {'old': 'matrix_hookshot_provisioning_hostname', 'new' : '<removed - see https://github.com/matrix-org/matrix-hookshot/pull/931 and the `matrix_hookshot_widgets_*` variables>' }
- {'old': 'matrix_hookshot_provisioning_endpoint', 'new' : '<removed - see https://github.com/matrix-org/matrix-hookshot/pull/931 and the `matrix_hookshot_widgets_*` variables>' }
- {'old': 'matrix_hookshot_container_labels_provisioning_enabled', 'new' : '<removed - see https://github.com/matrix-org/matrix-hookshot/pull/931 and the `matrix_hookshot_widgets_*` variables>' }
2022-11-30 08:13:39 +02:00
2024-01-13 17:13:29 +02:00
- name : Fail if required Hookshot settings not defined
2022-07-18 10:39:08 +03:00
ansible.builtin.fail :
2022-01-30 17:46:40 +01:00
msg : >-
You need to define a required configuration setting (`{{ item }}`).
when : "vars[item] == ''"
with_items :
- "matrix_hookshot_appservice_token"
2024-01-07 17:04:23 +02:00
- "matrix_hookshot_homeserver_address"
2022-01-30 17:46:40 +01:00
- "matrix_hookshot_homeserver_token"
2024-01-13 17:13:29 +02:00
- "matrix_hookshot_container_network"
2022-01-30 17:46:40 +01:00
- name : Fail if required GitHub settings not defined
2022-07-18 10:39:08 +03:00
ansible.builtin.fail :
2022-01-30 17:46:40 +01:00
msg : >-
You need to define a required configuration setting (`{{ item }}`) to enable GitHub.
when : "matrix_hookshot_github_enabled and vars[item] == ''"
with_items :
2022-11-30 08:13:39 +02:00
- "matrix_hookshot_github_auth_id"
- "matrix_hookshot_github_webhook_secret"
2022-01-30 17:46:40 +01:00
- name : Fail if required GitHub OAuth settings not defined
2022-07-18 10:39:08 +03:00
ansible.builtin.fail :
2022-01-30 17:46:40 +01:00
msg : >-
You need to define a required configuration setting (`{{ item }}`) to enable GitHub OAuth.
when : "matrix_hookshot_github_oauth_enabled and vars[item] == ''"
with_items :
2022-11-30 08:13:39 +02:00
- "matrix_hookshot_github_oauth_client_id"
- "matrix_hookshot_github_oauth_client_secret"
2022-01-30 17:46:40 +01:00
- name : Fail if required Jira settings not defined
2022-07-18 10:39:08 +03:00
ansible.builtin.fail :
2022-01-30 17:46:40 +01:00
msg : >-
You need to define a required configuration setting (`{{ item }}`) to enable Jira.
when : "matrix_hookshot_jira_enabled and vars[item] == ''"
with_items :
2022-11-30 08:13:39 +02:00
- "matrix_hookshot_jira_webhook_secret"
2022-01-30 17:46:40 +01:00
- name : Fail if required Jira OAuth settings not defined
2022-07-18 10:39:08 +03:00
ansible.builtin.fail :
2022-01-30 17:46:40 +01:00
msg : >-
You need to define a required configuration setting (`{{ item }}`) to enable Jira OAuth.
when : "matrix_hookshot_jira_oauth_enabled and vars[item] == ''"
with_items :
2022-11-30 08:13:39 +02:00
- "matrix_hookshot_jira_oauth_client_id"
- "matrix_hookshot_jira_oauth_client_secret"
2022-01-30 17:46:40 +01:00
- name : Fail if required Figma settings not defined
2022-07-18 10:39:08 +03:00
ansible.builtin.fail :
2022-01-30 17:46:40 +01:00
msg : >-
2022-11-30 08:13:39 +02:00
You need to define at least one Figma instance in `matrix_hookshot_figma_instances` to enable Figma.
when : "matrix_hookshot_figma_enabled and matrix_hookshot_figma_instances | length == 0"
2022-01-30 17:46:40 +01:00
2023-12-16 09:23:35 +02:00
- name : Fail if no Redis queue enabled when Hookshot encryption is enabled
ansible.builtin.fail :
msg : >-
2024-04-17 15:34:56 +03:00
You need to define a required configuration setting (`matrix_hookshot_cache_redis*`) to enable Hookshot encryption.
2024-11-29 17:51:11 +02:00
when : "matrix_hookshot_encryption_enabled and matrix_hookshot_cache_redisUri == ''"
2023-12-16 09:23:35 +02:00
2022-06-23 17:44:11 +03:00
- name : (Deprecation) Catch and report old metrics usage
2022-07-18 10:39:08 +03:00
ansible.builtin.fail :
2022-06-23 17:44:11 +03:00
msg : >-
Your configuration contains a variable (`{{ item }}`), which refers to the old metrics collection system for Hookshot,
2024-10-17 22:17:56 +09:00
which exposed metrics on `https://stats.example.com/hookshot/metrics`.
2022-06-23 17:44:11 +03:00
We now recommend exposing Hookshot metrics in another way, from another URL.
Refer to the changelog for more details : https://github.com/spantaleev/matrix-docker-ansible-deploy/blob/master/CHANGELOG.md#2022-06-22
with_items :
- matrix_hookshot_proxy_metrics
- matrix_hookshot_metrics_endpoint
2025-07-26 17:49:52 +03:00
when : "lookup('ansible.builtin.varnames', ('^' + item + '$'), wantlist=True) | length > 0"