Matrix Docker Ansible eploy
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.
 
 

238 rader
15 KiB

  1. ---
  2. # mautrix-telegram is a Matrix <-> Telegram bridge
  3. # Project source code URL: https://github.com/mautrix/telegram
  4. matrix_mautrix_telegram_enabled: true
  5. matrix_mautrix_telegram_scheme: https
  6. matrix_mautrix_telegram_hostname: ''
  7. matrix_mautrix_telegram_path_prefix: ''
  8. matrix_mautrix_telegram_lottieconverter_container_image_self_build: false
  9. matrix_mautrix_telegram_lottieconverter_container_image_self_build_mask_arch: false
  10. matrix_mautrix_telegram_lottieconverter_docker_repo: "https://mau.dev/tulir/lottieconverter.git"
  11. matrix_mautrix_telegram_lottieconverter_docker_repo_version: "master"
  12. matrix_mautrix_telegram_lottieconverter_docker_src_files_path: "{{ matrix_base_data_path }}/lotticonverter/docker-src"
  13. matrix_mautrix_telegram_lottieconverter_docker_image: "{{ matrix_mautrix_telegram_lottieconverter_docker_image_registry_prefix }}tulir/lottieconverter:alpine-3.16" # needs to be adjusted according to the FROM clause of Dockerfile of mautrix-telegram
  14. matrix_mautrix_telegram_lottieconverter_docker_image_registry_prefix: "{{ 'localhost/' if matrix_mautrix_telegram_lottieconverter_container_image_self_build else matrix_mautrix_telegram_lottieconverter_docker_image_registry_prefix_upstream }}"
  15. matrix_mautrix_telegram_lottieconverter_docker_image_registry_prefix_upstream: "{{ matrix_mautrix_telegram_lottieconverter_docker_image_registry_prefix_upstream_default }}"
  16. matrix_mautrix_telegram_lottieconverter_docker_image_registry_prefix_upstream_default: "dock.mau.dev/"
  17. matrix_mautrix_telegram_container_image_self_build: false
  18. matrix_mautrix_telegram_docker_repo: "https://mau.dev/mautrix/telegram.git"
  19. matrix_mautrix_telegram_docker_repo_version: "{{ 'master' if matrix_mautrix_telegram_version == 'latest' else matrix_mautrix_telegram_version }}"
  20. matrix_mautrix_telegram_docker_src_files_path: "{{ matrix_base_data_path }}/mautrix-telegram/docker-src"
  21. # renovate: datasource=docker depName=dock.mau.dev/mautrix/telegram
  22. matrix_mautrix_telegram_version: v0.15.2
  23. # See: https://mau.dev/mautrix/telegram/container_registry
  24. matrix_mautrix_telegram_docker_image: "{{ matrix_mautrix_telegram_docker_image_registry_prefix }}mautrix/telegram:{{ matrix_mautrix_telegram_version }}"
  25. matrix_mautrix_telegram_docker_image_registry_prefix: "{{ 'localhost/' if matrix_mautrix_telegram_container_image_self_build else matrix_mautrix_telegram_docker_image_registry_prefix_upstream }}"
  26. matrix_mautrix_telegram_docker_image_registry_prefix_upstream: "{{ matrix_mautrix_telegram_docker_image_registry_prefix_upstream_default }}"
  27. matrix_mautrix_telegram_docker_image_registry_prefix_upstream_default: "dock.mau.dev/"
  28. matrix_mautrix_telegram_docker_image_force_pull: "{{ matrix_mautrix_telegram_docker_image.endswith(':latest') }}"
  29. matrix_mautrix_telegram_base_path: "{{ matrix_base_data_path }}/mautrix-telegram"
  30. matrix_mautrix_telegram_config_path: "{{ matrix_mautrix_telegram_base_path }}/config"
  31. matrix_mautrix_telegram_data_path: "{{ matrix_mautrix_telegram_base_path }}/data"
  32. matrix_mautrix_telegram_command_prefix: "!tg"
  33. matrix_mautrix_telegram_bridge_permissions: |
  34. {{
  35. {'*': 'relaybot', matrix_mautrix_telegram_homeserver_domain: 'full'}
  36. | combine({matrix_admin: 'admin'} if matrix_admin else {})
  37. }}
  38. # Get your own API keys at https://my.telegram.org/apps
  39. matrix_mautrix_telegram_api_id: ''
  40. matrix_mautrix_telegram_api_hash: ''
  41. matrix_mautrix_telegram_bot_token: disabled
  42. # Define the filter-mode
  43. matrix_mautrix_telegram_filter_mode: "blacklist"
  44. # Whether or not the public-facing endpoints should be enabled (web-based login)
  45. matrix_mautrix_telegram_appservice_public_enabled: true
  46. # Mautrix telegram public endpoint to log in to telegram
  47. # Use an uuid so it's not easily discoverable.
  48. # Example: /741a0483-ba17-4682-9900-30bd7269f1cc
  49. matrix_mautrix_telegram_public_endpoint: "{{ matrix_mautrix_telegram_path_prefix }}"
  50. matrix_mautrix_telegram_homeserver_address: ""
  51. matrix_mautrix_telegram_homeserver_domain: '{{ matrix_domain }}'
  52. matrix_mautrix_telegram_appservice_address: 'http://matrix-mautrix-telegram:8080'
  53. matrix_mautrix_telegram_appservice_public_external: '{{ matrix_mautrix_telegram_scheme }}://{{ matrix_mautrix_telegram_hostname }}{{ matrix_mautrix_telegram_public_endpoint }}'
  54. matrix_mautrix_telegram_appservice_bot_username: telegrambot
  55. # Specifies the default log level for all bridge loggers.
  56. matrix_mautrix_telegram_logging_level: WARNING
  57. # Whether or not created rooms should have federation enabled.
  58. # If false, created portal rooms will never be federated.
  59. matrix_mautrix_telegram_federate_rooms: true
  60. # Controls whether the matrix-mautrix-telegram container exposes its HTTP port (tcp/8080 in the container).
  61. #
  62. # Takes an "<ip>:<port>" or "<port>" value (e.g. "127.0.0.1:9006"), or empty string to not expose.
  63. matrix_mautrix_telegram_container_http_host_bind_port: ''
  64. matrix_mautrix_telegram_container_network: ""
  65. matrix_mautrix_telegram_container_additional_networks: "{{ matrix_mautrix_telegram_container_additional_networks_auto + matrix_mautrix_telegram_container_additional_networks_custom }}"
  66. matrix_mautrix_telegram_container_additional_networks_auto: []
  67. matrix_mautrix_telegram_container_additional_networks_custom: []
  68. # matrix_mautrix_telegram_container_labels_traefik_enabled controls whether labels to assist a Traefik reverse-proxy will be attached to the container.
  69. # See `../templates/labels.j2` for details.
  70. #
  71. # To inject your own other container labels, see `matrix_mautrix_telegram_container_labels_additional_labels`.
  72. matrix_mautrix_telegram_container_labels_traefik_enabled: true
  73. matrix_mautrix_telegram_container_labels_traefik_docker_network: "{{ matrix_mautrix_telegram_container_network }}"
  74. matrix_mautrix_telegram_container_labels_traefik_entrypoints: web-secure
  75. matrix_mautrix_telegram_container_labels_traefik_tls_certResolver: default # noqa var-naming
  76. # Controls whether labels will be added that expose mautrix-telegram's public endpoint
  77. matrix_mautrix_telegram_container_labels_public_endpoint_enabled: "{{ matrix_mautrix_telegram_appservice_public_enabled }}"
  78. matrix_mautrix_telegram_container_labels_public_endpoint_hostname: "{{ matrix_mautrix_telegram_hostname }}"
  79. matrix_mautrix_telegram_container_labels_public_endpoint_path_prefix: "{{ matrix_mautrix_telegram_path_prefix }}"
  80. matrix_mautrix_telegram_container_labels_public_endpoint_traefik_rule: "Host(`{{ matrix_mautrix_telegram_container_labels_public_endpoint_hostname }}`) && PathPrefix(`{{ matrix_mautrix_telegram_container_labels_public_endpoint_path_prefix }}`)"
  81. matrix_mautrix_telegram_container_labels_public_endpoint_traefik_priority: 0
  82. matrix_mautrix_telegram_container_labels_public_endpoint_traefik_entrypoints: "{{ matrix_mautrix_telegram_container_labels_traefik_entrypoints }}"
  83. matrix_mautrix_telegram_container_labels_public_endpoint_traefik_tls: "{{ matrix_mautrix_telegram_container_labels_public_endpoint_traefik_entrypoints != 'web' }}"
  84. matrix_mautrix_telegram_container_labels_public_endpoint_traefik_tls_certResolver: "{{ matrix_mautrix_telegram_container_labels_traefik_tls_certResolver }}" # noqa var-naming
  85. # Controls whether labels will be added that expose mautrix-telegram's metrics
  86. matrix_mautrix_telegram_container_labels_metrics_enabled: "{{ matrix_mautrix_telegram_metrics_enabled and matrix_mautrix_telegram_metrics_proxying_enabled }}"
  87. matrix_mautrix_telegram_container_labels_metrics_traefik_rule: "Host(`{{ matrix_mautrix_telegram_metrics_proxying_hostname }}`) && PathPrefix(`{{ matrix_mautrix_telegram_metrics_proxying_path_prefix }}`)"
  88. matrix_mautrix_telegram_container_labels_metrics_traefik_priority: 0
  89. matrix_mautrix_telegram_container_labels_metrics_traefik_entrypoints: "{{ matrix_mautrix_telegram_container_labels_traefik_entrypoints }}"
  90. matrix_mautrix_telegram_container_labels_metrics_traefik_tls: "{{ matrix_mautrix_telegram_container_labels_metrics_traefik_entrypoints != 'web' }}"
  91. matrix_mautrix_telegram_container_labels_metrics_traefik_tls_certResolver: "{{ matrix_mautrix_telegram_container_labels_traefik_tls_certResolver }}" # noqa var-naming
  92. matrix_mautrix_telegram_container_labels_metrics_middleware_basic_auth_enabled: false
  93. # See: https://doc.traefik.io/traefik/middlewares/http/basicauth/#users
  94. matrix_mautrix_telegram_container_labels_metrics_middleware_basic_auth_users: ''
  95. # matrix_mautrix_telegram_container_labels_additional_labels contains a multiline string with additional labels to add to the container label file.
  96. # See `../templates/labels.j2` for details.
  97. #
  98. # Example:
  99. # matrix_mautrix_telegram_container_labels_additional_labels: |
  100. # my.label=1
  101. # another.label="here"
  102. matrix_mautrix_telegram_container_labels_additional_labels: ''
  103. # A list of extra arguments to pass to the container
  104. matrix_mautrix_telegram_container_extra_arguments: []
  105. # List of systemd services that matrix-mautrix-telegram.service depends on.
  106. 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 }}"
  107. matrix_mautrix_telegram_systemd_required_services_list_default: "{{ [devture_systemd_docker_base_docker_service_name] if devture_systemd_docker_base_docker_service_name else [] }}"
  108. matrix_mautrix_telegram_systemd_required_services_list_auto: []
  109. matrix_mautrix_telegram_systemd_required_services_list_custom: []
  110. # List of systemd services that matrix-mautrix-telegram.service wants
  111. matrix_mautrix_telegram_systemd_wanted_services_list: []
  112. matrix_mautrix_telegram_appservice_token: ''
  113. matrix_mautrix_telegram_homeserver_token: ''
  114. matrix_mautrix_telegram_provisioning_shared_secret: disable
  115. # Whether or not metrics endpoint should be enabled.
  116. # Enabling them is usually enough for a local (in-container) Prometheus to consume them.
  117. # If metrics need to be consumed by another (external) Prometheus server, consider exposing them via `matrix_mautrix_telegram_metrics_proxying_enabled`.
  118. matrix_mautrix_telegram_metrics_enabled: false
  119. # Controls whether metrics should be exposed on a public URL.
  120. matrix_mautrix_telegram_metrics_proxying_enabled: false
  121. matrix_mautrix_telegram_metrics_proxying_hostname: ''
  122. matrix_mautrix_telegram_metrics_proxying_path_prefix: ''
  123. # Database-related configuration fields.
  124. #
  125. # To use SQLite, stick to these defaults.
  126. #
  127. # To use Postgres:
  128. # - change the engine (`matrix_mautrix_telegram_database_engine: 'postgres'`)
  129. # - adjust your database credentials via the `matrix_mautrix_telegram_database_*` variables
  130. matrix_mautrix_telegram_database_engine: 'sqlite'
  131. matrix_mautrix_telegram_sqlite_database_path_local: "{{ matrix_mautrix_telegram_data_path }}/mautrix-telegram.db"
  132. matrix_mautrix_telegram_sqlite_database_path_in_container: "/data/mautrix-telegram.db"
  133. matrix_mautrix_telegram_database_username: 'matrix_mautrix_telegram'
  134. matrix_mautrix_telegram_database_password: 'some-password'
  135. matrix_mautrix_telegram_database_hostname: ''
  136. matrix_mautrix_telegram_database_port: 5432
  137. matrix_mautrix_telegram_database_name: 'matrix_mautrix_telegram'
  138. matrix_mautrix_telegram_database_connection_string: 'postgres://{{ 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 }}'
  139. matrix_mautrix_telegram_appservice_database: "{{
  140. {
  141. 'sqlite': ('sqlite:///' + matrix_mautrix_telegram_sqlite_database_path_in_container),
  142. 'postgres': matrix_mautrix_telegram_database_connection_string,
  143. }[matrix_mautrix_telegram_database_engine]
  144. }}"
  145. matrix_mautrix_telegram_bridge_login_shared_secret_map: "{{ matrix_mautrix_telegram_bridge_login_shared_secret_map_auto | combine(matrix_mautrix_telegram_bridge_login_shared_secret_map_custom) }}"
  146. matrix_mautrix_telegram_bridge_login_shared_secret_map_auto: {}
  147. matrix_mautrix_telegram_bridge_login_shared_secret_map_custom: {}
  148. # Default configuration template which covers the generic use case.
  149. # You can customize it by controlling the various variables inside it.
  150. #
  151. # For a more advanced customization, you can extend the default (see `matrix_mautrix_telegram_configuration_extension_yaml`)
  152. # or completely replace this variable with your own template.
  153. matrix_mautrix_telegram_configuration_yaml: "{{ lookup('template', 'templates/config.yaml.j2') }}"
  154. matrix_mautrix_telegram_configuration_extension_yaml: |
  155. # Your custom YAML configuration goes here.
  156. # This configuration extends the default starting configuration (`matrix_mautrix_telegram_configuration_yaml`).
  157. #
  158. # You can override individual variables from the default configuration, or introduce new ones.
  159. #
  160. # If you need something more special, you can take full control by
  161. # completely redefining `matrix_mautrix_telegram_configuration_yaml`.
  162. 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 {} }}"
  163. # Holds the final configuration (a combination of the default and its extension).
  164. # You most likely don't need to touch this variable. Instead, see `matrix_mautrix_telegram_configuration_yaml`.
  165. matrix_mautrix_telegram_configuration: "{{ matrix_mautrix_telegram_configuration_yaml | from_yaml | combine(matrix_mautrix_telegram_configuration_extension, recursive=True) }}"
  166. matrix_mautrix_telegram_registration_yaml: |
  167. id: telegram
  168. as_token: "{{ matrix_mautrix_telegram_appservice_token }}"
  169. hs_token: "{{ matrix_mautrix_telegram_homeserver_token }}"
  170. namespaces:
  171. users:
  172. - exclusive: true
  173. regex: '^@telegram_.+:{{ matrix_mautrix_telegram_homeserver_domain | regex_escape }}$'
  174. - exclusive: true
  175. regex: '^@{{ matrix_mautrix_telegram_appservice_bot_username | regex_escape }}:{{ matrix_mautrix_telegram_homeserver_domain | regex_escape }}$'
  176. aliases:
  177. - exclusive: true
  178. regex: '^#telegram_.+:{{ matrix_mautrix_telegram_homeserver_domain | regex_escape }}$'
  179. # See https://github.com/mautrix/signal/issues/43
  180. sender_localpart: _bot_{{ matrix_mautrix_telegram_appservice_bot_username }}
  181. url: {{ matrix_mautrix_telegram_appservice_address }}
  182. rate_limited: false
  183. de.sorunome.msc2409.push_ephemeral: true
  184. matrix_mautrix_telegram_registration: "{{ matrix_mautrix_telegram_registration_yaml | from_yaml }}"
  185. # Templates for defining MXID's and displaynames for users and rooms.
  186. matrix_mautrix_telegram_username_template: 'telegram_{userid}'
  187. matrix_mautrix_telegram_alias_template: 'telegram_{groupname}'
  188. matrix_mautrix_telegram_displayname_template: '{displayname} (Telegram)'
  189. # Enable End-to-bridge encryption
  190. matrix_mautrix_telegram_bridge_encryption_allow: "{{ matrix_bridges_encryption_enabled }}"
  191. matrix_mautrix_telegram_bridge_encryption_default: "{{ matrix_bridges_encryption_default }}"
  192. matrix_mautrix_telegram_bridge_encryption_key_sharing_allow: "{{ matrix_mautrix_telegram_bridge_encryption_allow }}"