Matrix Docker Ansible eploy
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.
 
 

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