Matrix Docker Ansible eploy
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

39 rivejä
1.7 KiB

  1. # SPDX-FileCopyrightText: 2026 Slavi Pantaleev
  2. #
  3. # SPDX-License-Identifier: AGPL-3.0-or-later
  4. ---
  5. - name: Remove Meowlnir management room - {{ room_id_to_remove | quote }}
  6. ansible.builtin.command:
  7. cmd: >-
  8. {{ matrix_bot_meowlnir_bin_path }}/meowlnir-api
  9. DELETE /_meowlnir/v1/management_room/{{ room_id_to_remove }}
  10. register: matrix_bot_meowlnir_room_removal_result
  11. changed_when: "matrix_bot_meowlnir_room_removal_result.stdout_lines | default([]) | last | default('') == '200'"
  12. failed_when: false
  13. - name: Fail if the Meowlnir management room could not be removed - {{ room_id_to_remove | quote }}
  14. ansible.builtin.fail:
  15. msg: >-
  16. De-registering the Meowlnir management room `{{ room_id_to_remove }}` failed.
  17. Meowlnir said: {{ matrix_bot_meowlnir_room_removal_result.stdout | default('') | trim }}
  18. {{ matrix_bot_meowlnir_room_removal_result.stderr | default('') | trim }}
  19. when: >-
  20. matrix_bot_meowlnir_room_removal_result.rc != 0
  21. or (matrix_bot_meowlnir_room_removal_result.stdout_lines | default([]) | length == 0)
  22. or (matrix_bot_meowlnir_room_removal_result.stdout_lines | last not in ['200', '404'])
  23. - name: Report the removed Meowlnir management room - {{ room_id_to_remove | quote }}
  24. ansible.builtin.set_fact:
  25. devture_playbook_runtime_messages_list: >-
  26. {{
  27. devture_playbook_runtime_messages_list | default([])
  28. +
  29. [
  30. "Note: the Meowlnir management room " ~ room_id_to_remove ~ " is no longer declared, so it has been de-registered." ~
  31. " The room itself still exists and the bot is still in it - Meowlnir simply no longer takes commands there."
  32. ]
  33. }}
  34. when: "matrix_bot_meowlnir_room_removal_result.stdout_lines | default([]) | last | default('') == '200'"