Matrix Docker Ansible eploy
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

114 строки
6.1 KiB

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