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

56 строки
2.4 KiB

  1. ---
  2. - name: Validate Matrix users to create
  3. ansible.builtin.include_tasks: "{{ role_path }}/tasks/util/validate_user.yml"
  4. with_items: "{{ matrix_user_creator_users }}"
  5. loop_control:
  6. loop_var: user
  7. # Suppress logging to avoid dumping the credentials to the shell
  8. no_log: true
  9. - when: not matrix_authentication_service_enabled | bool
  10. block:
  11. - name: Ensure homeserver is started before creating Matrix users
  12. ansible.builtin.service:
  13. name: "matrix-{{ matrix_homeserver_implementation }}.service"
  14. state: started
  15. daemon_reload: true
  16. register: matrix_user_registrator_homeserver_start_result
  17. - name: Wait a while, so that the homeserver can manage to start before creating Matrix users
  18. ansible.builtin.pause:
  19. seconds: "{{ matrix_user_creator_homeserver_start_wait_time_seconds }}"
  20. when: matrix_user_registrator_homeserver_start_result.changed | bool
  21. - name: Ensure Matrix users are created for homeservers
  22. when: not matrix_authentication_service_enabled | bool
  23. ansible.builtin.include_tasks: "{{ role_path }}/tasks/util/ensure_user_registered_{{ matrix_homeserver_implementation }}.yml"
  24. with_items: "{{ matrix_user_creator_users }}"
  25. loop_control:
  26. loop_var: user
  27. # Suppress logging to avoid dumping the credentials to the shell
  28. no_log: true
  29. - when: matrix_authentication_service_enabled and not matrix_authentication_service_migration_in_progress
  30. block:
  31. - name: Ensure Matrix Authentication Service is started before creating Matrix users
  32. ansible.builtin.service:
  33. name: "matrix-authentication-service.service"
  34. state: started
  35. daemon_reload: true
  36. register: matrix_user_registrator_mas_start_result
  37. - name: Wait a while, so that the Matrix Authentication Service can manage to start before creating Matrix users
  38. ansible.builtin.pause:
  39. seconds: "{{ matrix_user_creator_homeserver_start_wait_time_seconds }}"
  40. when: matrix_user_registrator_mas_start_result.changed | bool
  41. - name: Ensure Matrix users are created for Matrix Authentication Service
  42. when: matrix_authentication_service_enabled | bool
  43. ansible.builtin.include_tasks: "{{ role_path }}/tasks/util/ensure_user_registered_matrix_authentication_service.yml"
  44. with_items: "{{ matrix_user_creator_users }}"
  45. loop_control:
  46. loop_var: user
  47. # Suppress logging to avoid dumping the credentials to the shell
  48. no_log: true