Matrix Docker Ansible eploy
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.
 
 

36 řádky
2.0 KiB

  1. # SPDX-FileCopyrightText: 2024 MDAD Team and contributors
  2. #
  3. # SPDX-License-Identifier: AGPL-3.0-or-later
  4. ---
  5. - name: Fail if required Hydrogen settings not defined
  6. ansible.builtin.fail:
  7. msg: >
  8. You need to define a required configuration setting (`{{ item }}`) to use Hydrogen.
  9. when: "item.when | bool and vars[item.name] == ''"
  10. with_items:
  11. - {'name': 'matrix_client_hydrogen_default_hs_url', when: "{{ matrix_client_hydrogen_container_image_self_build }}"}
  12. - {'name': 'matrix_client_hydrogen_container_network', when: true}
  13. - {'name': 'matrix_client_hydrogen_container_labels_traefik_compression_middleware_name', when: "{{ matrix_client_hydrogen_container_labels_traefik_compression_middleware_enabled }}"}
  14. - when: matrix_client_hydrogen_container_labels_traefik_enabled | bool
  15. block:
  16. - name: Fail if required matrix-client-hydrogen Traefik settings not defined
  17. ansible.builtin.fail:
  18. msg: >-
  19. You need to define a required configuration setting (`{{ item }}`).
  20. when: "vars[item] == ''"
  21. with_items:
  22. - matrix_client_hydrogen_container_labels_traefik_hostname
  23. - matrix_client_hydrogen_container_labels_traefik_path_prefix
  24. # We ensure it doesn't end with a slash, because we handle both (slash and no-slash).
  25. # Knowing that `matrix_client_hydrogen_container_labels_traefik_path_prefix` does not end with a slash
  26. # ensures we know how to set these routes up without having to do "does it end with a slash" checks elsewhere.
  27. - name: Fail if matrix_client_hydrogen_container_labels_traefik_path_prefix ends with a slash
  28. ansible.builtin.fail:
  29. msg: >-
  30. matrix_client_hydrogen_container_labels_traefik_path_prefix (`{{ matrix_client_hydrogen_container_labels_traefik_path_prefix }}`) must either be `/` or not end with a slash (e.g. `/hydrogen`).
  31. when: "matrix_client_hydrogen_container_labels_traefik_path_prefix != '/' and matrix_client_hydrogen_container_labels_traefik_path_prefix[-1] == '/'"