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

37 строки
1.4 KiB

  1. # SPDX-FileCopyrightText: 2026 Slavi Pantaleev
  2. #
  3. # SPDX-License-Identifier: AGPL-3.0-or-later
  4. ---
  5. - tags:
  6. - setup-all
  7. - setup-bot-meowlnir
  8. - install-all
  9. - install-bot-meowlnir
  10. block:
  11. - when: matrix_bot_meowlnir_enabled | bool
  12. ansible.builtin.include_tasks: "{{ role_path }}/tasks/validate_config.yml"
  13. - when: matrix_bot_meowlnir_enabled | bool
  14. ansible.builtin.include_tasks: "{{ role_path }}/tasks/setup_install.yml"
  15. - tags:
  16. - setup-all
  17. - setup-bot-meowlnir
  18. block:
  19. - when: not matrix_bot_meowlnir_enabled | bool
  20. ansible.builtin.include_tasks: "{{ role_path }}/tasks/setup_uninstall.yml"
  21. # Creating bots talks to Meowlnir's management API, which means starting the service and writing to its database.
  22. # Like the matrix-user-creator role, this intentionally stays off the `setup-all` tag, so that an initial installation does not populate a database that is about to be replaced by an import.
  23. - tags:
  24. - ensure-matrix-users-created
  25. - ensure-users-created
  26. block:
  27. # Runs when there are bots to create, but also when there are none and pruning is on: an emptied-out bot list is exactly the case the pruning safeguards need to see.
  28. - when: >-
  29. matrix_bot_meowlnir_enabled | bool
  30. and (matrix_bot_meowlnir_bots | length > 0 or matrix_bot_meowlnir_bots_pruning_enabled | bool)
  31. ansible.builtin.include_tasks: "{{ role_path }}/tasks/setup_bots.yml"