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.
 
 

48 líneas
2.9 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: (Deprecation) Catch and report renamed FluffyChat Web variables
  7. ansible.builtin.fail:
  8. msg: >-
  9. The variable `{{ item.old }}` is deprecated. Please use `{{ item.new }}` instead.
  10. when: "lookup('ansible.builtin.varnames', ('^' + item.old + '$'), wantlist=True) | length > 0"
  11. with_items:
  12. - {'old': 'matrix_client_fluffychat_container_image_name_prefix', 'new': 'matrix_client_fluffychat_container_image_registry_prefix'}
  13. - {'old': 'matrix_client_fluffychat_docker_image', 'new': 'matrix_client_fluffychat_container_image'}
  14. - {'old': 'matrix_client_fluffychat_docker_image_force_pull', 'new': 'matrix_client_fluffychat_container_image_force_pull'}
  15. - {'old': 'matrix_client_fluffychat_docker_image_registry_prefix', 'new': 'matrix_client_fluffychat_container_image_registry_prefix'}
  16. - {'old': 'matrix_client_fluffychat_docker_image_registry_prefix_upstream', 'new': 'matrix_client_fluffychat_container_image_registry_prefix_upstream'}
  17. - {'old': 'matrix_client_fluffychat_docker_image_registry_prefix_upstream_default', 'new': 'matrix_client_fluffychat_container_image_registry_prefix_upstream_default'}
  18. - name: Fail if required FluffyChat Web settings not defined
  19. ansible.builtin.fail:
  20. msg: >
  21. You need to define a required configuration setting (`{{ item }}`) for using FluffyChat Web.
  22. when: "lookup('vars', item, default='') == ''"
  23. with_items:
  24. - matrix_client_fluffychat_container_network
  25. - when: matrix_client_fluffychat_container_labels_traefik_enabled | bool
  26. block:
  27. - name: Fail if required matrix-client-fluffychat Traefik settings not defined
  28. ansible.builtin.fail:
  29. msg: >-
  30. You need to define a required configuration setting (`{{ item }}`).
  31. when: "lookup('vars', item, default='') == ''"
  32. with_items:
  33. - matrix_client_fluffychat_container_labels_traefik_hostname
  34. - matrix_client_fluffychat_container_labels_traefik_path_prefix
  35. # We ensure it doesn't end with a slash, because we handle both (slash and no-slash).
  36. # Knowing that `matrix_client_fluffychat_container_labels_traefik_path_prefix` does not end with a slash
  37. # ensures we know how to set these routes up without having to do "does it end with a slash" checks elsewhere.
  38. - name: Fail if matrix_client_fluffychat_container_labels_traefik_path_prefix ends with a slash
  39. ansible.builtin.fail:
  40. msg: >-
  41. 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`).
  42. when: "matrix_client_fluffychat_container_labels_traefik_path_prefix != '/' and matrix_client_fluffychat_container_labels_traefik_path_prefix[-1] == '/'"