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.
 
 

72 líneas
4.6 KiB

  1. ---
  2. - name: Fail if invalid homeserver implementation
  3. ansible.builtin.fail:
  4. msg: "You need to set a valid homeserver implementation in `matrix_homeserver_implementation`"
  5. when: "matrix_homeserver_implementation not in ['synapse', 'dendrite', 'conduit']"
  6. - name: (Deprecation) Catch and report renamed settings
  7. ansible.builtin.fail:
  8. msg: >-
  9. Your configuration contains a variable, which now has a different name.
  10. Please change your configuration to rename the variable (`{{ item.old }}` -> `{{ item.new }}`).
  11. when: "item.old in vars"
  12. with_items:
  13. - {'old': 'host_specific_hostname_identity', 'new': 'matrix_domain'}
  14. - {'old': 'hostname_identity', 'new': 'matrix_domain'}
  15. - {'old': 'hostname_matrix', 'new': 'matrix_server_fqn_matrix'}
  16. - {'old': 'hostname_riot', 'new': 'matrix_server_fqn_element'}
  17. - {'old': 'matrix_server_fqn_riot', 'new': 'matrix_server_fqn_element'}
  18. - {'old': 'matrix_local_bin_path', 'new': '<there is no global bin path anymore - each role has its own>'}
  19. # We have a dedicated check for this variable, because we'd like to have a custom (friendlier) message.
  20. - name: Fail if matrix_homeserver_generic_secret_key is undefined
  21. ansible.builtin.fail:
  22. msg: |
  23. The `matrix_homeserver_generic_secret_key` variable must be defined and have a non-null and non-empty value.
  24. If you're observing this error on a new installation, you should ensure that the `matrix_homeserver_generic_secret_key` is defined.
  25. If you think you've defined it, but are still getting this error, then it's likely that you have a typo
  26. in your domain name in `inventory/hosts` or in one of the directories leading up to your `inventory/host_vars/matrix.DOMAIN/vars.yml` file.
  27. If you're observing this error on an existing homeserver installation, you can fix it easily and in a backward-compatible way by adding
  28. `{% raw %}matrix_homeserver_generic_secret_key: "{{ matrix_synapse_macaroon_secret_key }}"{% endraw %}`
  29. to your `vars.yml` file. Using another secret value for the new variable is also possible and shouldn't cause any trouble.
  30. when: "matrix_homeserver_generic_secret_key is none or matrix_homeserver_generic_secret_key == ''"
  31. - name: Fail if required variables are undefined
  32. ansible.builtin.fail:
  33. msg: "The `{{ item.var }}` variable must be defined and have a non-null and non-empty value"
  34. with_items:
  35. - {'var': matrix_domain, 'value': "{{ matrix_domain | default('') }}"}
  36. - {'var': matrix_server_fqn_matrix, 'value': "{{ matrix_server_fqn_matrix | default('') }}"}
  37. - {'var': matrix_server_fqn_element, 'value': "{{ matrix_server_fqn_element | default('') }}"}
  38. - {'var': matrix_homeserver_container_url, 'value': "{{ matrix_homeserver_container_url | default('') }}"}
  39. - {'var': matrix_homeserver_container_federation_url, 'value': "{{ matrix_homeserver_container_federation_url | default('') }}"}
  40. - {'var': matrix_architecture, 'value': "{{ matrix_architecture | default('') }}"}
  41. when: "item.value is none or item.value == ''"
  42. - name: Fail if matrix_architecture is set incorrectly
  43. ansible.builtin.fail:
  44. msg: "Detected that variable matrix_architecture {{ matrix_architecture }} appears to be set incorrectly. See docs/alternative-architectures.md. Server appears to be {{ ansible_architecture }}."
  45. when: matrix_architecture not in ['amd64', 'arm32', 'arm64']
  46. - name: Fail if uppercase domain used
  47. ansible.builtin.fail:
  48. msg: "Detected that you're using an uppercase domain name - `{{ item }}`. This will cause trouble. Please use all-lowercase!"
  49. with_items:
  50. - "{{ matrix_domain }}"
  51. - "{{ matrix_server_fqn_matrix }}"
  52. - "{{ matrix_server_fqn_element }}"
  53. when: "item != item | lower"
  54. - name: Fail if encountering usage of removed role (mx-puppet-skype)
  55. ansible.builtin.fail:
  56. msg: >-
  57. Your configuration seems to include a reference to `matrix_mx_puppet_skype_enabled`. Are you trying to install the mx-puppet-skype bridge?
  58. 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.
  59. To get rid of this error, remove all `matrix_mx_puppet_*` references from your configuration.
  60. 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.
  61. If you still need bridging to Skype, consider switching to the go-skype bridge instead. See `docs/configuring-playbook-bridge-go-skype-bridge.md`.
  62. when: "'matrix_mx_puppet_skype_enabled' in vars"