Matrix Docker Ansible eploy
Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.
 
 

256 righe
14 KiB

  1. # SPDX-FileCopyrightText: 2019 - 2024 MDAD project contributors
  2. # SPDX-FileCopyrightText: 2019 - 2026 Slavi Pantaleev
  3. # SPDX-FileCopyrightText: 2020 Johanna Dorothea Reichmann
  4. # SPDX-FileCopyrightText: 2020 Marcel Partap
  5. # SPDX-FileCopyrightText: 2021 Aaron Raimist
  6. # SPDX-FileCopyrightText: 2021 Panagiotis Georgiadis
  7. # SPDX-FileCopyrightText: 2022 - 2023 Nikita Chernyi
  8. # SPDX-FileCopyrightText: 2022 László Várady
  9. # SPDX-FileCopyrightText: 2022 Marko Weltzer
  10. # SPDX-FileCopyrightText: 2022 Olivér Falvai
  11. # SPDX-FileCopyrightText: 2022 Vincent Post
  12. # SPDX-FileCopyrightText: 2023 Samuel Meenzen
  13. # SPDX-FileCopyrightText: 2024 Pierre 'McFly' Marty
  14. #
  15. # SPDX-License-Identifier: AGPL-3.0-or-later
  16. ---
  17. # mautrix-telegram is a Matrix <-> Telegram bridge
  18. # Project source code URL: https://github.com/mautrix/telegram
  19. matrix_mautrix_telegram_enabled: true
  20. matrix_mautrix_telegram_container_image_self_build: false
  21. matrix_mautrix_telegram_container_image_self_build_repo: "https://mau.dev/mautrix/telegram.git"
  22. matrix_mautrix_telegram_container_image_self_build_branch: "{{ 'main' if matrix_mautrix_telegram_version == 'latest' else matrix_mautrix_telegram_version }}"
  23. # renovate: datasource=docker depName=dock.mau.dev/mautrix/telegram
  24. matrix_mautrix_telegram_version: v0.2604.0
  25. # See: https://mau.dev/mautrix/telegram/container_registry
  26. matrix_mautrix_telegram_container_image: "{{ matrix_mautrix_telegram_container_image_registry_prefix }}mautrix/telegram:{{ matrix_mautrix_telegram_version }}"
  27. matrix_mautrix_telegram_container_image_registry_prefix: "{{ 'localhost/' if matrix_mautrix_telegram_container_image_self_build else matrix_mautrix_telegram_container_image_registry_prefix_upstream }}"
  28. matrix_mautrix_telegram_container_image_registry_prefix_upstream: "{{ matrix_mautrix_telegram_container_image_registry_prefix_upstream_default }}"
  29. matrix_mautrix_telegram_container_image_registry_prefix_upstream_default: "dock.mau.dev/"
  30. matrix_mautrix_telegram_base_path: "{{ matrix_base_data_path }}/mautrix-telegram"
  31. matrix_mautrix_telegram_config_path: "{{ matrix_mautrix_telegram_base_path }}/config"
  32. matrix_mautrix_telegram_data_path: "{{ matrix_mautrix_telegram_base_path }}/data"
  33. matrix_mautrix_telegram_container_src_files_path: "{{ matrix_mautrix_telegram_base_path }}/docker-src"
  34. matrix_mautrix_telegram_homeserver_address: ""
  35. matrix_mautrix_telegram_homeserver_domain: '{{ matrix_domain }}'
  36. # Whether asynchronous uploads via MSC2246 should be enabled for media.
  37. # Requires a homeserver that supports MSC2246 (https://github.com/matrix-org/matrix-spec-proposals/pull/2246).
  38. matrix_mautrix_telegram_homeserver_async_media: false
  39. matrix_mautrix_telegram_appservice_address: 'http://matrix-mautrix-telegram:8080'
  40. matrix_mautrix_telegram_msc4190_enabled: "{{ matrix_bridges_msc4190_enabled }}"
  41. matrix_mautrix_telegram_self_sign_enabled: "{{ matrix_bridges_self_sign_enabled }}"
  42. matrix_mautrix_telegram_command_prefix: "!tg"
  43. # Get your own API keys at https://my.telegram.org/apps
  44. matrix_mautrix_telegram_api_id: ''
  45. matrix_mautrix_telegram_api_hash: ''
  46. matrix_mautrix_telegram_container_network: ""
  47. matrix_mautrix_telegram_container_additional_networks: "{{ matrix_mautrix_telegram_container_additional_networks_auto + matrix_mautrix_telegram_container_additional_networks_custom }}"
  48. matrix_mautrix_telegram_container_additional_networks_auto: []
  49. matrix_mautrix_telegram_container_additional_networks_custom: []
  50. # matrix_mautrix_telegram_container_labels_traefik_enabled controls whether labels to assist a Traefik reverse-proxy will be attached to the container.
  51. # See `../templates/labels.j2` for details.
  52. #
  53. # To inject your own other container labels, see `matrix_mautrix_telegram_container_labels_additional_labels`.
  54. matrix_mautrix_telegram_container_labels_traefik_enabled: true
  55. matrix_mautrix_telegram_container_labels_traefik_docker_network: "{{ matrix_mautrix_telegram_container_network }}"
  56. matrix_mautrix_telegram_container_labels_traefik_entrypoints: web-secure
  57. matrix_mautrix_telegram_container_labels_traefik_tls_certResolver: default # noqa var-naming
  58. # Controls whether labels will be added that expose mautrix-telegram's metrics
  59. matrix_mautrix_telegram_container_labels_metrics_enabled: "{{ matrix_mautrix_telegram_metrics_enabled and matrix_mautrix_telegram_metrics_proxying_enabled }}"
  60. matrix_mautrix_telegram_container_labels_metrics_traefik_rule: "Host(`{{ matrix_mautrix_telegram_metrics_proxying_hostname }}`) && PathPrefix(`{{ matrix_mautrix_telegram_metrics_proxying_path_prefix }}`)"
  61. matrix_mautrix_telegram_container_labels_metrics_traefik_priority: 0
  62. matrix_mautrix_telegram_container_labels_metrics_traefik_entrypoints: "{{ matrix_mautrix_telegram_container_labels_traefik_entrypoints }}"
  63. matrix_mautrix_telegram_container_labels_metrics_traefik_tls: "{{ matrix_mautrix_telegram_container_labels_metrics_traefik_entrypoints != 'web' }}"
  64. matrix_mautrix_telegram_container_labels_metrics_traefik_tls_certResolver: "{{ matrix_mautrix_telegram_container_labels_traefik_tls_certResolver }}" # noqa var-naming
  65. matrix_mautrix_telegram_container_labels_metrics_middleware_basic_auth_enabled: false
  66. # See: https://doc.traefik.io/traefik/middlewares/http/basicauth/#users
  67. matrix_mautrix_telegram_container_labels_metrics_middleware_basic_auth_users: ''
  68. # matrix_mautrix_telegram_container_labels_additional_labels contains a multiline string with additional labels to add to the container label file.
  69. # See `../templates/labels.j2` for details.
  70. #
  71. # Example:
  72. # matrix_mautrix_telegram_container_labels_additional_labels: |
  73. # my.label=1
  74. # another.label="here"
  75. matrix_mautrix_telegram_container_labels_additional_labels: ''
  76. # A list of extra arguments to pass to the container
  77. matrix_mautrix_telegram_container_extra_arguments: []
  78. # List of systemd services that matrix-mautrix-telegram.service depends on.
  79. matrix_mautrix_telegram_systemd_required_services_list: "{{ matrix_mautrix_telegram_systemd_required_services_list_default + matrix_mautrix_telegram_systemd_required_services_list_auto + matrix_mautrix_telegram_systemd_required_services_list_custom }}"
  80. matrix_mautrix_telegram_systemd_required_services_list_default: "{{ [devture_systemd_docker_base_docker_service_name] if devture_systemd_docker_base_docker_service_name else [] }}"
  81. matrix_mautrix_telegram_systemd_required_services_list_auto: []
  82. matrix_mautrix_telegram_systemd_required_services_list_custom: []
  83. # List of systemd services that matrix-mautrix-telegram.service wants
  84. matrix_mautrix_telegram_systemd_wanted_services_list: []
  85. matrix_mautrix_telegram_appservice_token: ''
  86. matrix_mautrix_telegram_homeserver_token: ''
  87. matrix_mautrix_telegram_appservice_bot_username: telegrambot
  88. # Minimum severity of journal log messages.
  89. # Valid values: fatal, error, warn, info, debug, trace
  90. matrix_mautrix_telegram_logging_level: 'warn'
  91. # Whether or not created rooms should have federation enabled.
  92. # If false, created portal rooms will never be federated.
  93. matrix_mautrix_telegram_federate_rooms: true
  94. # Whether or not metrics endpoint should be enabled.
  95. # Enabling them is usually enough for a local (in-container) Prometheus to consume them.
  96. # If metrics need to be consumed by another (external) Prometheus server, consider exposing them via `matrix_mautrix_telegram_metrics_proxying_enabled`.
  97. matrix_mautrix_telegram_metrics_enabled: false
  98. # Controls whether metrics should be proxied (exposed) on a public URL
  99. matrix_mautrix_telegram_metrics_proxying_enabled: false
  100. matrix_mautrix_telegram_metrics_proxying_hostname: ''
  101. matrix_mautrix_telegram_metrics_proxying_path_prefix: ''
  102. # Database-related configuration fields.
  103. #
  104. # To use SQLite, stick to these defaults.
  105. #
  106. # To use Postgres:
  107. # - change the engine (`matrix_mautrix_telegram_database_engine: 'postgres'`)
  108. # - adjust your database credentials via the `matrix_mautrix_telegram_database_*` variables
  109. matrix_mautrix_telegram_database_engine: 'sqlite'
  110. matrix_mautrix_telegram_sqlite_database_path_local: "{{ matrix_mautrix_telegram_data_path }}/mautrix-telegram.db"
  111. matrix_mautrix_telegram_sqlite_database_path_in_container: "/data/mautrix-telegram.db"
  112. matrix_mautrix_telegram_database_username: 'matrix_mautrix_telegram'
  113. matrix_mautrix_telegram_database_password: 'some-password'
  114. matrix_mautrix_telegram_database_hostname: ''
  115. matrix_mautrix_telegram_database_port: 5432
  116. matrix_mautrix_telegram_database_name: 'matrix_mautrix_telegram'
  117. matrix_mautrix_telegram_database_sslmode: disable
  118. matrix_mautrix_telegram_database_connection_string: 'postgresql://{{ matrix_mautrix_telegram_database_username }}:{{ matrix_mautrix_telegram_database_password }}@{{ matrix_mautrix_telegram_database_hostname }}:{{ matrix_mautrix_telegram_database_port }}/{{ matrix_mautrix_telegram_database_name }}?sslmode={{ matrix_mautrix_telegram_database_sslmode }}'
  119. matrix_mautrix_telegram_appservice_database_type: "{{ {
  120. 'sqlite': 'sqlite3-fk-wal',
  121. 'postgres': 'postgres',
  122. }[matrix_mautrix_telegram_database_engine] }}"
  123. matrix_mautrix_telegram_appservice_database_uri: "{{ {
  124. 'sqlite': matrix_mautrix_telegram_sqlite_database_path_in_container,
  125. 'postgres': matrix_mautrix_telegram_database_connection_string,
  126. }[matrix_mautrix_telegram_database_engine] }}"
  127. matrix_mautrix_telegram_double_puppet_secrets: "{{ matrix_mautrix_telegram_double_puppet_secrets_auto | combine(matrix_mautrix_telegram_double_puppet_secrets_custom) }}"
  128. matrix_mautrix_telegram_double_puppet_secrets_auto: {}
  129. matrix_mautrix_telegram_double_puppet_secrets_custom: {}
  130. # Displayname template for Telegram users.
  131. # Available variables:
  132. # {{ .FullName }} - the full name of the Telegram user
  133. # {{ .FirstName }} - the first name of the Telegram user
  134. # {{ .LastName }} - the last name of the Telegram user
  135. # {{ .Username }} - the primary username of the Telegram user, if the user has one
  136. # {{ .UserID }} - the internal user ID of the Telegram user
  137. # {{ .Deleted }} - true if the user has been deleted, false otherwise
  138. matrix_mautrix_telegram_network_displayname_template: '{% raw %}{{ if .Deleted }}Deleted account {{ .UserID }}{{ else }}{{ .FullName }}{{ end }}{% endraw %}'
  139. # Enable End-to-bridge encryption
  140. matrix_mautrix_telegram_bridge_encryption_allow: "{{ matrix_bridges_encryption_enabled }}"
  141. matrix_mautrix_telegram_bridge_encryption_default: "{{ matrix_bridges_encryption_default }}"
  142. matrix_mautrix_telegram_bridge_encryption_require: false
  143. matrix_mautrix_telegram_bridge_encryption_key_sharing_allow: "{{ matrix_mautrix_telegram_bridge_encryption_allow }}"
  144. # This pickle key value is backward-compatible with the legacy (Python) bridge.
  145. # See: https://mau.dev/mautrix/telegram/-/blob/v0.2604.0/cmd/mautrix-telegram/legacymigrate.go
  146. matrix_mautrix_telegram_bridge_encryption_pickle_key: mautrix.bridge.e2ee
  147. matrix_mautrix_telegram_bridge_personal_filtering_spaces: true
  148. matrix_mautrix_telegram_provisioning_shared_secret: ''
  149. matrix_mautrix_telegram_public_media_signing_key: ''
  150. matrix_mautrix_telegram_bridge_permissions: |
  151. {{
  152. {'*': 'relay', matrix_mautrix_telegram_homeserver_domain: 'user'}
  153. | combine({matrix_admin: 'admin'} if matrix_admin else {})
  154. }}
  155. # Enable bridge relay functionality
  156. matrix_mautrix_telegram_bridge_relay_enabled: "{{ matrix_bridges_relay_enabled }}"
  157. # Only allow admins on this home server to set themselves as a relay user
  158. matrix_mautrix_telegram_bridge_relay_admin_only: true
  159. # List of user login IDs which anyone can set as a relay, as long as the relay user is in the room.
  160. matrix_mautrix_telegram_bridge_relay_default_relays: []
  161. # Controls whether to do backfilling at all.
  162. matrix_mautrix_telegram_backfill_enabled: true
  163. # Default mautrix-telegram configuration template which covers the generic use case.
  164. # You can customize it by controlling the various variables inside it.
  165. #
  166. # For a more advanced customization, you can extend the default (see `matrix_mautrix_telegram_configuration_extension_yaml`)
  167. # or completely replace this variable with your own template.
  168. matrix_mautrix_telegram_configuration_yaml: "{{ lookup('template', 'templates/config.yaml.j2') }}"
  169. matrix_mautrix_telegram_configuration_extension_yaml: |
  170. # Your custom YAML configuration goes here.
  171. # This configuration extends the default starting configuration (`matrix_mautrix_telegram_configuration_yaml`).
  172. #
  173. # You can override individual variables from the default configuration, or introduce new ones.
  174. #
  175. # If you need something more special, you can take full control by
  176. # completely redefining `matrix_mautrix_telegram_configuration_yaml`.
  177. matrix_mautrix_telegram_configuration_extension: "{{ matrix_mautrix_telegram_configuration_extension_yaml | from_yaml if matrix_mautrix_telegram_configuration_extension_yaml | from_yaml is mapping else {} }}"
  178. # Holds the final configuration (a combination of the default and its extension).
  179. # You most likely don't need to touch this variable. Instead, see `matrix_mautrix_telegram_configuration_yaml`.
  180. matrix_mautrix_telegram_configuration: "{{ matrix_mautrix_telegram_configuration_yaml | from_yaml | combine(matrix_mautrix_telegram_configuration_extension, recursive=True) }}"
  181. matrix_mautrix_telegram_registration_yaml: |
  182. id: telegram
  183. url: {{ matrix_mautrix_telegram_appservice_address }}
  184. as_token: "{{ matrix_mautrix_telegram_appservice_token }}"
  185. hs_token: "{{ matrix_mautrix_telegram_homeserver_token }}"
  186. # See https://github.com/mautrix/signal/issues/43
  187. sender_localpart: _bot_{{ matrix_mautrix_telegram_appservice_bot_username }}
  188. rate_limited: false
  189. namespaces:
  190. users:
  191. - exclusive: true
  192. regex: '^@telegram_.+:{{ matrix_mautrix_telegram_homeserver_domain | regex_escape }}$'
  193. - exclusive: true
  194. regex: '^@{{ matrix_mautrix_telegram_appservice_bot_username | regex_escape }}:{{ matrix_mautrix_telegram_homeserver_domain | regex_escape }}$'
  195. de.sorunome.msc2409.push_ephemeral: true
  196. receive_ephemeral: true
  197. io.element.msc4190: {{ matrix_mautrix_telegram_msc4190_enabled | to_json }}
  198. matrix_mautrix_telegram_registration: "{{ matrix_mautrix_telegram_registration_yaml | from_yaml }}"
  199. # matrix_mautrix_telegram_restart_necessary controls whether the service
  200. # will be restarted (when true) or merely started (when false) by the
  201. # systemd service manager role (when conditional restart is enabled).
  202. #
  203. # This value is automatically computed during installation based on whether
  204. # any configuration files, the systemd service file, or the container image changed.
  205. # The default of `false` means "no restart needed" — appropriate when the role's
  206. # installation tasks haven't run (e.g., due to --tags skipping them).
  207. matrix_mautrix_telegram_restart_necessary: false