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.
 
 

216 lines
13 KiB

  1. # SPDX-FileCopyrightText: 2021 - 2024 MDAD project contributors
  2. # SPDX-FileCopyrightText: 2021 Aaron Raimist
  3. # SPDX-FileCopyrightText: 2022 - 2023 Nikita Chernyi
  4. # SPDX-FileCopyrightText: 2022 - 2025 Slavi Pantaleev
  5. # SPDX-FileCopyrightText: 2022 László Várady
  6. # SPDX-FileCopyrightText: 2022 Marko Weltzer
  7. # SPDX-FileCopyrightText: 2022 Ruben Hias
  8. # SPDX-FileCopyrightText: 2023 Samuel Meenzen
  9. #
  10. # SPDX-License-Identifier: AGPL-3.0-or-later
  11. ---
  12. # mautrix-googlechat is a Matrix <-> googlechat bridge
  13. # Project source code URL: https://github.com/mautrix/googlechat
  14. matrix_mautrix_googlechat_enabled: true
  15. matrix_mautrix_googlechat_container_image_self_build: false
  16. matrix_mautrix_googlechat_container_image_self_build_repo: "https://github.com/mautrix/googlechat.git"
  17. matrix_mautrix_googlechat_container_image_self_build_repo_version: "{{ 'master' if matrix_mautrix_googlechat_version == 'latest' else matrix_mautrix_googlechat_version }}"
  18. # renovate: datasource=docker depName=dock.mau.dev/mautrix/googlechat
  19. matrix_mautrix_googlechat_version: v0.5.2
  20. # See: https://mau.dev/mautrix/googlechat/container_registry
  21. matrix_mautrix_googlechat_container_image: "{{ matrix_mautrix_googlechat_container_image_registry_prefix }}mautrix/googlechat:{{ matrix_mautrix_googlechat_version }}"
  22. matrix_mautrix_googlechat_container_image_registry_prefix: "{{ 'localhost/' if matrix_mautrix_googlechat_container_image_self_build else matrix_mautrix_googlechat_container_image_registry_prefix_upstream }}"
  23. matrix_mautrix_googlechat_container_image_registry_prefix_upstream: "{{ matrix_mautrix_googlechat_container_image_registry_prefix_upstream_default }}"
  24. matrix_mautrix_googlechat_container_image_registry_prefix_upstream_default: "dock.mau.dev/"
  25. matrix_mautrix_googlechat_base_path: "{{ matrix_base_data_path }}/mautrix-googlechat"
  26. matrix_mautrix_googlechat_config_path: "{{ matrix_mautrix_googlechat_base_path }}/config"
  27. matrix_mautrix_googlechat_data_path: "{{ matrix_mautrix_googlechat_base_path }}/data"
  28. matrix_mautrix_googlechat_container_src_files_path: "{{ matrix_mautrix_googlechat_base_path }}/docker-src"
  29. matrix_mautrix_googlechat_public_endpoint: '/mautrix-googlechat'
  30. matrix_mautrix_googlechat_homeserver_address: ""
  31. matrix_mautrix_googlechat_homeserver_domain: '{{ matrix_domain }}'
  32. matrix_mautrix_googlechat_appservice_address: 'http://matrix-mautrix-googlechat:8080'
  33. matrix_mautrix_googlechat_command_prefix: "!gc"
  34. # Controls whether the matrix-mautrix-googlechat container exposes its HTTP port (tcp/8080 in the container).
  35. #
  36. # Takes an "<ip>:<port>" or "<port>" value (e.g. "127.0.0.1:9007"), or empty string to not expose.
  37. matrix_mautrix_googlechat_container_http_host_bind_port: ''
  38. matrix_mautrix_googlechat_container_network: ""
  39. matrix_mautrix_googlechat_container_additional_networks: "{{ matrix_mautrix_googlechat_container_additional_networks_auto + matrix_mautrix_googlechat_container_additional_networks_custom }}"
  40. matrix_mautrix_googlechat_container_additional_networks_auto: []
  41. matrix_mautrix_googlechat_container_additional_networks_custom: []
  42. # matrix_mautrix_googlechat_container_labels_traefik_enabled controls whether labels to assist a Traefik reverse-proxy will be attached to the container.
  43. # See `../templates/labels.j2` for details.
  44. #
  45. # To inject your own other container labels, see `matrix_mautrix_googlechat_container_labels_additional_labels`.
  46. matrix_mautrix_googlechat_container_labels_traefik_enabled: true
  47. matrix_mautrix_googlechat_container_labels_traefik_docker_network: "{{ matrix_mautrix_googlechat_container_network }}"
  48. matrix_mautrix_googlechat_container_labels_traefik_entrypoints: web-secure
  49. matrix_mautrix_googlechat_container_labels_traefik_tls_certResolver: default # noqa var-naming
  50. # Controls whether labels will be added that expose mautrix-googlechat's public endpoint
  51. matrix_mautrix_googlechat_container_labels_public_endpoint_enabled: true
  52. matrix_mautrix_googlechat_container_labels_public_endpoint_hostname: ""
  53. matrix_mautrix_googlechat_container_labels_public_endpoint_path_prefix: "{{ matrix_mautrix_googlechat_public_endpoint }}"
  54. matrix_mautrix_googlechat_container_labels_public_endpoint_traefik_rule: "Host(`{{ matrix_mautrix_googlechat_container_labels_public_endpoint_hostname }}`) && PathPrefix(`{{ matrix_mautrix_googlechat_container_labels_public_endpoint_path_prefix }}`)"
  55. matrix_mautrix_googlechat_container_labels_public_endpoint_traefik_priority: 0
  56. matrix_mautrix_googlechat_container_labels_public_endpoint_traefik_entrypoints: "{{ matrix_mautrix_googlechat_container_labels_traefik_entrypoints }}"
  57. matrix_mautrix_googlechat_container_labels_public_endpoint_traefik_tls: "{{ matrix_mautrix_googlechat_container_labels_public_endpoint_traefik_entrypoints != 'web' }}"
  58. matrix_mautrix_googlechat_container_labels_public_endpoint_traefik_tls_certResolver: "{{ matrix_mautrix_googlechat_container_labels_traefik_tls_certResolver }}" # noqa var-naming
  59. # Controls whether labels will be added that expose mautrix-googlechat's metrics
  60. matrix_mautrix_googlechat_container_labels_metrics_enabled: "{{ matrix_mautrix_googlechat_metrics_enabled and matrix_mautrix_googlechat_metrics_proxying_enabled }}"
  61. matrix_mautrix_googlechat_container_labels_metrics_traefik_rule: "Host(`{{ matrix_mautrix_googlechat_metrics_proxying_hostname }}`) && PathPrefix(`{{ matrix_mautrix_googlechat_metrics_proxying_path_prefix }}`)"
  62. matrix_mautrix_googlechat_container_labels_metrics_traefik_priority: 0
  63. matrix_mautrix_googlechat_container_labels_metrics_traefik_entrypoints: "{{ matrix_mautrix_googlechat_container_labels_traefik_entrypoints }}"
  64. matrix_mautrix_googlechat_container_labels_metrics_traefik_tls: "{{ matrix_mautrix_googlechat_container_labels_metrics_traefik_entrypoints != 'web' }}"
  65. matrix_mautrix_googlechat_container_labels_metrics_traefik_tls_certResolver: "{{ matrix_mautrix_googlechat_container_labels_traefik_tls_certResolver }}" # noqa var-naming
  66. matrix_mautrix_googlechat_container_labels_metrics_middleware_basic_auth_enabled: false
  67. # See: https://doc.traefik.io/traefik/middlewares/http/basicauth/#users
  68. matrix_mautrix_googlechat_container_labels_metrics_middleware_basic_auth_users: ''
  69. # matrix_mautrix_googlechat_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_googlechat_container_labels_additional_labels: |
  74. # my.label=1
  75. # another.label="here"
  76. matrix_mautrix_googlechat_container_labels_additional_labels: ''
  77. # A list of extra arguments to pass to the container
  78. matrix_mautrix_googlechat_container_extra_arguments: []
  79. # List of systemd services that matrix-mautrix-googlechat.service depends on.
  80. matrix_mautrix_googlechat_systemd_required_services_list: "{{ matrix_mautrix_googlechat_systemd_required_services_list_default + matrix_mautrix_googlechat_systemd_required_services_list_auto + matrix_mautrix_googlechat_systemd_required_services_list_custom }}"
  81. matrix_mautrix_googlechat_systemd_required_services_list_default: "{{ [devture_systemd_docker_base_docker_service_name] if devture_systemd_docker_base_docker_service_name else [] }}"
  82. matrix_mautrix_googlechat_systemd_required_services_list_auto: []
  83. matrix_mautrix_googlechat_systemd_required_services_list_custom: []
  84. # List of systemd services that matrix-mautrix-googlechat.service wants
  85. matrix_mautrix_googlechat_systemd_wanted_services_list: []
  86. matrix_mautrix_googlechat_appservice_token: ''
  87. matrix_mautrix_googlechat_homeserver_token: ''
  88. # Whether or not metrics endpoint should be enabled.
  89. # Enabling them is usually enough for a local (in-container) Prometheus to consume them.
  90. # If metrics need to be consumed by another (external) Prometheus server, consider exposing them via `matrix_mautrix_googlechat_metrics_proxying_enabled`.
  91. matrix_mautrix_googlechat_metrics_enabled: false
  92. # Controls whether metrics should be proxied (exposed) on a public URL.
  93. matrix_mautrix_googlechat_metrics_proxying_enabled: false
  94. matrix_mautrix_googlechat_metrics_proxying_hostname: ''
  95. matrix_mautrix_googlechat_metrics_proxying_path_prefix: ''
  96. # Whether or not created rooms should have federation enabled.
  97. # If false, created portal rooms will never be federated.
  98. matrix_mautrix_googlechat_federate_rooms: true
  99. matrix_mautrix_googlechat_bridge_permissions: |
  100. {{
  101. {matrix_mautrix_googlechat_homeserver_domain: 'user'}
  102. | combine({matrix_admin: 'admin'} if matrix_admin else {})
  103. }}
  104. # Database-related configuration fields.
  105. #
  106. # To use SQLite, stick to these defaults.
  107. #
  108. # To use Postgres:
  109. # - change the engine (`matrix_mautrix_googlechat_database_engine: 'postgres'`)
  110. # - adjust your database credentials via the `matrix_mautrix_googlechat_database_*` variables
  111. matrix_mautrix_googlechat_database_engine: 'sqlite'
  112. matrix_mautrix_googlechat_sqlite_database_path_local: "{{ matrix_mautrix_googlechat_data_path }}/mautrix-googlechat.db"
  113. matrix_mautrix_googlechat_sqlite_database_path_in_container: "/data/mautrix-googlechat.db"
  114. matrix_mautrix_googlechat_database_username: 'matrix_mautrix_googlechat'
  115. matrix_mautrix_googlechat_database_password: 'some-password'
  116. matrix_mautrix_googlechat_database_hostname: ''
  117. matrix_mautrix_googlechat_database_port: 5432
  118. matrix_mautrix_googlechat_database_name: 'matrix_mautrix_googlechat'
  119. matrix_mautrix_googlechat_database_connection_string: 'postgres://{{ matrix_mautrix_googlechat_database_username }}:{{ matrix_mautrix_googlechat_database_password }}@{{ matrix_mautrix_googlechat_database_hostname }}:{{ matrix_mautrix_googlechat_database_port }}/{{ matrix_mautrix_googlechat_database_name }}'
  120. matrix_mautrix_googlechat_appservice_database: "{{ {
  121. 'sqlite': ('sqlite:///' + matrix_mautrix_googlechat_sqlite_database_path_in_container),
  122. 'postgres': matrix_mautrix_googlechat_database_connection_string,
  123. }[matrix_mautrix_googlechat_database_engine] }}"
  124. # Can be set to enable automatic double-puppeting via Shared Secret Auth (https://github.com/devture/matrix-synapse-shared-secret-auth) or Appservice Double Puppet.
  125. matrix_mautrix_googlechat_login_shared_secret: ''
  126. matrix_mautrix_googlechat_appservice_bot_username: googlechatbot
  127. # Specifies the default log level for all bridge loggers.
  128. matrix_mautrix_googlechat_logging_level: WARNING
  129. # Default configuration template which covers the generic use case.
  130. # You can customize it by controlling the various variables inside it.
  131. #
  132. # For a more advanced customization, you can extend the default (see `matrix_mautrix_googlechat_configuration_extension_yaml`)
  133. # or completely replace this variable with your own template.
  134. matrix_mautrix_googlechat_configuration_yaml: "{{ lookup('template', 'templates/config.yaml.j2') }}"
  135. matrix_mautrix_googlechat_configuration_extension_yaml: |
  136. # Your custom YAML configuration goes here.
  137. # This configuration extends the default starting configuration (`matrix_mautrix_googlechat_configuration_yaml`).
  138. #
  139. # You can override individual variables from the default configuration, or introduce new ones.
  140. #
  141. # If you need something more special, you can take full control by
  142. # completely redefining `matrix_mautrix_googlechat_configuration_yaml`.
  143. matrix_mautrix_googlechat_configuration_extension: "{{ matrix_mautrix_googlechat_configuration_extension_yaml | from_yaml if matrix_mautrix_googlechat_configuration_extension_yaml | from_yaml is mapping else {} }}"
  144. # Holds the final configuration (a combination of the default and its extension).
  145. # You most likely don't need to touch this variable. Instead, see `matrix_mautrix_googlechat_configuration_yaml`.
  146. matrix_mautrix_googlechat_configuration: "{{ matrix_mautrix_googlechat_configuration_yaml | from_yaml | combine(matrix_mautrix_googlechat_configuration_extension, recursive=True) }}"
  147. matrix_mautrix_googlechat_registration_yaml: |
  148. id: googlechat
  149. as_token: "{{ matrix_mautrix_googlechat_appservice_token }}"
  150. hs_token: "{{ matrix_mautrix_googlechat_homeserver_token }}"
  151. namespaces:
  152. users:
  153. - exclusive: true
  154. regex: '^@googlechat_.+:{{ matrix_mautrix_googlechat_homeserver_domain | regex_escape }}$'
  155. - exclusive: true
  156. regex: '^@{{ matrix_mautrix_googlechat_appservice_bot_username | regex_escape }}:{{ matrix_mautrix_googlechat_homeserver_domain | regex_escape }}$'
  157. url: {{ matrix_mautrix_googlechat_appservice_address }}
  158. # See https://github.com/mautrix/signal/issues/43
  159. sender_localpart: _bot_{{ matrix_mautrix_googlechat_appservice_bot_username }}
  160. rate_limited: false
  161. de.sorunome.msc2409.push_ephemeral: true
  162. receive_ephemeral: true
  163. matrix_mautrix_googlechat_registration: "{{ matrix_mautrix_googlechat_registration_yaml | from_yaml }}"
  164. # Enable End-to-bridge encryption
  165. matrix_mautrix_googlechat_bridge_encryption_allow: "{{ matrix_bridges_encryption_enabled }}"
  166. matrix_mautrix_googlechat_bridge_encryption_default: "{{ matrix_bridges_encryption_default }}"
  167. # matrix_mautrix_googlechat_restart_necessary controls whether the service
  168. # will be restarted (when true) or merely started (when false) by the
  169. # systemd service manager role (when conditional restart is enabled).
  170. #
  171. # This value is automatically computed during installation based on whether
  172. # any configuration files, the systemd service file, or the container image changed.
  173. # The default of `false` means "no restart needed" — appropriate when the role's
  174. # installation tasks haven't run (e.g., due to --tags skipping them).
  175. matrix_mautrix_googlechat_restart_necessary: false