Matrix Docker Ansible eploy
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

121 lines
6.4 KiB

  1. # SPDX-FileCopyrightText: 2022 - 2025 Slavi Pantaleev
  2. # SPDX-FileCopyrightText: 2022 MDAD project contributors
  3. # SPDX-FileCopyrightText: 2024 - 2025 Suguru Hirahara
  4. #
  5. # SPDX-License-Identifier: AGPL-3.0-or-later
  6. ---
  7. - name: (Deprecation) Catch and report renamed Hookshot variables
  8. ansible.builtin.fail:
  9. msg: >-
  10. Your configuration contains a variable, which now has a different name.
  11. Please rename the variable (`{{ item.old }}` -> `{{ item.new }}`) on your configuration file (vars.yml).
  12. when: "item.old in vars"
  13. with_items:
  14. - {'old': 'matrix_hookshot_feeds_interval', 'new': 'matrix_hookshot_feeds_pollIntervalSeconds'}
  15. - {'old': 'matrix_hookshot_generic_urlprefix', 'new': 'matrix_hookshot_generic_urlPrefix'}
  16. - {'old': 'matrix_hookshot_generic_allow_js_transformation_functions', 'new': 'matrix_hookshot_generic_allowJsTransformationFunctions'}
  17. - {'old': 'matrix_hookshot_generic_user_id_prefix', 'new': 'matrix_hookshot_generic_userIdPrefix'}
  18. - {'old': 'matrix_hookshot_github_secret', 'new': 'matrix_hookshot_github_webhook_secret'}
  19. - {'old': 'matrix_hookshot_github_appid', 'new': 'matrix_hookshot_github_auth_id'}
  20. - {'old': 'matrix_hookshot_github_oauth_id', 'new': 'matrix_hookshot_github_oauth_client_id'}
  21. - {'old': 'matrix_hookshot_github_oauth_secret', 'new': 'matrix_hookshot_github_oauth_client_secret'}
  22. - {'old': 'matrix_hookshot_github_oauth_uri', 'new': 'matrix_hookshot_github_oauth_redirect_uri'}
  23. - {'old': 'matrix_hookshot_github_ignore_hooks', 'new': 'matrix_hookshot_github_defaultOptions_ignoreHooks'}
  24. - {'old': 'matrix_hookshot_github_command_prefix', 'new': 'matrix_hookshot_github_defaultOptions_commandPrefix'}
  25. - {'old': 'matrix_hookshot_github_showIssueRoomLink', 'new': 'matrix_hookshot_github_defaultOptions_showIssueRoomLink'}
  26. - {'old': 'matrix_hookshot_github_pr_diff', 'new': 'matrix_hookshot_github_defaultOptions_prDiff'}
  27. - {'old': 'matrix_hookshot_github_including_labels', 'new': 'matrix_hookshot_github_defaultOptions_includingLabels'}
  28. - {'old': 'matrix_hookshot_github_excluding_labels', 'new': 'matrix_hookshot_github_defaultOptions_excludingLabels'}
  29. - {'old': 'matrix_hookshot_github_hotlink_prefix', 'new': 'matrix_hookshot_github_defaultOptions_hotlinkIssues_prefix'}
  30. - {'old': 'matrix_hookshot_jira_secret', 'new': 'matrix_hookshot_jira_webhook_secret'}
  31. - {'old': 'matrix_hookshot_jira_oauth_id', 'new': 'matrix_hookshot_jira_oauth_client_id'}
  32. - {'old': 'matrix_hookshot_jira_oauth_secret', 'new': 'matrix_hookshot_jira_oauth_client_secret'}
  33. - {'old': 'matrix_hookshot_jira_oauth_uri', 'new': 'matrix_hookshot_jira_oauth_client_secret'}
  34. - {'old': 'matrix_hookshot_gitlab_secret', 'new': 'matrix_hookshot_gitlab_webhook_secret'}
  35. - {'old': 'matrix_hookshot_ident', 'new': 'matrix_hookshot_identifier'}
  36. - {'old': 'matrix_hookshot_queue_host', 'new': 'matrix_hookshot_cache_redis_host'}
  37. - {'old': 'matrix_hookshot_queue_port', 'new': 'matrix_hookshot_cache_redis_port'}
  38. - {'old': 'matrix_hookshot_experimental_encryption_enabled', 'new': 'matrix_hookshot_encryption_enabled'}
  39. - {'old': 'matrix_hookshot_docker_image_name_prefix', 'new': 'matrix_hookshot_docker_image_registry_prefix'}
  40. - name: Fail if required Hookshot settings not defined
  41. ansible.builtin.fail:
  42. msg: >-
  43. You need to define a required configuration setting (`{{ item }}`).
  44. when: "vars[item] == ''"
  45. with_items:
  46. - "matrix_hookshot_appservice_token"
  47. - "matrix_hookshot_homeserver_address"
  48. - "matrix_hookshot_homeserver_token"
  49. - "matrix_hookshot_container_network"
  50. - name: Fail if required GitHub settings not defined
  51. ansible.builtin.fail:
  52. msg: >-
  53. You need to define a required configuration setting (`{{ item }}`) to enable GitHub.
  54. when: "matrix_hookshot_github_enabled and vars[item] == ''"
  55. with_items:
  56. - "matrix_hookshot_github_auth_id"
  57. - "matrix_hookshot_github_webhook_secret"
  58. - name: Fail if required GitHub OAuth settings not defined
  59. ansible.builtin.fail:
  60. msg: >-
  61. You need to define a required configuration setting (`{{ item }}`) to enable GitHub OAuth.
  62. when: "matrix_hookshot_github_oauth_enabled and vars[item] == ''"
  63. with_items:
  64. - "matrix_hookshot_github_oauth_client_id"
  65. - "matrix_hookshot_github_oauth_client_secret"
  66. - name: Fail if required Jira settings not defined
  67. ansible.builtin.fail:
  68. msg: >-
  69. You need to define a required configuration setting (`{{ item }}`) to enable Jira.
  70. when: "matrix_hookshot_jira_enabled and vars[item] == ''"
  71. with_items:
  72. - "matrix_hookshot_jira_webhook_secret"
  73. - name: Fail if required Jira OAuth settings not defined
  74. ansible.builtin.fail:
  75. msg: >-
  76. You need to define a required configuration setting (`{{ item }}`) to enable Jira OAuth.
  77. when: "matrix_hookshot_jira_oauth_enabled and vars[item] == ''"
  78. with_items:
  79. - "matrix_hookshot_jira_oauth_client_id"
  80. - "matrix_hookshot_jira_oauth_client_secret"
  81. - name: Fail if required Figma settings not defined
  82. ansible.builtin.fail:
  83. msg: >-
  84. You need to define at least one Figma instance in `matrix_hookshot_figma_instances` to enable Figma.
  85. when: "matrix_hookshot_figma_enabled and matrix_hookshot_figma_instances | length == 0"
  86. - name: Fail if required provisioning settings not defined
  87. ansible.builtin.fail:
  88. msg: >-
  89. You need to define a required configuration setting (`{{ item }}`) to enable provisioning.
  90. when: "matrix_hookshot_provisioning_enabled and vars[item] == ''"
  91. with_items:
  92. - "matrix_hookshot_provisioning_secret"
  93. - name: Fail if no Redis queue enabled when Hookshot encryption is enabled
  94. ansible.builtin.fail:
  95. msg: >-
  96. You need to define a required configuration setting (`matrix_hookshot_cache_redis*`) to enable Hookshot encryption.
  97. when: "matrix_hookshot_encryption_enabled and matrix_hookshot_cache_redisUri == ''"
  98. - name: (Deprecation) Catch and report old metrics usage
  99. ansible.builtin.fail:
  100. msg: >-
  101. Your configuration contains a variable (`{{ item }}`), which refers to the old metrics collection system for Hookshot,
  102. which exposed metrics on `https://stats.example.com/hookshot/metrics`.
  103. We now recommend exposing Hookshot metrics in another way, from another URL.
  104. Refer to the changelog for more details: https://github.com/spantaleev/matrix-docker-ansible-deploy/blob/master/CHANGELOG.md#2022-06-22
  105. with_items:
  106. - matrix_hookshot_proxy_metrics
  107. - matrix_hookshot_metrics_endpoint
  108. when: "item in vars"