Matrix Docker Ansible eploy
No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.
 
 

43 líneas
2.2 KiB

  1. # SPDX-FileCopyrightText: 2025 Nikita Chernyi
  2. # SPDX-FileCopyrightText: 2025 Slavi Pantaleev
  3. #
  4. # SPDX-License-Identifier: AGPL-3.0-or-later
  5. ---
  6. - name: Fail if required FluffyChat Web settings not defined
  7. ansible.builtin.fail:
  8. msg: >
  9. You need to define a required configuration setting (`{{ item }}`) for using FluffyChat Web.
  10. when: "lookup('vars', item, default='') == ''"
  11. with_items:
  12. - matrix_client_fluffychat_container_network
  13. - name: (Deprecation) Catch and report renamed FluffyChat Web variables
  14. ansible.builtin.fail:
  15. msg: >-
  16. The variable `{{ item.old }}` is deprecated. Please use `{{ item.new }}` instead.
  17. when: "lookup('ansible.builtin.varnames', ('^' + item.old + '$'), wantlist=True) | length > 0"
  18. with_items:
  19. - {'old': 'matrix_client_fluffychat_container_image_name_prefix', 'new': 'matrix_client_fluffychat_container_image_registry_prefix'}
  20. - when: matrix_client_fluffychat_container_labels_traefik_enabled | bool
  21. block:
  22. - name: Fail if required matrix-client-fluffychat Traefik settings not defined
  23. ansible.builtin.fail:
  24. msg: >-
  25. You need to define a required configuration setting (`{{ item }}`).
  26. when: "lookup('vars', item, default='') == ''"
  27. with_items:
  28. - matrix_client_fluffychat_container_labels_traefik_hostname
  29. - matrix_client_fluffychat_container_labels_traefik_path_prefix
  30. # We ensure it doesn't end with a slash, because we handle both (slash and no-slash).
  31. # Knowing that `matrix_client_fluffychat_container_labels_traefik_path_prefix` does not end with a slash
  32. # ensures we know how to set these routes up without having to do "does it end with a slash" checks elsewhere.
  33. - name: Fail if matrix_client_fluffychat_container_labels_traefik_path_prefix ends with a slash
  34. ansible.builtin.fail:
  35. msg: >-
  36. matrix_client_fluffychat_container_labels_traefik_path_prefix (`{{ matrix_client_fluffychat_container_labels_traefik_path_prefix }}`) must either be `/` or not end with a slash (e.g. `/fluffychat`).
  37. when: "matrix_client_fluffychat_container_labels_traefik_path_prefix != '/' and matrix_client_fluffychat_container_labels_traefik_path_prefix[-1] == '/'"