Matrix Docker Ansible eploy
25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

43 lines
1.8 KiB

  1. # SPDX-FileCopyrightText: 2021 - 2023 Slavi Pantaleev
  2. # SPDX-FileCopyrightText: 2022 Marko Weltzer
  3. #
  4. # SPDX-License-Identifier: AGPL-3.0-or-later
  5. ---
  6. - name: Fail if required Sygnal settings not defined
  7. ansible.builtin.fail:
  8. msg: >
  9. You need to define a required configuration setting (`{{ item }}`).
  10. when: "vars[item] == ''"
  11. with_items:
  12. - matrix_sygnal_hostname
  13. - matrix_sygnal_path_prefix
  14. - matrix_sygnal_container_network
  15. - when: matrix_sygnal_container_labels_traefik_enabled | bool
  16. block:
  17. - name: Fail if required Sygnal Traefik settings not defined
  18. ansible.builtin.fail:
  19. msg: >-
  20. You need to define a required configuration setting (`{{ item }}`).
  21. when: "vars[item] == ''"
  22. with_items:
  23. - matrix_sygnal_container_labels_traefik_hostname
  24. - matrix_sygnal_container_labels_traefik_path_prefix
  25. # We ensure it doesn't end with a slash, because we handle both (slash and no-slash).
  26. # Knowing that `matrix_sygnal_container_labels_traefik_path_prefix` does not end with a slash
  27. # ensures we know how to set these routes up without having to do "does it end with a slash" checks elsewhere.
  28. - name: Fail if matrix_sygnal_container_labels_traefik_path_prefix ends with a slash
  29. ansible.builtin.fail:
  30. msg: >-
  31. 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`).
  32. when: "matrix_sygnal_container_labels_traefik_path_prefix != '/' and matrix_sygnal_container_labels_traefik_path_prefix[-1] == '/'"
  33. - name: Fail if no Sygnal apps defined
  34. ansible.builtin.fail:
  35. msg: >-
  36. Enabling Sygnal requires that you specify at least one app in `matrix_sygnal_apps`
  37. when: "matrix_sygnal_apps | length == 0"