Matrix Docker Ansible eploy
25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.
 
 

52 satır
2.9 KiB

  1. # SPDX-FileCopyrightText: 2023 - 2025 MDAD project contributors
  2. # SPDX-FileCopyrightText: 2024 - 2025 Slavi Pantaleev
  3. #
  4. # SPDX-License-Identifier: AGPL-3.0-or-later
  5. ---
  6. - name: Fail if required matrix-bot-draupnir variables are undefined
  7. ansible.builtin.fail:
  8. msg: "The `{{ item.name }}` variable must be defined and have a non-null value."
  9. with_items:
  10. - {'name': 'matrix_bot_draupnir_access_token', when: "{{ not matrix_bot_draupnir_pantalaimon_use }}"}
  11. - {'name': 'matrix_bot_draupnir_access_token', when: "{{ matrix_bot_draupnir_enable_experimental_rust_crypto }}"}
  12. - {'name': 'matrix_bot_draupnir_management_room', when: true}
  13. - {'name': 'matrix_bot_draupnir_container_network', when: true}
  14. - {'name': 'matrix_bot_draupnir_homeserver_url', when: true}
  15. - {'name': 'matrix_bot_draupnir_raw_homeserver_url', when: true}
  16. - {'name': 'matrix_bot_draupnir_pantalaimon_username', when: "{{ matrix_bot_draupnir_pantalaimon_use }}"}
  17. - {'name': 'matrix_bot_draupnir_pantalaimon_password', when: "{{ matrix_bot_draupnir_pantalaimon_use }}"}
  18. when: "item.when | bool and (vars[item.name] == '' or vars[item.name] is none)"
  19. - name: Fail if inappropriate variables are defined
  20. ansible.builtin.fail:
  21. msg: "The `{{ item.name }}` variable must be undefined or have a null value."
  22. with_items:
  23. - {'name': 'matrix_bot_draupnir_access_token', when: "{{ matrix_bot_draupnir_pantalaimon_use }}"}
  24. - {'name': 'matrix_bot_draupnir_access_token', when: "{{ matrix_bot_draupnir_login_native }}"}
  25. - {'name': 'matrix_bot_draupnir_pantalaimon_use', when: "{{ matrix_bot_draupnir_enable_experimental_rust_crypto }}"}
  26. when: "item.when | bool and not (vars[item.name] == '' or vars[item.name] is none)"
  27. - when: "matrix_bot_draupnir_pantalaimon_use == 'true' and matrix_bot_draupnir_pantalaimon_breakage_ignore == 'false'"
  28. block:
  29. - name: Inject warning if Pantalaimon is used together with Draupnir
  30. ansible.builtin.set_fact:
  31. devture_playbook_runtime_messages_list: |
  32. {{
  33. devture_playbook_runtime_messages_list | default([])
  34. +
  35. [
  36. "Note: Draupnir does not support running with Pantalaimon as it would break all workflows that involve answering prompts with reactions. To enable E2EE for Draupnir, it is recommended to use matrix_bot_draupnir_enable_experimental_rust_crypto instead. This warning can be disabled by setting matrix_bot_draupnir_pantalaimon_breakage_ignore to true."
  37. ]
  38. }}
  39. - name: (Deprecation) Catch and report renamed Draupnir settings
  40. ansible.builtin.fail:
  41. msg: >-
  42. Your configuration contains a variable, which now has a different name.
  43. Please rename the variable (`{{ item.old }}` -> `{{ item.new }}`) on your configuration file (vars.yml).
  44. when: "item.old in vars"
  45. with_items:
  46. - {'old': 'matrix_bot_draupnir_container_image_name_prefix', 'new': 'matrix_bot_draupnir_container_image_registry_prefix'}