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.
 
 

55 líneas
3.4 KiB

  1. # SPDX-FileCopyrightText: 2023 - 2025 Slavi Pantaleev
  2. # SPDX-FileCopyrightText: 2023 MDAD project contributors
  3. #
  4. # SPDX-License-Identifier: AGPL-3.0-or-later
  5. ---
  6. - name: (Deprecation) Catch and report renamed matrix-user-verification-service variables
  7. ansible.builtin.fail:
  8. msg: >-
  9. Your configuration contains a variable, which now has a different name.
  10. Please rename the variable (`{{ item.old }}` -> `{{ item.new }}`) on your configuration file (vars.yml).
  11. when: "lookup('ansible.builtin.varnames', ('^' + item.old + '$'), wantlist=True) | length > 0"
  12. with_items:
  13. - {'old': 'matrix_user_verification_service_docker_image_name_prefix', 'new': 'matrix_user_verification_service_container_image_registry_prefix'}
  14. - {'old': 'matrix_user_verification_service_docker_image', 'new': 'matrix_user_verification_service_container_image'}
  15. - {'old': 'matrix_user_verification_service_docker_image_force_pull', 'new': 'matrix_user_verification_service_container_image_force_pull'}
  16. - {'old': 'matrix_user_verification_service_docker_image_registry_prefix', 'new': 'matrix_user_verification_service_container_image_registry_prefix'}
  17. - {'old': 'matrix_user_verification_service_docker_image_registry_prefix_upstream', 'new': 'matrix_user_verification_service_container_image_registry_prefix_upstream'}
  18. - {'old': 'matrix_user_verification_service_docker_image_registry_prefix_upstream_default', 'new': 'matrix_user_verification_service_container_image_registry_prefix_upstream_default'}
  19. - {'old': 'matrix_user_verification_service_docker_src_files_path', 'new': 'matrix_user_verification_service_container_src_files_path'}
  20. - name: Verify homeserver_url is not empty
  21. ansible.builtin.assert:
  22. that:
  23. - matrix_user_verification_service_uvs_homeserver_url|length > 0
  24. fail_msg: "Missing variable in {{ matrix_user_verification_service_ansible_name }} role"
  25. - name: Verify Auth is configured properly or disabled
  26. ansible.builtin.assert:
  27. that:
  28. - matrix_user_verification_service_uvs_access_token|length > 0 or not matrix_user_verification_service_uvs_require_auth|bool
  29. fail_msg: "If Auth is enabled, a valid (non empty) TOKEN must be given in 'matrix_user_verification_service_uvs_access_token'."
  30. - name: Verify server_name for openid verification is given, if pinning a single server_name is enabled.
  31. ansible.builtin.assert:
  32. that:
  33. - matrix_user_verification_service_uvs_openid_verify_server_name|length > 0 or not matrix_user_verification_service_uvs_pin_openid_verify_server_name|bool
  34. fail_msg: "If pinning a single server_name is enabled, a valid (non empty) server_name must be given in 'matrix_user_verification_service_uvs_openid_verify_server_name'."
  35. - name: Verify the homeserver implementation is synapse
  36. ansible.builtin.assert:
  37. that:
  38. - matrix_homeserver_implementation == 'synapse'
  39. fail_msg: "The User-Verification-Service requires Synapse as homeserver implementation"
  40. - name: Fail if required matrix-user-verification-service settings not defined
  41. ansible.builtin.fail:
  42. msg: >-
  43. You need to define a required configuration setting (`{{ item.name }}`).
  44. when: "item.when | bool and lookup('vars', item.name, default='') | string | length == 0"
  45. with_items:
  46. - {'name': 'matrix_user_verification_service_uvs_homeserver_url', when: true}
  47. - {'name': 'matrix_user_verification_service_container_network', when: true}