Matrix Docker Ansible eploy
No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.
 
 

234 líneas
13 KiB

  1. # SPDX-FileCopyrightText: 2019 - 2025 Slavi Pantaleev
  2. # SPDX-FileCopyrightText: 2019 Julian Foad
  3. # SPDX-FileCopyrightText: 2019 Thomas Kuehne
  4. # SPDX-FileCopyrightText: 2021 - 2024 MDAD project contributors
  5. # SPDX-FileCopyrightText: 2021 Sebastian Gumprich
  6. # SPDX-FileCopyrightText: 2022 - 2024 Nikita Chernyi
  7. # SPDX-FileCopyrightText: 2022 Arthur Brugière
  8. # SPDX-FileCopyrightText: 2022 László Várady
  9. # SPDX-FileCopyrightText: 2022 Marko Weltzer
  10. # SPDX-FileCopyrightText: 2022 Petteri Pucilowski
  11. # SPDX-FileCopyrightText: 2023 Adrien le Maire
  12. # SPDX-FileCopyrightText: 2023 James Collier
  13. # SPDX-FileCopyrightText: 2023 Samuel Meenzen
  14. # SPDX-FileCopyrightText: 2023 Shreyas Ajjarapu
  15. # SPDX-FileCopyrightText: 2024 Nikolai Raitsev
  16. # SPDX-FileCopyrightText: 2025 Suguru Hirahara
  17. #
  18. # SPDX-License-Identifier: AGPL-3.0-or-later
  19. ---
  20. # mautrix-whatsapp is a Matrix <-> Whatsapp bridge
  21. # Project source code URL: https://github.com/mautrix/whatsapp
  22. matrix_mautrix_whatsapp_enabled: true
  23. matrix_mautrix_whatsapp_container_image_self_build: false
  24. matrix_mautrix_whatsapp_container_image_self_build_repo: "https://mau.dev/mautrix/whatsapp.git"
  25. matrix_mautrix_whatsapp_container_image_self_build_branch: "{{ 'master' if matrix_mautrix_whatsapp_version == 'latest' else matrix_mautrix_whatsapp_version }}"
  26. # renovate: datasource=docker depName=dock.mau.dev/mautrix/whatsapp
  27. matrix_mautrix_whatsapp_version: v0.11.4
  28. # See: https://mau.dev/mautrix/whatsapp/container_registry
  29. matrix_mautrix_whatsapp_docker_image: "{{ matrix_mautrix_whatsapp_docker_image_registry_prefix }}mautrix/whatsapp:{{ matrix_mautrix_whatsapp_version }}"
  30. matrix_mautrix_whatsapp_docker_image_registry_prefix: "{{ 'localhost/' if matrix_mautrix_whatsapp_container_image_self_build else matrix_mautrix_whatsapp_docker_image_registry_prefix_upstream }}"
  31. matrix_mautrix_whatsapp_docker_image_registry_prefix_upstream: "{{ matrix_mautrix_whatsapp_docker_image_registry_prefix_upstream_default }}"
  32. matrix_mautrix_whatsapp_docker_image_registry_prefix_upstream_default: "dock.mau.dev/"
  33. matrix_mautrix_whatsapp_docker_image_force_pull: "{{ matrix_mautrix_whatsapp_docker_image.endswith(':latest') }}"
  34. matrix_mautrix_whatsapp_base_path: "{{ matrix_base_data_path }}/mautrix-whatsapp"
  35. matrix_mautrix_whatsapp_config_path: "{{ matrix_mautrix_whatsapp_base_path }}/config"
  36. matrix_mautrix_whatsapp_data_path: "{{ matrix_mautrix_whatsapp_base_path }}/data"
  37. matrix_mautrix_whatsapp_docker_src_files_path: "{{ matrix_mautrix_whatsapp_base_path }}/docker-src"
  38. matrix_mautrix_whatsapp_homeserver_address: ""
  39. matrix_mautrix_whatsapp_homeserver_domain: "{{ matrix_domain }}"
  40. matrix_mautrix_whatsapp_appservice_address: "http://matrix-mautrix-whatsapp:8080"
  41. matrix_mautrix_whatsapp_extev_polls: false
  42. matrix_mautrix_whatsapp_command_prefix: "!wa"
  43. matrix_mautrix_whatsapp_container_network: ""
  44. matrix_mautrix_whatsapp_container_additional_networks: "{{ matrix_mautrix_whatsapp_container_additional_networks_auto + matrix_mautrix_whatsapp_container_additional_networks_custom }}"
  45. matrix_mautrix_whatsapp_container_additional_networks_auto: []
  46. matrix_mautrix_whatsapp_container_additional_networks_custom: []
  47. # matrix_mautrix_whatsapp_container_labels_traefik_enabled controls whether labels to assist a Traefik reverse-proxy will be attached to the container.
  48. # See `../templates/labels.j2` for details.
  49. #
  50. # To inject your own other container labels, see `matrix_mautrix_whatsapp_container_labels_additional_labels`.
  51. matrix_mautrix_whatsapp_container_labels_traefik_enabled: true
  52. matrix_mautrix_whatsapp_container_labels_traefik_docker_network: "{{ matrix_mautrix_whatsapp_container_network }}"
  53. matrix_mautrix_whatsapp_container_labels_traefik_entrypoints: web-secure
  54. matrix_mautrix_whatsapp_container_labels_traefik_tls_certResolver: default # noqa var-naming
  55. # Controls whether labels will be added that expose mautrix-whatsapp's metrics
  56. matrix_mautrix_whatsapp_container_labels_metrics_enabled: "{{ matrix_mautrix_whatsapp_metrics_enabled and matrix_mautrix_whatsapp_metrics_proxying_enabled }}"
  57. matrix_mautrix_whatsapp_container_labels_metrics_traefik_rule: "Host(`{{ matrix_mautrix_whatsapp_metrics_proxying_hostname }}`) && PathPrefix(`{{ matrix_mautrix_whatsapp_metrics_proxying_path_prefix }}`)"
  58. matrix_mautrix_whatsapp_container_labels_metrics_traefik_priority: 0
  59. matrix_mautrix_whatsapp_container_labels_metrics_traefik_entrypoints: "{{ matrix_mautrix_whatsapp_container_labels_traefik_entrypoints }}"
  60. matrix_mautrix_whatsapp_container_labels_metrics_traefik_tls: "{{ matrix_mautrix_whatsapp_container_labels_metrics_traefik_entrypoints != 'web' }}"
  61. matrix_mautrix_whatsapp_container_labels_metrics_traefik_tls_certResolver: "{{ matrix_mautrix_whatsapp_container_labels_traefik_tls_certResolver }}" # noqa var-naming
  62. matrix_mautrix_whatsapp_container_labels_metrics_middleware_basic_auth_enabled: false
  63. # See: https://doc.traefik.io/traefik/middlewares/http/basicauth/#users
  64. matrix_mautrix_whatsapp_container_labels_metrics_middleware_basic_auth_users: ''
  65. # matrix_mautrix_whatsapp_container_labels_additional_labels contains a multiline string with additional labels to add to the container label file.
  66. # See `../templates/labels.j2` for details.
  67. #
  68. # Example:
  69. # matrix_mautrix_whatsapp_container_labels_additional_labels: |
  70. # my.label=1
  71. # another.label="here"
  72. matrix_mautrix_whatsapp_container_labels_additional_labels: ''
  73. # A list of extra arguments to pass to the container
  74. matrix_mautrix_whatsapp_container_extra_arguments: []
  75. # List of systemd services that matrix-mautrix-whatsapp.service depends on.
  76. matrix_mautrix_whatsapp_systemd_required_services_list: "{{ matrix_mautrix_whatsapp_systemd_required_services_list_default + matrix_mautrix_whatsapp_systemd_required_services_list_auto + matrix_mautrix_whatsapp_systemd_required_services_list_custom }}"
  77. matrix_mautrix_whatsapp_systemd_required_services_list_default: "{{ [devture_systemd_docker_base_docker_service_name] if devture_systemd_docker_base_docker_service_name else [] }}"
  78. matrix_mautrix_whatsapp_systemd_required_services_list_auto: []
  79. matrix_mautrix_whatsapp_systemd_required_services_list_custom: []
  80. # List of systemd services that matrix-mautrix-whatsapp.service wants
  81. matrix_mautrix_whatsapp_systemd_wanted_services_list: []
  82. matrix_mautrix_whatsapp_appservice_token: ''
  83. matrix_mautrix_whatsapp_homeserver_token: ''
  84. matrix_mautrix_whatsapp_appservice_bot_username: whatsappbot
  85. # Minimum severity of journal log messages.
  86. # Valid values: fatal, error, warn, info, debug, trace
  87. matrix_mautrix_whatsapp_logging_level: 'warn'
  88. # Whether or not created rooms should have federation enabled.
  89. # If false, created portal rooms will never be federated.
  90. matrix_mautrix_whatsapp_federate_rooms: true
  91. # Whether or not metrics endpoint should be enabled.
  92. # Enabling them is usually enough for a local (in-container) Prometheus to consume them.
  93. # If metrics need to be consumed by another (external) Prometheus server, consider exposing them via `matrix_mautrix_whatsapp_metrics_proxying_enabled`.
  94. matrix_mautrix_whatsapp_metrics_enabled: false
  95. # Controls whether metrics should be proxied (exposed) on a public URL
  96. matrix_mautrix_whatsapp_metrics_proxying_enabled: false
  97. matrix_mautrix_whatsapp_metrics_proxying_hostname: ''
  98. matrix_mautrix_whatsapp_metrics_proxying_path_prefix: ''
  99. # Database-related configuration fields.
  100. #
  101. # To use SQLite, stick to these defaults.
  102. #
  103. # To use Postgres:
  104. # - change the engine (`matrix_mautrix_whatsapp_database_engine: 'postgres'`)
  105. # - adjust your database credentials via the `matrix_mautrix_whatsapp_database_*` variables
  106. matrix_mautrix_whatsapp_database_engine: 'sqlite'
  107. matrix_mautrix_whatsapp_sqlite_database_path_local: "{{ matrix_mautrix_whatsapp_data_path }}/mautrix-whatsapp.db"
  108. matrix_mautrix_whatsapp_sqlite_database_path_in_container: "/data/mautrix-whatsapp.db"
  109. matrix_mautrix_whatsapp_database_username: 'matrix_mautrix_whatsapp'
  110. matrix_mautrix_whatsapp_database_password: 'some-password'
  111. matrix_mautrix_whatsapp_database_hostname: ''
  112. matrix_mautrix_whatsapp_database_port: 5432
  113. matrix_mautrix_whatsapp_database_name: 'matrix_mautrix_whatsapp'
  114. matrix_mautrix_whatsapp_database_sslmode: disable
  115. matrix_mautrix_whatsapp_database_connection_string: 'postgresql://{{ matrix_mautrix_whatsapp_database_username }}:{{ matrix_mautrix_whatsapp_database_password }}@{{ matrix_mautrix_whatsapp_database_hostname }}:{{ matrix_mautrix_whatsapp_database_port }}/{{ matrix_mautrix_whatsapp_database_name }}?sslmode={{ matrix_mautrix_whatsapp_database_sslmode }}'
  116. matrix_mautrix_whatsapp_appservice_database_type: "{{
  117. {
  118. 'sqlite': 'sqlite3-fk-wal',
  119. 'postgres':'postgres',
  120. }[matrix_mautrix_whatsapp_database_engine]
  121. }}"
  122. matrix_mautrix_whatsapp_appservice_database_uri: "{{
  123. {
  124. 'sqlite': matrix_mautrix_whatsapp_sqlite_database_path_in_container,
  125. 'postgres': matrix_mautrix_whatsapp_database_connection_string,
  126. }[matrix_mautrix_whatsapp_database_engine]
  127. }}"
  128. matrix_mautrix_whatsapp_double_puppet_secrets: "{{ matrix_mautrix_whatsapp_double_puppet_secrets_auto | combine(matrix_mautrix_whatsapp_double_puppet_secrets_custom) }}"
  129. matrix_mautrix_whatsapp_double_puppet_secrets_auto: {}
  130. matrix_mautrix_whatsapp_double_puppet_secrets_custom: {}
  131. # Enable End-to-bridge encryption
  132. matrix_mautrix_whatsapp_bridge_encryption_allow: "{{ matrix_bridges_encryption_enabled }}"
  133. matrix_mautrix_whatsapp_bridge_encryption_default: "{{ matrix_bridges_encryption_default }}"
  134. matrix_mautrix_whatsapp_bridge_encryption_require: false
  135. matrix_mautrix_whatsapp_bridge_encryption_key_sharing_allow: "{{ matrix_mautrix_whatsapp_bridge_encryption_allow }}"
  136. # This pickle key value is backward-compatible with the old bridge.
  137. # See: https://github.com/mautrix/whatsapp/blob/v0.11.0/cmd/mautrix-whatsapp/legacymigrate.go#L44
  138. matrix_mautrix_whatsapp_bridge_encryption_pickle_key: maunium.net/go/mautrix-whatsapp
  139. matrix_mautrix_whatsapp_bridge_personal_filtering_spaces: true
  140. matrix_mautrix_whatsapp_bridge_enable_status_broadcast: true
  141. matrix_mautrix_whatsapp_provisioning_shared_secret: ''
  142. matrix_mautrix_whatsapp_public_media_signing_key: ''
  143. matrix_mautrix_whatsapp_bridge_permissions: |
  144. {{
  145. {'*': 'relay', matrix_mautrix_whatsapp_homeserver_domain: 'user'}
  146. | combine({matrix_admin: 'admin'} if matrix_admin else {})
  147. }}
  148. # Enable bridge relay functionality
  149. matrix_mautrix_whatsapp_bridge_relay_enabled: "{{ matrix_bridges_relay_enabled }}"
  150. # Only allow admins on this home server to set themselves as a relay user
  151. matrix_mautrix_whatsapp_bridge_relay_admin_only: true
  152. # List of user login IDs which anyone can set as a relay, as long as the relay user is in the room.
  153. matrix_mautrix_whatsapp_bridge_relay_default_relays: []
  154. # Controls whether to do backfilling at all.
  155. matrix_mautrix_whatsapp_backfill_enabled: true
  156. # Default mautrix-whatsapp configuration template which covers the generic use case.
  157. # You can customize it by controlling the various variables inside it.
  158. #
  159. # For a more advanced customization, you can extend the default (see `matrix_mautrix_whatsapp_configuration_extension_yaml`)
  160. # or completely replace this variable with your own template.
  161. matrix_mautrix_whatsapp_configuration_yaml: "{{ lookup('template', 'templates/config.yaml.j2') }}"
  162. matrix_mautrix_whatsapp_configuration_extension_yaml: |
  163. # Your custom YAML configuration goes here.
  164. # This configuration extends the default starting configuration (`matrix_mautrix_whatsapp_configuration_yaml`).
  165. #
  166. # You can override individual variables from the default configuration, or introduce new ones.
  167. #
  168. # If you need something more special, you can take full control by
  169. # completely redefining `matrix_mautrix_whatsapp_configuration_yaml`.
  170. matrix_mautrix_whatsapp_configuration_extension: "{{ matrix_mautrix_whatsapp_configuration_extension_yaml | from_yaml if matrix_mautrix_whatsapp_configuration_extension_yaml | from_yaml is mapping else {} }}"
  171. # Holds the final configuration (a combination of the default and its extension).
  172. # You most likely don't need to touch this variable. Instead, see `matrix_mautrix_whatsapp_configuration_yaml`.
  173. matrix_mautrix_whatsapp_configuration: "{{ matrix_mautrix_whatsapp_configuration_yaml | from_yaml | combine(matrix_mautrix_whatsapp_configuration_extension, recursive=True) }}"
  174. matrix_mautrix_whatsapp_registration_yaml: |
  175. id: whatsapp
  176. url: {{ matrix_mautrix_whatsapp_appservice_address }}
  177. as_token: "{{ matrix_mautrix_whatsapp_appservice_token }}"
  178. hs_token: "{{ matrix_mautrix_whatsapp_homeserver_token }}"
  179. # See https://github.com/mautrix/signal/issues/43
  180. sender_localpart: _bot_{{ matrix_mautrix_whatsapp_appservice_bot_username }}
  181. rate_limited: false
  182. namespaces:
  183. users:
  184. - regex: '^@whatsapp_[0-9]+:{{ matrix_mautrix_whatsapp_homeserver_domain | regex_escape }}$'
  185. exclusive: true
  186. - exclusive: true
  187. regex: '^@{{ matrix_mautrix_whatsapp_appservice_bot_username | regex_escape }}:{{ matrix_mautrix_whatsapp_homeserver_domain | regex_escape }}$'
  188. de.sorunome.msc2409.push_ephemeral: true
  189. matrix_mautrix_whatsapp_registration: "{{ matrix_mautrix_whatsapp_registration_yaml | from_yaml }}"