Matrix Docker Ansible eploy
Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.
 
 

127 righe
8.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: "lookup('ansible.builtin.varnames', ('^' + item.old + '$'), wantlist=True) | length > 0"
  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_container_image_registry_prefix'}
  40. - {'old': 'matrix_hookshot_provisioning_enabled', 'new': '<removed - see https://github.com/matrix-org/matrix-hookshot/pull/931 and the `matrix_hookshot_widgets_*` variables>'}
  41. - {'old': 'matrix_hookshot_provisioning_port', 'new': '<removed - see https://github.com/matrix-org/matrix-hookshot/pull/931 and the `matrix_hookshot_widgets_*` variables>'}
  42. - {'old': 'matrix_hookshot_provisioning_secret', 'new': '<removed - see https://github.com/matrix-org/matrix-hookshot/pull/931 and the `matrix_hookshot_widgets_*` variables>'}
  43. - {'old': 'matrix_hookshot_provisioning_internal', 'new': '<removed - see https://github.com/matrix-org/matrix-hookshot/pull/931 and the `matrix_hookshot_widgets_*` variables>'}
  44. - {'old': 'matrix_hookshot_provisioning_hostname', 'new': '<removed - see https://github.com/matrix-org/matrix-hookshot/pull/931 and the `matrix_hookshot_widgets_*` variables>'}
  45. - {'old': 'matrix_hookshot_provisioning_endpoint', 'new': '<removed - see https://github.com/matrix-org/matrix-hookshot/pull/931 and the `matrix_hookshot_widgets_*` variables>'}
  46. - {'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>'}
  47. - {'old': 'matrix_hookshot_docker_image', 'new': 'matrix_hookshot_container_image'}
  48. - {'old': 'matrix_hookshot_docker_image_force_pull', 'new': 'matrix_hookshot_container_image_force_pull'}
  49. - {'old': 'matrix_hookshot_docker_image_registry_prefix', 'new': 'matrix_hookshot_container_image_registry_prefix'}
  50. - {'old': 'matrix_hookshot_docker_image_registry_prefix_upstream', 'new': 'matrix_hookshot_container_image_registry_prefix_upstream'}
  51. - {'old': 'matrix_hookshot_docker_image_registry_prefix_upstream_default', 'new': 'matrix_hookshot_container_image_registry_prefix_upstream_default'}
  52. - {'old': 'matrix_hookshot_docker_src_files_path', 'new': 'matrix_hookshot_container_src_files_path'}
  53. - {'old': 'matrix_hookshot_container_image_force_pull', 'new': '<removed> (the new community.docker.docker_image_pull module handles this natively)'}
  54. - name: Fail if required Hookshot settings not defined
  55. ansible.builtin.fail:
  56. msg: >-
  57. You need to define a required configuration setting (`{{ item }}`).
  58. when: "lookup('vars', item, default='') == ''"
  59. with_items:
  60. - "matrix_hookshot_appservice_token"
  61. - "matrix_hookshot_homeserver_address"
  62. - "matrix_hookshot_homeserver_token"
  63. - "matrix_hookshot_container_network"
  64. - name: Fail if required GitHub settings not defined
  65. ansible.builtin.fail:
  66. msg: >-
  67. You need to define a required configuration setting (`{{ item }}`) to enable GitHub.
  68. when: "matrix_hookshot_github_enabled and lookup('vars', item, default='') == ''"
  69. with_items:
  70. - "matrix_hookshot_github_auth_id"
  71. - "matrix_hookshot_github_webhook_secret"
  72. - name: Fail if required GitHub OAuth settings not defined
  73. ansible.builtin.fail:
  74. msg: >-
  75. You need to define a required configuration setting (`{{ item }}`) to enable GitHub OAuth.
  76. when: "matrix_hookshot_github_oauth_enabled and lookup('vars', item, default='') == ''"
  77. with_items:
  78. - "matrix_hookshot_github_oauth_client_id"
  79. - "matrix_hookshot_github_oauth_client_secret"
  80. - name: Fail if required Jira settings not defined
  81. ansible.builtin.fail:
  82. msg: >-
  83. You need to define a required configuration setting (`{{ item }}`) to enable Jira.
  84. when: "matrix_hookshot_jira_enabled and lookup('vars', item, default='') == ''"
  85. with_items:
  86. - "matrix_hookshot_jira_webhook_secret"
  87. - name: Fail if required Jira OAuth settings not defined
  88. ansible.builtin.fail:
  89. msg: >-
  90. You need to define a required configuration setting (`{{ item }}`) to enable Jira OAuth.
  91. when: "matrix_hookshot_jira_oauth_enabled and lookup('vars', item, default='') == ''"
  92. with_items:
  93. - "matrix_hookshot_jira_oauth_client_id"
  94. - "matrix_hookshot_jira_oauth_client_secret"
  95. - name: Fail if required Figma settings not defined
  96. ansible.builtin.fail:
  97. msg: >-
  98. You need to define at least one Figma instance in `matrix_hookshot_figma_instances` to enable Figma.
  99. when: "matrix_hookshot_figma_enabled and matrix_hookshot_figma_instances | length == 0"
  100. - name: Fail if no Redis queue enabled when Hookshot encryption is enabled
  101. ansible.builtin.fail:
  102. msg: >-
  103. You need to define a required configuration setting (`matrix_hookshot_cache_redis*`) to enable Hookshot encryption.
  104. when: "matrix_hookshot_encryption_enabled and matrix_hookshot_cache_redisUri == ''"
  105. - name: (Deprecation) Catch and report old metrics usage
  106. ansible.builtin.fail:
  107. msg: >-
  108. Your configuration contains a variable (`{{ item }}`), which refers to the old metrics collection system for Hookshot,
  109. which exposed metrics on `https://stats.example.com/hookshot/metrics`.
  110. We now recommend exposing Hookshot metrics in another way, from another URL.
  111. Refer to the changelog for more details: https://github.com/spantaleev/matrix-docker-ansible-deploy/blob/master/CHANGELOG.md#2022-06-22
  112. with_items:
  113. - matrix_hookshot_proxy_metrics
  114. - matrix_hookshot_metrics_endpoint
  115. when: "lookup('ansible.builtin.varnames', ('^' + item + '$'), wantlist=True) | length > 0"