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

36 строки
1.5 KiB

  1. # SPDX-FileCopyrightText: 2026 Slavi Pantaleev
  2. #
  3. # SPDX-License-Identifier: AGPL-3.0-or-later
  4. ---
  5. # Validation lives in validate_config.yml so that it also runs on regular setup/install runs, catching mistakes long before anyone reaches for the `ensure-matrix-users-created` tag.
  6. # It is repeated here because this tag can be run on its own, and creating a bot outside the appservice's user namespace fails in ways that are hard to trace back.
  7. - name: Validate matrix-bot-meowlnir configuration before creating bots
  8. ansible.builtin.include_tasks: "{{ role_path }}/tasks/validate_config.yml"
  9. - name: Ensure matrix-bot-meowlnir is started before creating bots
  10. ansible.builtin.service:
  11. name: matrix-bot-meowlnir.service
  12. state: started
  13. daemon_reload: true
  14. register: matrix_bot_meowlnir_start_result
  15. - name: Wait a while, so that Meowlnir can manage to start before creating bots
  16. ansible.builtin.pause:
  17. seconds: "{{ matrix_bot_meowlnir_bots_start_wait_time_seconds }}"
  18. when: matrix_bot_meowlnir_start_result.changed | bool
  19. - name: Read which bots Meowlnir already has
  20. ansible.builtin.include_tasks: "{{ role_path }}/tasks/util/read_meowlnir_state.yml"
  21. - name: Ensure Meowlnir bots created
  22. ansible.builtin.include_tasks: "{{ role_path }}/tasks/util/ensure_bot_created.yml"
  23. with_items: "{{ matrix_bot_meowlnir_bots }}"
  24. loop_control:
  25. loop_var: bot
  26. - name: Remove Meowlnir bots which are no longer declared
  27. ansible.builtin.include_tasks: "{{ role_path }}/tasks/util/prune_bots.yml"
  28. when: matrix_bot_meowlnir_bots_pruning_enabled | bool