Matrix Docker Ansible eploy
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
 
 

60 linhas
3.6 KiB

  1. # SPDX-FileCopyrightText: 2023 Nikita Chernyi
  2. # SPDX-FileCopyrightText: 2024 - 2025 Slavi Pantaleev
  3. # SPDX-FileCopyrightText: 2024 - 2025 Suguru Hirahara
  4. #
  5. # SPDX-License-Identifier: AGPL-3.0-or-later
  6. ---
  7. - name: (Deprecation) Catch and report renamed SchildiChat Web settings
  8. ansible.builtin.fail:
  9. msg: >-
  10. Your configuration contains a variable, which now has a different name.
  11. Please rename the variable (`{{ item.old }}` -> `{{ item.new }}`) on your configuration file (vars.yml).
  12. when: "lookup('ansible.builtin.varnames', ('^' + item.old + '$'), wantlist=True) | length > 0"
  13. with_items:
  14. - {'old': 'matrix_client_schildichat_welcome_user_id', 'new': '<removed>'}
  15. - {'old': 'matrix_client_schildichat_container_image_name_prefix', 'new': 'matrix_client_schildichat_container_image_registry_prefix'}
  16. - {'old': 'matrix_client_schildichat_docker_image', 'new': 'matrix_client_schildichat_container_image'}
  17. - {'old': 'matrix_client_schildichat_docker_image_force_pull', 'new': 'matrix_client_schildichat_container_image_force_pull'}
  18. - {'old': 'matrix_client_schildichat_docker_image_registry_prefix', 'new': 'matrix_client_schildichat_container_image_registry_prefix'}
  19. - {'old': 'matrix_client_schildichat_docker_image_registry_prefix_upstream', 'new': 'matrix_client_schildichat_container_image_registry_prefix_upstream'}
  20. - {'old': 'matrix_client_schildichat_docker_image_registry_prefix_upstream_default', 'new': 'matrix_client_schildichat_container_image_registry_prefix_upstream_default'}
  21. - name: Fail if required SchildiChat Web settings not defined
  22. ansible.builtin.fail:
  23. msg: >
  24. You need to define a required configuration setting (`{{ item }}`) for using SchildiChat Web.
  25. when: "lookup('vars', item, default='') == ''"
  26. with_items:
  27. - matrix_client_schildichat_default_hs_url
  28. - matrix_client_schildichat_container_network
  29. - name: Fail if SchildiChat location sharing enabled, but no tile server defined
  30. ansible.builtin.fail:
  31. msg: >-
  32. You need to define at least one map tile server in matrix_client_schildichat_location_sharing_map_style_content_sources_localsource_tiles list
  33. when:
  34. - matrix_client_schildichat_location_sharing_enabled | bool
  35. - matrix_client_schildichat_location_sharing_map_style_content_sources_localsource_tiles | length == 0
  36. - when: matrix_client_schildichat_container_labels_traefik_enabled | bool
  37. block:
  38. - name: Fail if required matrix-client-schildichat Traefik settings not defined
  39. ansible.builtin.fail:
  40. msg: >-
  41. You need to define a required configuration setting (`{{ item }}`).
  42. when: "lookup('vars', item, default='') == ''"
  43. with_items:
  44. - matrix_client_schildichat_container_labels_traefik_hostname
  45. - matrix_client_schildichat_container_labels_traefik_path_prefix
  46. # We ensure it doesn't end with a slash, because we handle both (slash and no-slash).
  47. # Knowing that `matrix_client_schildichat_container_labels_traefik_path_prefix` does not end with a slash
  48. # ensures we know how to set these routes up without having to do "does it end with a slash" checks elsewhere.
  49. - name: Fail if matrix_client_schildichat_container_labels_traefik_path_prefix ends with a slash
  50. ansible.builtin.fail:
  51. msg: >-
  52. matrix_client_schildichat_container_labels_traefik_path_prefix (`{{ matrix_client_schildichat_container_labels_traefik_path_prefix }}`) must either be `/` or not end with a slash (e.g. `/schildichat`).
  53. when: "matrix_client_schildichat_container_labels_traefik_path_prefix != '/' and matrix_client_schildichat_container_labels_traefik_path_prefix[-1] == '/'"