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ů.
 
 

32 řádky
1.9 KiB

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