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

56 строки
2.1 KiB

  1. # SPDX-FileCopyrightText: 2024 MDAD Team and contributors
  2. #
  3. # SPDX-License-Identifier: AGPL-3.0-or-later
  4. ---
  5. - name: Fail if Shared Secret Auth secret not set
  6. ansible.builtin.fail:
  7. msg: "Shared Secret Auth is enabled, but no secret has been set in matrix_synapse_ext_password_provider_shared_secret_auth_shared_secret"
  8. when: "matrix_synapse_ext_password_provider_shared_secret_auth_shared_secret == ''"
  9. - name: Fail if no Shared Secret Auth login types enabled
  10. ansible.builtin.fail:
  11. msg: "Shared Secret Auth is enabled, but none of the login types are"
  12. when: "not (matrix_synapse_ext_password_provider_shared_secret_auth_m_login_password_support_enabled or matrix_synapse_ext_password_provider_shared_secret_auth_com_devture_shared_secret_auth_support_enabled)"
  13. - name: Download matrix-synapse-shared-secret-auth
  14. ansible.builtin.get_url:
  15. url: "{{ matrix_synapse_ext_password_provider_shared_secret_auth_download_url }}"
  16. dest: "{{ matrix_synapse_ext_path }}/shared_secret_authenticator.py"
  17. force: true
  18. mode: 0440
  19. owner: "{{ matrix_synapse_uid }}"
  20. group: "{{ matrix_synapse_gid }}"
  21. register: result
  22. retries: "{{ devture_playbook_help_geturl_retries_count }}"
  23. delay: "{{ devture_playbook_help_geturl_retries_delay }}"
  24. until: result is not failed
  25. - ansible.builtin.set_fact:
  26. matrix_synapse_modules: |
  27. {{
  28. matrix_synapse_modules | default([])
  29. +
  30. [
  31. {
  32. "module": "shared_secret_authenticator.SharedSecretAuthProvider",
  33. "config": matrix_synapse_ext_password_provider_shared_secret_config
  34. }
  35. ]
  36. }}
  37. matrix_synapse_container_extra_arguments: >
  38. {{
  39. matrix_synapse_container_extra_arguments | default([])
  40. +
  41. ["--mount type=bind,src={{ matrix_synapse_ext_path }}/shared_secret_authenticator.py,dst={{ matrix_synapse_in_container_python_packages_path }}/shared_secret_authenticator.py,ro"]
  42. }}
  43. matrix_synapse_additional_loggers_auto: >
  44. {{
  45. matrix_synapse_additional_loggers_auto
  46. +
  47. [{'name': 'shared_secret_authenticator', 'level': 'INFO'}]
  48. }}