Ensure the homeserver accepts matrix-bot-meowlnir's appservice token before provisioning

The homeserver only reads appservice registrations on startup, and the
playbook only restarts it at the very end of a run. On the run which
first enables Meowlnir, bot provisioning therefore talked to a
homeserver still running without Meowlnir's registration, hitting
M_UNKNOWN_TOKEN and hanging indefinitely.

Provisioning now verifies the token upfront and restarts the homeserver
itself when needed, so a single run completes even when Meowlnir was
just enabled.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Slavi Pantaleev
2026-08-17 09:32:14 +03:00
co-authored by Claude Fable 5
parent e5957ccc63
commit d839e45548
5 changed files with 118 additions and 0 deletions
@@ -21,6 +21,9 @@
seconds: "{{ matrix_bot_meowlnir_bots_start_wait_time_seconds }}"
when: matrix_bot_meowlnir_start_result.changed | bool
- name: Ensure the homeserver accepts Meowlnir's appservice token before creating bots
ansible.builtin.include_tasks: "{{ role_path }}/tasks/util/ensure_appservice_token_accepted.yml"
- name: Read which bots Meowlnir already has
ansible.builtin.include_tasks: "{{ role_path }}/tasks/util/read_meowlnir_state.yml"