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.
 
 

44 Zeilen
2.2 KiB

  1. # SPDX-FileCopyrightText: 2023 Slavi Pantaleev
  2. # SPDX-FileCopyrightText: 2025 Suguru Hirahara
  3. #
  4. # SPDX-License-Identifier: AGPL-3.0-or-later
  5. ---
  6. - name: Fail if required Matrix.to settings not defined
  7. ansible.builtin.fail:
  8. msg: >-
  9. You need to define a required configuration setting (`{{ item }}`).
  10. when: "lookup('vars', item, default='') | string | length == 0"
  11. with_items:
  12. - matrix_matrixto_hostname
  13. - matrix_matrixto_path_prefix
  14. - matrix_matrixto_container_network
  15. - name: Run if Traefik is enabled
  16. when: matrix_matrixto_container_labels_traefik_enabled | bool
  17. block:
  18. - name: Fail if Traefik settings required for Matrix.to are not defined
  19. ansible.builtin.fail:
  20. msg: >-
  21. You need to define a required configuration setting (`{{ item }}`).
  22. when: "lookup('vars', item, default='') | string | length == 0"
  23. with_items:
  24. - matrix_matrixto_container_labels_traefik_hostname
  25. - matrix_matrixto_container_labels_traefik_path_prefix
  26. - name: Fail if matrix_matrixto_container_labels_traefik_path_prefix is different than /
  27. ansible.builtin.fail:
  28. msg: >-
  29. matrix_matrixto_container_labels_traefik_path_prefix (`{{ matrix_matrixto_container_labels_traefik_path_prefix }}`) must be `/`.
  30. Matrix.to does not support hosting under a subpath yet.
  31. when: "matrix_matrixto_container_labels_traefik_path_prefix != '/'"
  32. # We ensure it doesn't end with a slash, because we handle both (slash and no-slash).
  33. # Knowing that `matrix_matrixto_container_labels_traefik_path_prefix` does not end with a slash
  34. # ensures we know how to set these routes up without having to do "does it end with a slash" checks elsewhere.
  35. - name: Fail if matrix_matrixto_container_labels_traefik_path_prefix ends with a slash
  36. ansible.builtin.fail:
  37. msg: >-
  38. matrix_matrixto_container_labels_traefik_path_prefix (`{{ matrix_matrixto_container_labels_traefik_path_prefix }}`) must either be `/` or not end with a slash (e.g. `/matrixto`).
  39. when: "matrix_matrixto_container_labels_traefik_path_prefix != '/' and matrix_matrixto_container_labels_traefik_path_prefix[-1] == '/'"