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

42 строки
1.8 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 Sygnal settings not defined
  6. ansible.builtin.fail:
  7. msg: >
  8. You need to define a required configuration setting (`{{ item }}`).
  9. when: "vars[item] == ''"
  10. with_items:
  11. - matrix_sygnal_hostname
  12. - matrix_sygnal_path_prefix
  13. - matrix_sygnal_container_network
  14. - when: matrix_sygnal_container_labels_traefik_enabled | bool
  15. block:
  16. - name: Fail if required Sygnal 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_sygnal_container_labels_traefik_hostname
  23. - matrix_sygnal_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_sygnal_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_sygnal_container_labels_traefik_path_prefix ends with a slash
  28. ansible.builtin.fail:
  29. msg: >-
  30. matrix_sygnal_container_labels_traefik_path_prefix (`{{ matrix_sygnal_container_labels_traefik_path_prefix }}`) must either be `/` or not end with a slash (e.g. `/sygnal`).
  31. when: "matrix_sygnal_container_labels_traefik_path_prefix != '/' and matrix_sygnal_container_labels_traefik_path_prefix[-1] == '/'"
  32. - name: Fail if no Sygnal apps defined
  33. ansible.builtin.fail:
  34. msg: >-
  35. Enabling Sygnal requires that you specify at least one app in `matrix_sygnal_apps`
  36. when: "matrix_sygnal_apps | length == 0"