Matrix Docker Ansible eploy
25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.
 
 

49 satır
3.0 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. - {'old': 'matrix_client_fluffychat_container_image_force_pull', 'new': '<removed> (the new community.docker.docker_image_pull module handles this natively)'}
  19. - name: Fail if required FluffyChat Web settings not defined
  20. ansible.builtin.fail:
  21. msg: >
  22. You need to define a required configuration setting (`{{ item }}`) for using FluffyChat Web.
  23. when: "lookup('vars', item, default='') == ''"
  24. with_items:
  25. - matrix_client_fluffychat_container_network
  26. - when: matrix_client_fluffychat_container_labels_traefik_enabled | bool
  27. block:
  28. - name: Fail if required matrix-client-fluffychat Traefik settings not defined
  29. ansible.builtin.fail:
  30. msg: >-
  31. You need to define a required configuration setting (`{{ item }}`).
  32. when: "lookup('vars', item, default='') == ''"
  33. with_items:
  34. - matrix_client_fluffychat_container_labels_traefik_hostname
  35. - matrix_client_fluffychat_container_labels_traefik_path_prefix
  36. # We ensure it doesn't end with a slash, because we handle both (slash and no-slash).
  37. # Knowing that `matrix_client_fluffychat_container_labels_traefik_path_prefix` does not end with a slash
  38. # ensures we know how to set these routes up without having to do "does it end with a slash" checks elsewhere.
  39. - name: Fail if matrix_client_fluffychat_container_labels_traefik_path_prefix ends with a slash
  40. ansible.builtin.fail:
  41. msg: >-
  42. 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`).
  43. when: "matrix_client_fluffychat_container_labels_traefik_path_prefix != '/' and matrix_client_fluffychat_container_labels_traefik_path_prefix[-1] == '/'"