Matrix Docker Ansible eploy
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.
 
 

56 řádky
3.5 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. - {'old': 'matrix_user_verification_service_container_image_force_pull', 'new': '<removed> (the new community.docker.docker_image_pull module handles this natively)'}
  21. - name: Verify homeserver_url is not empty
  22. ansible.builtin.assert:
  23. that:
  24. - matrix_user_verification_service_uvs_homeserver_url|length > 0
  25. fail_msg: "Missing variable in {{ matrix_user_verification_service_ansible_name }} role"
  26. - name: Verify Auth is configured properly or disabled
  27. ansible.builtin.assert:
  28. that:
  29. - matrix_user_verification_service_uvs_access_token|length > 0 or not matrix_user_verification_service_uvs_require_auth|bool
  30. fail_msg: "If Auth is enabled, a valid (non empty) TOKEN must be given in 'matrix_user_verification_service_uvs_access_token'."
  31. - name: Verify server_name for openid verification is given, if pinning a single server_name is enabled.
  32. ansible.builtin.assert:
  33. that:
  34. - matrix_user_verification_service_uvs_openid_verify_server_name|length > 0 or not matrix_user_verification_service_uvs_pin_openid_verify_server_name|bool
  35. 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'."
  36. - name: Verify the homeserver implementation is synapse
  37. ansible.builtin.assert:
  38. that:
  39. - matrix_homeserver_implementation == 'synapse'
  40. fail_msg: "The User-Verification-Service requires Synapse as homeserver implementation"
  41. - name: Fail if required matrix-user-verification-service settings not defined
  42. ansible.builtin.fail:
  43. msg: >-
  44. You need to define a required configuration setting (`{{ item.name }}`).
  45. when: "item.when | bool and lookup('vars', item.name, default='') | string | length == 0"
  46. with_items:
  47. - {'name': 'matrix_user_verification_service_uvs_homeserver_url', when: true}
  48. - {'name': 'matrix_user_verification_service_container_network', when: true}