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

67 строки
3.9 KiB

  1. ---
  2. - name: Fail if required Element settings not defined
  3. ansible.builtin.fail:
  4. msg: >
  5. You need to define a required configuration setting (`{{ item }}`) for using Element.
  6. when: "vars[item] == ''"
  7. with_items:
  8. - matrix_client_element_default_hs_url
  9. - matrix_client_element_container_network
  10. - name: Fail if Element location sharing enabled, but no tile server defined
  11. ansible.builtin.fail:
  12. msg: >-
  13. You need to define at least one map tile server in matrix_client_element_location_sharing_map_style_content_sources_localsource_tiles list
  14. when:
  15. - matrix_client_element_location_sharing_enabled | bool
  16. - matrix_client_element_location_sharing_map_style_content_sources_localsource_tiles | length == 0
  17. - name: (Deprecation) Catch and report riot-web variables
  18. ansible.builtin.fail:
  19. msg: >-
  20. Riot has been renamed to Element (https://element.io/blog/welcome-to-element/).
  21. The playbook will migrate your existing configuration and data automatically, but you need to adjust variable names.
  22. Please change your configuration (vars.yml) to rename all riot-web variables (`{{ item.old }}` -> `{{ item.new }}`).
  23. Also note that DNS configuration changes may be necessary.
  24. when: "vars | dict2items | selectattr('key', 'match', item.old) | list | items2dict"
  25. with_items:
  26. - {'old': 'matrix_riot_web_.*', 'new': 'matrix_client_element_.*'}
  27. - name: (Deprecation) Catch and report renamed element-web settings
  28. ansible.builtin.fail:
  29. msg: >-
  30. Your configuration contains a variable, which now has a different name.
  31. Please change your configuration to rename the variable (`{{ item.old }}` -> `{{ item.new }}`).
  32. when: "item.old in vars"
  33. with_items:
  34. - {'old': 'matrix_client_element_showLabsSettings', 'new': 'matrix_client_element_show_lab_settings'}
  35. - {'old': 'matrix_client_element_permalinkPrefix', 'new': 'matrix_client_element_permalink_prefix'}
  36. - {'old': 'matrix_client_element_roomdir_servers', 'new': 'matrix_client_element_room_directory_servers'}
  37. - {'old': 'matrix_client_element_settingDefaults_custom_themes', 'new': 'matrix_client_element_setting_defaults_custom_themes'}
  38. - {'old': 'matrix_client_element_branding_authFooterLinks', 'new': 'matrix_client_element_branding_auth_footer_links'}
  39. - {'old': 'matrix_client_element_branding_authHeaderLogoUrl', 'new': 'matrix_client_element_branding_auth_header_logo_url'}
  40. - {'old': 'matrix_client_element_branding_welcomeBackgroundUrl', 'new': 'matrix_client_element_branding_welcome_background_url'}
  41. - {'old': 'matrix_client_element_jitsi_preferredDomain', 'new': 'matrix_client_element_jitsi_preferred_domain'}
  42. - {'old': 'matrix_client_element_welcome_user_id', 'new': '<removed>'}
  43. - when: matrix_client_element_container_labels_traefik_enabled | bool
  44. block:
  45. - name: Fail if required matrix-client-element Traefik settings not defined
  46. ansible.builtin.fail:
  47. msg: >-
  48. You need to define a required configuration setting (`{{ item }}`).
  49. when: "vars[item] == ''"
  50. with_items:
  51. - matrix_client_element_container_labels_traefik_hostname
  52. - matrix_client_element_container_labels_traefik_path_prefix
  53. # We ensure it doesn't end with a slash, because we handle both (slash and no-slash).
  54. # Knowing that `matrix_client_element_container_labels_traefik_path_prefix` does not end with a slash
  55. # ensures we know how to set these routes up without having to do "does it end with a slash" checks elsewhere.
  56. - name: Fail if matrix_client_element_container_labels_traefik_path_prefix ends with a slash
  57. ansible.builtin.fail:
  58. msg: >-
  59. matrix_client_element_container_labels_traefik_path_prefix (`{{ matrix_client_element_container_labels_traefik_path_prefix }}`) must either be `/` or not end with a slash (e.g. `/element`).
  60. when: "matrix_client_element_container_labels_traefik_path_prefix != '/' and matrix_client_element_container_labels_traefik_path_prefix[-1] == '/'"