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.
 
 

63 satır
4.1 KiB

  1. # SPDX-FileCopyrightText: 2023 - 2025 MDAD project contributors
  2. # SPDX-FileCopyrightText: 2023 - 2025 Catalan Lover <catalanlover@protonmail.com>
  3. # SPDX-FileCopyrightText: 2024 - 2025 Slavi Pantaleev
  4. #
  5. # SPDX-License-Identifier: AGPL-3.0-or-later
  6. ---
  7. - name: Fail if required matrix-bot-draupnir variables are undefined
  8. ansible.builtin.fail:
  9. msg: "The `{{ item.name }}` variable must be defined and have a non-null value."
  10. with_items:
  11. - {'name': 'matrix_bot_draupnir_config_accessToken', when: "{{ not matrix_bot_draupnir_pantalaimon_use }}"}
  12. - {'name': 'matrix_bot_draupnir_config_accessToken', when: "{{ matrix_bot_draupnir_enable_experimental_rust_crypto }}"}
  13. - {'name': 'matrix_bot_draupnir_config_managementRoom', when: true}
  14. - {'name': 'matrix_bot_draupnir_container_network', when: true}
  15. - {'name': 'matrix_bot_draupnir_config_homeserverUrl', when: true}
  16. - {'name': 'matrix_bot_draupnir_config_rawHomeserverUrl', when: true}
  17. - {'name': 'matrix_bot_draupnir_pantalaimon_username', when: "{{ matrix_bot_draupnir_pantalaimon_use }}"}
  18. - {'name': 'matrix_bot_draupnir_pantalaimon_password', when: "{{ matrix_bot_draupnir_pantalaimon_use }}"}
  19. when: "item.when | bool and (vars[item.name] == '' or vars[item.name] is none)"
  20. - name: Fail if inappropriate variables are defined
  21. ansible.builtin.fail:
  22. msg: "The `{{ item.name }}` variable must be undefined or have a null value."
  23. with_items:
  24. - {'name': 'matrix_bot_draupnir_config_accessToken', when: "{{ matrix_bot_draupnir_pantalaimon_use }}"}
  25. - {'name': 'matrix_bot_draupnir_config_accessToken', when: "{{ matrix_bot_draupnir_login_native }}"}
  26. - {'name': 'matrix_bot_draupnir_pantalaimon_use', when: "{{ matrix_bot_draupnir_enable_experimental_rust_crypto }}"}
  27. when: "item.when | bool and not (vars[item.name] == '' or vars[item.name] is none)"
  28. - when: "matrix_bot_draupnir_pantalaimon_use == 'true' and matrix_bot_draupnir_pantalaimon_breakage_ignore == 'false'"
  29. block:
  30. - name: Inject warning if Pantalaimon is used together with Draupnir
  31. ansible.builtin.set_fact:
  32. devture_playbook_runtime_messages_list: |
  33. {{
  34. devture_playbook_runtime_messages_list | default([])
  35. +
  36. [
  37. "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."
  38. ]
  39. }}
  40. - name: (Deprecation) Catch and report renamed Draupnir settings
  41. ansible.builtin.fail:
  42. msg: >-
  43. Your configuration contains a variable, which now has a different name.
  44. Please rename the variable (`{{ item.old }}` -> `{{ item.new }}`) on your configuration file (vars.yml).
  45. when: "item.old in vars"
  46. with_items:
  47. - {'old': 'matrix_bot_draupnir_container_image_name_prefix', 'new': 'matrix_bot_draupnir_container_image_registry_prefix'}
  48. - {'old': 'matrix_bot_draupnir_enable_room_state_backing_store', 'new': 'matrix_bot_draupnir_config_roomStateBackingStore_enabled'}
  49. - {'old': 'matrix_bot_draupnir_disable_server_acl', 'new': 'matrix_bot_draupnir_config_disableServerACL'}
  50. - {'old': 'matrix_bot_draupnir_enable_experimental_rust_crypto', 'new': 'matrix_bot_draupnir_config_experimentalRustCrypto'}
  51. - {'old': 'matrix_bot_draupnir_access_token', 'new': 'matrix_bot_draupnir_config_accessToken'}
  52. - {'old': 'matrix_bot_draupnir_management_room', 'new': 'matrix_bot_draupnir_config_managementRoom'}
  53. - {'old': 'matrix_bot_draupnir_homeserver_url', 'new': 'matrix_bot_draupnir_config_homeserverUrl'}
  54. - {'old': 'matrix_bot_draupnir_raw_homeserver_url', 'new': 'matrix_bot_draupnir_config_rawHomeserverUrl'}
  55. - {'old': 'matrix_bot_draupnir_web_enabled', 'new': 'matrix_bot_draupnir_config_web_enabled'}
  56. - {'old': 'matrix_bot_draupnir_abuse_reporting_enabled', 'new': 'matrix_bot_draupnir_config_web_abuseReporting'}
  57. - {'old': 'matrix_bot_draupnir_display_reports', 'new': 'matrix_bot_draupnir_config_displayReports'}