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

52 строки
2.6 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 SchildiChat Web settings
  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_client_schildichat_welcome_user_id', 'new': '<removed>'}
  13. - name: Fail if required SchildiChat Web settings not defined
  14. ansible.builtin.fail:
  15. msg: >
  16. You need to define a required configuration setting (`{{ item }}`) for using SchildiChat Web.
  17. when: "vars[item] == ''"
  18. with_items:
  19. - matrix_client_schildichat_default_hs_url
  20. - matrix_client_schildichat_container_network
  21. - name: Fail if SchildiChat location sharing enabled, but no tile server defined
  22. ansible.builtin.fail:
  23. msg: >-
  24. You need to define at least one map tile server in matrix_client_schildichat_location_sharing_map_style_content_sources_localsource_tiles list
  25. when:
  26. - matrix_client_schildichat_location_sharing_enabled | bool
  27. - matrix_client_schildichat_location_sharing_map_style_content_sources_localsource_tiles | length == 0
  28. - when: matrix_client_schildichat_container_labels_traefik_enabled | bool
  29. block:
  30. - name: Fail if required matrix-client-schildichat Traefik settings not defined
  31. ansible.builtin.fail:
  32. msg: >-
  33. You need to define a required configuration setting (`{{ item }}`).
  34. when: "vars[item] == ''"
  35. with_items:
  36. - matrix_client_schildichat_container_labels_traefik_hostname
  37. - matrix_client_schildichat_container_labels_traefik_path_prefix
  38. # We ensure it doesn't end with a slash, because we handle both (slash and no-slash).
  39. # Knowing that `matrix_client_schildichat_container_labels_traefik_path_prefix` does not end with a slash
  40. # ensures we know how to set these routes up without having to do "does it end with a slash" checks elsewhere.
  41. - name: Fail if matrix_client_schildichat_container_labels_traefik_path_prefix ends with a slash
  42. ansible.builtin.fail:
  43. msg: >-
  44. matrix_client_schildichat_container_labels_traefik_path_prefix (`{{ matrix_client_schildichat_container_labels_traefik_path_prefix }}`) must either be `/` or not end with a slash (e.g. `/schildichat`).
  45. when: "matrix_client_schildichat_container_labels_traefik_path_prefix != '/' and matrix_client_schildichat_container_labels_traefik_path_prefix[-1] == '/'"