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.
 
 

135 line
9.0 KiB

  1. # SPDX-FileCopyrightText: 2024 MDAD project contributors
  2. # SPDX-FileCopyrightText: 2024 - 2026 Catalan Lover <catalanlover@protonmail.com>
  3. # SPDX-FileCopyrightText: 2024 - 2025 Slavi Pantaleev
  4. # SPDX-FileCopyrightText: 2024 Suguru Hirahara
  5. #
  6. # SPDX-License-Identifier: AGPL-3.0-or-later
  7. ---
  8. # A moderation tool for Matrix
  9. # Project source code URL: https://github.com/the-draupnir-project/Draupnir
  10. matrix_appservice_draupnir_for_all_enabled: true
  11. # renovate: datasource=docker depName=depName=ghcr.io/the-draupnir-project/draupnir
  12. matrix_appservice_draupnir_for_all_version: "v3.0.0"
  13. matrix_appservice_draupnir_for_all_container_image_self_build: false
  14. matrix_appservice_draupnir_for_all_container_image_self_build_repo: "https://github.com/the-draupnir-project/Draupnir.git"
  15. matrix_appservice_draupnir_for_all_container_image_registry_prefix: "{{ 'localhost/' if matrix_appservice_draupnir_for_all_container_image_self_build else matrix_appservice_draupnir_for_all_container_image_registry_prefix_upstream }}"
  16. matrix_appservice_draupnir_for_all_container_image_registry_prefix_upstream: "{{ matrix_appservice_draupnir_for_all_container_image_registry_prefix_upstream_default }}"
  17. matrix_appservice_draupnir_for_all_container_image_registry_prefix_upstream_default: "ghcr.io/"
  18. matrix_appservice_draupnir_for_all_container_image: "{{ matrix_appservice_draupnir_for_all_container_image_registry_prefix }}{{ matrix_appservice_draupnir_for_all_container_image_registry_namespace_identifier }}:{{ matrix_appservice_draupnir_for_all_version }}"
  19. matrix_appservice_draupnir_for_all_container_image_registry_namespace_identifier: "the-draupnir-project/draupnir"
  20. matrix_appservice_draupnir_for_all_base_path: "{{ matrix_base_data_path }}/draupnir-for-all"
  21. matrix_appservice_draupnir_for_all_config_path: "{{ matrix_appservice_draupnir_for_all_base_path }}/config"
  22. matrix_appservice_draupnir_for_all_data_path: "{{ matrix_appservice_draupnir_for_all_base_path }}/data"
  23. matrix_appservice_draupnir_for_all_container_src_files_path: "{{ matrix_appservice_draupnir_for_all_base_path }}/docker-src"
  24. matrix_appservice_draupnir_for_all_container_network: ""
  25. matrix_appservice_draupnir_for_all_container_additional_networks: "{{ matrix_appservice_draupnir_for_all_container_additional_networks_auto + matrix_appservice_draupnir_for_all_container_additional_networks_custom }}"
  26. matrix_appservice_draupnir_for_all_container_additional_networks_auto: []
  27. matrix_appservice_draupnir_for_all_container_additional_networks_custom: []
  28. # A list of extra arguments to pass to the container
  29. matrix_appservice_draupnir_for_all_container_extra_arguments: []
  30. # List of systemd services that matrix-bot-draupnir.service depends on
  31. matrix_appservice_draupnir_for_all_systemd_required_services_list: "{{ matrix_appservice_draupnir_for_all_systemd_required_services_list_default + matrix_appservice_draupnir_for_all_systemd_required_services_list_auto + matrix_appservice_draupnir_for_all_systemd_required_services_list_custom }}"
  32. matrix_appservice_draupnir_for_all_systemd_required_services_list_default: "{{ [devture_systemd_docker_base_docker_service_name] if devture_systemd_docker_base_docker_service_name else [] }}"
  33. matrix_appservice_draupnir_for_all_systemd_required_services_list_auto: []
  34. matrix_appservice_draupnir_for_all_systemd_required_services_list_custom: []
  35. # List of systemd services that matrix-bot-draupnir.service wants
  36. matrix_appservice_draupnir_for_all_systemd_wanted_services_list: []
  37. # Rolling tag: true if version doesn't match semver shape (vX.Y.Z with optional prerelease/build), false otherwise.
  38. matrix_appservice_draupnir_for_all_rolling_tag: "{{ not (matrix_appservice_draupnir_for_all_version is match('^v[0-9]+\\.[0-9]+\\.[0-9]+(?:-[0-9A-Za-z.-]+)?(?:\\+[0-9A-Za-z.-]+)?$')) }}"
  39. # Force restart the service on all runs only when both roles are enabled, both roles
  40. # are using the same version string, and that version is a classified as a moving tag.
  41. matrix_appservice_draupnir_for_all_force_restart: "{{
  42. matrix_bot_draupnir_enabled | bool and
  43. matrix_appservice_draupnir_for_all_enabled | bool and
  44. matrix_bot_draupnir_version == matrix_appservice_draupnir_for_all_version and
  45. matrix_appservice_draupnir_for_all_rolling_tag | bool
  46. }}"
  47. # The room ID where people can use the bot. The bot has no access controls, so
  48. # anyone in this room can use the bot - secure your room!
  49. # This should be a room alias - not a matrix.to URL.
  50. # Note: Draupnir is fairly verbose - expect a lot of messages from it.
  51. # This room is different for Appservice Mode compared to normal mode.
  52. # In Appservice mode it provides functions like user management.
  53. matrix_appservice_draupnir_for_all_config_adminRoom: "" # noqa var-naming
  54. # Controls if the room state backing store is activated.
  55. # Room state backing store makes restarts of the bot lightning fast as the bot does not suffer from amnesia.
  56. # This config option has diminished improvements for bots on extremely fast homeservers or very very small bots on fast homeservers.
  57. matrix_appservice_draupnir_for_all_config_roomStateBackingStore_enabled: false # noqa var-naming
  58. matrix_appservice_draupnir_for_all_database_username: matrix_appservice_draupnir_for_all
  59. matrix_appservice_draupnir_for_all_database_password: 'some-passsword'
  60. matrix_appservice_draupnir_for_all_database_hostname: ''
  61. matrix_appservice_draupnir_for_all_database_port: 5432
  62. matrix_appservice_draupnir_for_all_database_name: matrix_appservice_draupnir_for_all
  63. matrix_appservice_draupnir_for_all_database_sslmode: disable
  64. matrix_appservice_draupnir_for_all_appservice_port: "9001"
  65. matrix_appservice_draupnir_for_all_appservice_url: 'http://matrix-appservice-draupnir-for-all'
  66. matrix_appservice_draupnir_for_all_database_connection_string: 'postgresql://{{ matrix_appservice_draupnir_for_all_database_username }}:{{ matrix_appservice_draupnir_for_all_database_password }}@{{ matrix_appservice_draupnir_for_all_database_hostname }}:{{ matrix_appservice_draupnir_for_all_database_port }}/{{ matrix_appservice_draupnir_for_all_database_name }}?sslmode={{ matrix_appservice_draupnir_for_all_database_sslmode }}'
  67. matrix_appservice_draupnir_for_all_user_prefix: "draupnir_"
  68. matrix_appservice_draupnir_for_all_registration_yaml: |
  69. id: "draupnir-for-all"
  70. as_token: "{{ matrix_appservice_draupnir_for_all_appservice_token }}"
  71. hs_token: "{{ matrix_appservice_draupnir_for_all_homeserver_token }}"
  72. url: "{{ matrix_appservice_draupnir_for_all_appservice_url }}:{{ matrix_appservice_draupnir_for_all_appservice_port }}"
  73. sender_localpart: draupnir-main
  74. namespaces:
  75. users:
  76. - exclusive: true
  77. regex: '@{{ matrix_appservice_draupnir_for_all_user_prefix }}*'
  78. rate_limited: false
  79. matrix_appservice_draupnir_for_all_registration: "{{ matrix_appservice_draupnir_for_all_registration_yaml | from_yaml }}"
  80. matrix_appservice_draupnir_for_all_configuration_appservice: "{{ lookup('template', 'templates/production-appservice.yaml.j2') | from_yaml }}"
  81. # Default configuration template which covers the generic use case.
  82. # You can customize it by controlling the various variables inside it.
  83. #
  84. # For a more advanced customization, you can extend the default (see `matrix_appservice_draupnir_for_all_configuration_extension_yaml`)
  85. # or completely replace this variable with your own template.
  86. matrix_appservice_draupnir_for_all_configuration_yaml: "{{ lookup('template', 'templates/production-bots.yaml.j2') }}"
  87. matrix_appservice_draupnir_for_all_configuration_extension_yaml: |
  88. # Your custom YAML configuration goes here.
  89. # This configuration extends the default starting configuration (`matrix_appservice_draupnir_for_all_configuration_yaml`).
  90. #
  91. # You can override individual variables from the default configuration, or introduce new ones.
  92. #
  93. # If you need something more special, you can take full control by
  94. # completely redefining `matrix_appservice_draupnir_for_all_configuration_yaml`.
  95. matrix_appservice_draupnir_for_all_configuration_extension: "{{ matrix_appservice_draupnir_for_all_configuration_extension_yaml | from_yaml if matrix_appservice_draupnir_for_all_configuration_extension_yaml | from_yaml is mapping else {} }}"
  96. # Holds the final configuration (a combination of the default and its extension).
  97. # You most likely don't need to touch this variable. Instead, see `matrix_appservice_draupnir_for_all_configuration_yaml`.
  98. matrix_appservice_draupnir_for_all_configuration: "{{ matrix_appservice_draupnir_for_all_configuration_yaml | from_yaml | combine(matrix_appservice_draupnir_for_all_configuration_extension, recursive=True) }}"
  99. # matrix_appservice_draupnir_for_all_restart_necessary controls whether the service
  100. # will be restarted (when true) or merely started (when false) by the
  101. # systemd service manager role (when conditional restart is enabled).
  102. #
  103. # This value is automatically computed during installation based on whether
  104. # any configuration files, the systemd service file, or the container image changed.
  105. # The default of `false` means "no restart needed" — appropriate when the role's
  106. # installation tasks haven't run (e.g., due to --tags skipping them).
  107. matrix_appservice_draupnir_for_all_restart_necessary: false