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.
 
 

118 lines
6.2 KiB

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