Matrix Docker Ansible eploy
Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.
 
 

55 Zeilen
2.8 KiB

  1. # SPDX-FileCopyrightText: 2023 Nikita Chernyi
  2. # SPDX-FileCopyrightText: 2024 - 2025 Slavi Pantaleev
  3. # SPDX-FileCopyrightText: 2024 Suguru Hirahara
  4. #
  5. # SPDX-License-Identifier: AGPL-3.0-or-later
  6. ---
  7. - name: (Deprecation) Catch and report renamed SchildiChat Web settings
  8. ansible.builtin.fail:
  9. msg: >-
  10. Your configuration contains a variable, which now has a different name.
  11. Please change your configuration to rename the variable (`{{ item.old }}` -> `{{ item.new }}`).
  12. when: "item.old in vars"
  13. with_items:
  14. - {'old': 'matrix_client_schildichat_welcome_user_id', 'new': '<removed>'}
  15. - {'old': 'matrix_client_schildichat_container_image_name_prefix', 'new': 'matrix_client_schildichat_container_image_registry_prefix'}
  16. - name: Fail if required SchildiChat Web settings not defined
  17. ansible.builtin.fail:
  18. msg: >
  19. You need to define a required configuration setting (`{{ item }}`) for using SchildiChat Web.
  20. when: "vars[item] == ''"
  21. with_items:
  22. - matrix_client_schildichat_default_hs_url
  23. - matrix_client_schildichat_container_network
  24. - name: Fail if SchildiChat location sharing enabled, but no tile server defined
  25. ansible.builtin.fail:
  26. msg: >-
  27. You need to define at least one map tile server in matrix_client_schildichat_location_sharing_map_style_content_sources_localsource_tiles list
  28. when:
  29. - matrix_client_schildichat_location_sharing_enabled | bool
  30. - matrix_client_schildichat_location_sharing_map_style_content_sources_localsource_tiles | length == 0
  31. - when: matrix_client_schildichat_container_labels_traefik_enabled | bool
  32. block:
  33. - name: Fail if required matrix-client-schildichat Traefik settings not defined
  34. ansible.builtin.fail:
  35. msg: >-
  36. You need to define a required configuration setting (`{{ item }}`).
  37. when: "vars[item] == ''"
  38. with_items:
  39. - matrix_client_schildichat_container_labels_traefik_hostname
  40. - matrix_client_schildichat_container_labels_traefik_path_prefix
  41. # We ensure it doesn't end with a slash, because we handle both (slash and no-slash).
  42. # Knowing that `matrix_client_schildichat_container_labels_traefik_path_prefix` does not end with a slash
  43. # ensures we know how to set these routes up without having to do "does it end with a slash" checks elsewhere.
  44. - name: Fail if matrix_client_schildichat_container_labels_traefik_path_prefix ends with a slash
  45. ansible.builtin.fail:
  46. msg: >-
  47. 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`).
  48. when: "matrix_client_schildichat_container_labels_traefik_path_prefix != '/' and matrix_client_schildichat_container_labels_traefik_path_prefix[-1] == '/'"