Matrix Docker Ansible eploy
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.
 
 

104 wiersze
7.2 KiB

  1. # SPDX-FileCopyrightText: 2024 MDAD Team and contributors
  2. #
  3. # SPDX-License-Identifier: AGPL-3.0-or-later
  4. ---
  5. - name: Fail if invalid homeserver implementation
  6. ansible.builtin.fail:
  7. msg: "You need to set a valid homeserver implementation in `matrix_homeserver_implementation`"
  8. when: "matrix_homeserver_implementation not in ['synapse', 'dendrite', 'conduit']"
  9. - name: (Deprecation) Catch and report renamed settings
  10. ansible.builtin.fail:
  11. msg: >-
  12. Your configuration contains a variable, which now has a different name.
  13. Please change your configuration to rename the variable (`{{ item.old }}` -> `{{ item.new }}`).
  14. when: "item.old in vars"
  15. with_items:
  16. - {'old': 'host_specific_hostname_identity', 'new': 'matrix_domain'}
  17. - {'old': 'hostname_identity', 'new': 'matrix_domain'}
  18. - {'old': 'hostname_matrix', 'new': 'matrix_server_fqn_matrix'}
  19. - {'old': 'hostname_riot', 'new': 'matrix_server_fqn_element'}
  20. - {'old': 'matrix_server_fqn_riot', 'new': 'matrix_server_fqn_element'}
  21. - {'old': 'matrix_local_bin_path', 'new': '<there is no global bin path anymore - each role has its own>'}
  22. - {'old': 'matrix_client_element_e2ee_default', 'new': 'matrix_static_files_file_matrix_client_property_io_element_e2ee_default'}
  23. - {'old': 'matrix_client_element_e2ee_secure_backup_required', 'new': 'matrix_static_files_file_matrix_client_property_io_element_e2ee_secure_backup_required'}
  24. - {'old': 'matrix_client_element_e2ee_secure_backup_setup_methods', 'new': 'matrix_static_files_file_matrix_client_property_io_element_e2ee_secure_backup_setup_methods'}
  25. # We have a dedicated check for this variable, because we'd like to have a custom (friendlier) message.
  26. - name: Fail if matrix_homeserver_generic_secret_key is undefined
  27. ansible.builtin.fail:
  28. msg: |
  29. The `matrix_homeserver_generic_secret_key` variable must be defined and have a non-null and non-empty value.
  30. If you're observing this error on a new installation, you should ensure that the `matrix_homeserver_generic_secret_key` is defined.
  31. If you think you've defined it, but are still getting this error, then it's likely that you have a typo
  32. in your domain name in `inventory/hosts` or in one of the directories leading up to your `inventory/host_vars/matrix.example.com/vars.yml` file.
  33. If you're observing this error on an existing homeserver installation, you can fix it easily and in a backward-compatible way by adding
  34. `{% raw %}matrix_homeserver_generic_secret_key: "{{ matrix_synapse_macaroon_secret_key }}"{% endraw %}`
  35. to your `vars.yml` file. Using another secret value for the new variable is also possible and shouldn't cause any trouble.
  36. when: "matrix_homeserver_generic_secret_key is none or matrix_homeserver_generic_secret_key == ''"
  37. - name: Fail if required variables are undefined
  38. ansible.builtin.fail:
  39. msg: "The `{{ item.var }}` variable must be defined and have a non-null and non-empty value"
  40. with_items:
  41. - {'var': matrix_domain, 'value': "{{ matrix_domain | default('') }}"}
  42. - {'var': matrix_server_fqn_matrix, 'value': "{{ matrix_server_fqn_matrix | default('') }}"}
  43. - {'var': matrix_server_fqn_element, 'value': "{{ matrix_server_fqn_element | default('') }}"}
  44. - {'var': matrix_homeserver_container_client_api_endpoint, 'value': "{{ matrix_homeserver_container_client_api_endpoint | default('') }}"}
  45. - {'var': matrix_homeserver_container_federation_api_endpoint, 'value': "{{ matrix_homeserver_container_federation_api_endpoint | default('') }}"}
  46. - {'var': matrix_architecture, 'value': "{{ matrix_architecture | default('') }}"}
  47. when: "item.value is none or item.value == ''"
  48. - name: Fail if matrix_architecture is set incorrectly
  49. ansible.builtin.fail:
  50. msg: "Detected that variable matrix_architecture {{ matrix_architecture }} appears to be set incorrectly. See docs/alternative-architectures.md. Server appears to be {{ ansible_architecture }}."
  51. when: matrix_architecture not in ['amd64', 'arm32', 'arm64']
  52. - name: Fail if matrix_playbook_reverse_proxy_type is set incorrectly
  53. ansible.builtin.fail:
  54. msg: |
  55. You have not explicitly specified the type of reverse-proxy you'd like to use (with a `matrix_playbook_reverse_proxy_type` variable in your configuration).
  56. The playbook used to default to nginx (matrix-nginx-proxy), but things are changing with Traefik being the new default reverse-proxy.
  57. Learn more here: https://github.com/spantaleev/matrix-docker-ansible-deploy/blob/master/CHANGELOG.md#traefik-is-the-default-reverse-proxy-now
  58. when: matrix_playbook_reverse_proxy_type == ''
  59. - name: Fail if matrix_playbook_reverse_proxy_type is set incorrectly
  60. ansible.builtin.fail:
  61. msg: "Detected that variable matrix_playbook_reverse_proxy_type (current value: `{{ matrix_playbook_reverse_proxy_type }}`) appears to be set incorrectly. See roles/custom/matrix-base/defaults/main.yml for valid choices."
  62. when: matrix_playbook_reverse_proxy_type not in ['playbook-managed-traefik', 'other-traefik-container', 'none']
  63. - name: Fail if uppercase domain used
  64. ansible.builtin.fail:
  65. msg: "Detected that you're using an uppercase domain name - `{{ item }}`. This will cause trouble. Please use all-lowercase!"
  66. with_items:
  67. - "{{ matrix_domain }}"
  68. - "{{ matrix_server_fqn_matrix }}"
  69. - "{{ matrix_server_fqn_element }}"
  70. when: "item != item | lower"
  71. - name: Fail if encountering usage of removed role (mx-puppet-skype)
  72. ansible.builtin.fail:
  73. msg: >-
  74. Your configuration seems to include a reference to `matrix_mx_puppet_skype_enabled`. Are you trying to install the mx-puppet-skype bridge?
  75. The playbook no longer includes a role for installing mx-puppet-skype, because the mx-puppet-bridge is unmaintained and has been reported as broken for a long time.
  76. To get rid of this error, remove all `matrix_mx_puppet_*` references from your configuration.
  77. To clean up your server from mx-puppet-skype's presence, see this changelog entry: https://github.com/spantaleev/matrix-docker-ansible-deploy/blob/master/CHANGELOG.md#mx-puppet-skype-removal.
  78. If you still need bridging to Skype, consider switching to the go-skype bridge instead. See `docs/configuring-playbook-bridge-go-skype-bridge.md`.
  79. when: "'matrix_mx_puppet_skype_enabled' in vars"
  80. - name: Fail if mautrix-instagram and mautrix-meta-instagram are in conflict
  81. ansible.builtin.fail:
  82. msg: >-
  83. Your configuration enables both the old mautrix-instagram bridge and the new mautrix-meta-instagram bridge.
  84. By default, both bridges are configured to use the same bridge bot username (`@{{ matrix_mautrix_meta_instagram_appservice_username }}:{{ matrix_domain }}`) which is a conflict.
  85. We recommend that you disable at least one of the bridges (preferrably the old mautrix-instagram bridge), or to resolve the conflict in another way.
  86. To resolve the conflict without disabling a bridge, consider adjusting one of `matrix_mautrix_instagram_appservice_bot_username` or `matrix_mautrix_meta_instagram_appservice_username` - they both have a value of {{ matrix_mautrix_meta_instagram_appservice_username }} right now.
  87. when:
  88. - matrix_mautrix_instagram_enabled | bool
  89. - matrix_mautrix_meta_instagram_enabled | bool
  90. - matrix_mautrix_instagram_appservice_bot_username == matrix_mautrix_meta_instagram_appservice_username