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

52 строки
2.9 KiB

  1. # SPDX-FileCopyrightText: 2022 - 2024 Slavi Pantaleev
  2. # SPDX-FileCopyrightText: 2022 MDAD project contributors
  3. #
  4. # SPDX-License-Identifier: AGPL-3.0-or-later
  5. ---
  6. - name: Fail if required Cinny settings not defined
  7. ansible.builtin.fail:
  8. msg: >
  9. You need to define a required configuration setting (`{{ item }}`) to use Cinny.
  10. when: "item.when | bool and vars[item.name] == ''"
  11. with_items:
  12. - {'name': 'matrix_client_cinny_default_hs_url', when: true}
  13. - {'name': 'matrix_client_cinny_container_network', when: true}
  14. - {'name': 'matrix_client_cinny_container_labels_traefik_compression_middleware_name', when: "{{ matrix_client_cinny_container_labels_traefik_compression_middleware_enabled }}"}
  15. - name: (Deprecation) Catch and report renamed Cinny variables
  16. ansible.builtin.fail:
  17. msg: >-
  18. The variable `{{ item.old }}` is deprecated. Please use `{{ item.new }}` instead.
  19. when: "item.old in vars"
  20. with_items:
  21. - {'old': 'matrix_client_cinny_container_image_name_prefix', 'new': 'matrix_client_cinny_container_image_registry_prefix'}
  22. - name: Fail if matrix_client_cinny_path_prefix is not /
  23. ansible.builtin.fail:
  24. msg: >-
  25. `matrix_client_cinny_path_prefix` is set to `{{ matrix_client_cinny_path_prefix }}` in your configuration, but Cinny no longer supports hosting under a path prefix without an application rebuild.
  26. Consider removing your `matrix_client_cinny_path_prefix` override and adjusting the Cinny hostname via `matrix_server_fqn_cinny` or `matrix_client_cinny_hostname`.
  27. See https://github.com/spantaleev/matrix-docker-ansible-deploy/issues/3701
  28. when: "matrix_client_cinny_path_prefix != '/'"
  29. - when: matrix_client_cinny_container_labels_traefik_enabled | bool
  30. block:
  31. - name: Fail if required matrix-client-cinny Traefik settings not defined
  32. ansible.builtin.fail:
  33. msg: >-
  34. You need to define a required configuration setting (`{{ item }}`).
  35. when: "vars[item] == ''"
  36. with_items:
  37. - matrix_client_cinny_container_labels_traefik_hostname
  38. - matrix_client_cinny_container_labels_traefik_path_prefix
  39. # We ensure it doesn't end with a slash, because we handle both (slash and no-slash).
  40. # Knowing that `matrix_client_cinny_container_labels_traefik_path_prefix` does not end with a slash
  41. # ensures we know how to set these routes up without having to do "does it end with a slash" checks elsewhere.
  42. - name: Fail if matrix_client_cinny_container_labels_traefik_path_prefix ends with a slash
  43. ansible.builtin.fail:
  44. msg: >-
  45. matrix_client_cinny_container_labels_traefik_path_prefix (`{{ matrix_client_cinny_container_labels_traefik_path_prefix }}`) must either be `/` or not end with a slash (e.g. `/cinny`).
  46. when: "matrix_client_cinny_container_labels_traefik_path_prefix != '/' and matrix_client_cinny_container_labels_traefik_path_prefix[-1] == '/'"