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.
 
 

228 line
14 KiB

  1. # SPDX-FileCopyrightText: 2019 - 2024 Slavi Pantaleev
  2. # SPDX-FileCopyrightText: 2020 Horvath Gergely
  3. # SPDX-FileCopyrightText: 2020 Marcel Partap
  4. # SPDX-FileCopyrightText: 2021 - 2024 MDAD project contributors
  5. # SPDX-FileCopyrightText: 2021 Aaron Raimist
  6. # SPDX-FileCopyrightText: 2021 Arthur Brugière
  7. # SPDX-FileCopyrightText: 2022 - 2023 Nikita Chernyi
  8. # SPDX-FileCopyrightText: 2022 László Várady
  9. # SPDX-FileCopyrightText: 2022 Marko Weltzer
  10. # SPDX-FileCopyrightText: 2023 Adrien le Maire
  11. # SPDX-FileCopyrightText: 2023 Samuel Meenzen
  12. #
  13. # SPDX-License-Identifier: AGPL-3.0-or-later
  14. ---
  15. # mautrix-facebook is a Matrix <-> Facebook bridge
  16. # Project source code URL: https://github.com/mautrix/facebook
  17. matrix_mautrix_facebook_enabled: true
  18. matrix_mautrix_facebook_container_image_self_build: false
  19. matrix_mautrix_facebook_container_image_self_build_repo: "https://mau.dev/mautrix/facebook.git"
  20. # renovate: datasource=docker depName=dock.mau.dev/mautrix/facebook
  21. matrix_mautrix_facebook_version: v0.5.1
  22. matrix_mautrix_facebook_docker_image: "{{ matrix_mautrix_facebook_docker_image_registry_prefix }}mautrix/facebook:{{ matrix_mautrix_facebook_version }}"
  23. matrix_mautrix_facebook_docker_image_registry_prefix: "{{ 'localhost/' if matrix_mautrix_facebook_container_image_self_build else matrix_mautrix_facebook_docker_image_registry_prefix_upstream }}"
  24. matrix_mautrix_facebook_docker_image_registry_prefix_upstream: "{{ matrix_mautrix_facebook_docker_image_registry_prefix_upstream_default }}"
  25. matrix_mautrix_facebook_docker_image_registry_prefix_upstream_default: "dock.mau.dev/"
  26. matrix_mautrix_facebook_docker_image_force_pull: "{{ matrix_mautrix_facebook_docker_image.endswith(':latest') }}"
  27. matrix_mautrix_facebook_base_path: "{{ matrix_base_data_path }}/mautrix-facebook"
  28. matrix_mautrix_facebook_config_path: "{{ matrix_mautrix_facebook_base_path }}/config"
  29. matrix_mautrix_facebook_data_path: "{{ matrix_mautrix_facebook_base_path }}/data"
  30. matrix_mautrix_facebook_docker_src_files_path: "{{ matrix_mautrix_facebook_base_path }}/docker-src"
  31. matrix_mautrix_facebook_command_prefix: "!fb"
  32. matrix_mautrix_facebook_homeserver_address: ""
  33. # Whether asynchronous uploads via MSC2246 should be enabled for media.
  34. # Requires a homeserver that supports MSC2246 (https://github.com/matrix-org/matrix-spec-proposals/pull/2246).
  35. matrix_mautrix_facebook_homeserver_async_media: false
  36. matrix_mautrix_facebook_homeserver_domain: '{{ matrix_domain }}'
  37. # Whether or not the public-facing endpoints should be enabled (web-based login)
  38. matrix_mautrix_facebook_appservice_public_enabled: false
  39. # Mautrix Facebook public endpoint to log in to Facebook
  40. matrix_mautrix_facebook_appservice_public_prefix: ''
  41. matrix_mautrix_facebook_appservice_public_hostname: ''
  42. matrix_mautrix_facebook_appservice_public_external: "{{ ('https://' + matrix_mautrix_facebook_appservice_public_hostname + matrix_mautrix_facebook_appservice_public_prefix) if matrix_mautrix_facebook_appservice_public_enabled else '' }}"
  43. matrix_mautrix_facebook_appservice_address: 'http://matrix-mautrix-facebook:29319'
  44. matrix_mautrix_facebook_container_network: ""
  45. matrix_mautrix_facebook_container_additional_networks: "{{ matrix_mautrix_facebook_container_additional_networks_auto + matrix_mautrix_facebook_container_additional_networks_custom }}"
  46. matrix_mautrix_facebook_container_additional_networks_auto: []
  47. matrix_mautrix_facebook_container_additional_networks_custom: []
  48. # matrix_mautrix_facebook_container_labels_traefik_enabled controls whether labels to assist a Traefik reverse-proxy will be attached to the container.
  49. # See `../templates/labels.j2` for details.
  50. #
  51. # To inject your own other container labels, see `matrix_mautrix_facebook_container_labels_additional_labels`.
  52. matrix_mautrix_facebook_container_labels_traefik_enabled: true
  53. matrix_mautrix_facebook_container_labels_traefik_docker_network: "{{ matrix_mautrix_facebook_container_network }}"
  54. matrix_mautrix_facebook_container_labels_traefik_entrypoints: web-secure
  55. matrix_mautrix_facebook_container_labels_traefik_tls_certResolver: default # noqa var-naming
  56. # Controls whether labels will be added that expose mautrix-facebook's public endpoint
  57. matrix_mautrix_facebook_container_labels_public_endpoint_enabled: "{{ matrix_mautrix_facebook_appservice_public_enabled }}"
  58. matrix_mautrix_facebook_container_labels_public_endpoint_traefik_rule: "Host(`{{ matrix_mautrix_facebook_appservice_public_hostname }}`) && PathPrefix(`{{ matrix_mautrix_facebook_appservice_public_prefix }}`)"
  59. matrix_mautrix_facebook_container_labels_public_endpoint_traefik_priority: 0
  60. matrix_mautrix_facebook_container_labels_public_endpoint_traefik_entrypoints: "{{ matrix_mautrix_facebook_container_labels_traefik_entrypoints }}"
  61. matrix_mautrix_facebook_container_labels_public_endpoint_traefik_tls: "{{ matrix_mautrix_facebook_container_labels_public_endpoint_traefik_entrypoints != 'web' }}"
  62. matrix_mautrix_facebook_container_labels_public_endpoint_traefik_tls_certResolver: "{{ matrix_mautrix_facebook_container_labels_traefik_tls_certResolver }}" # noqa var-naming
  63. # Controls whether labels will be added that expose mautrix-facebook's metrics
  64. matrix_mautrix_facebook_container_labels_metrics_enabled: "{{ matrix_mautrix_facebook_metrics_enabled and matrix_mautrix_facebook_metrics_proxying_enabled }}"
  65. matrix_mautrix_facebook_container_labels_metrics_traefik_rule: "Host(`{{ matrix_mautrix_facebook_metrics_proxying_hostname }}`) && PathPrefix(`{{ matrix_mautrix_facebook_metrics_proxying_path_prefix }}`)"
  66. matrix_mautrix_facebook_container_labels_metrics_traefik_priority: 0
  67. matrix_mautrix_facebook_container_labels_metrics_traefik_entrypoints: "{{ matrix_mautrix_facebook_container_labels_traefik_entrypoints }}"
  68. matrix_mautrix_facebook_container_labels_metrics_traefik_tls: "{{ matrix_mautrix_facebook_container_labels_metrics_traefik_entrypoints != 'web' }}"
  69. matrix_mautrix_facebook_container_labels_metrics_traefik_tls_certResolver: "{{ matrix_mautrix_facebook_container_labels_traefik_tls_certResolver }}" # noqa var-naming
  70. matrix_mautrix_facebook_container_labels_metrics_middleware_basic_auth_enabled: false
  71. # See: https://doc.traefik.io/traefik/middlewares/http/basicauth/#users
  72. matrix_mautrix_facebook_container_labels_metrics_middleware_basic_auth_users: ''
  73. # matrix_mautrix_facebook_container_labels_additional_labels contains a multiline string with additional labels to add to the container label file.
  74. # See `../templates/labels.j2` for details.
  75. #
  76. # Example:
  77. # matrix_mautrix_facebook_container_labels_additional_labels: |
  78. # my.label=1
  79. # another.label="here"
  80. matrix_mautrix_facebook_container_labels_additional_labels: ''
  81. # A list of extra arguments to pass to the container
  82. matrix_mautrix_facebook_container_extra_arguments: []
  83. # List of systemd services that matrix-mautrix-facebook.service depends on.
  84. matrix_mautrix_facebook_systemd_required_services_list: "{{ matrix_mautrix_facebook_systemd_required_services_list_default + matrix_mautrix_facebook_systemd_required_services_list_auto + matrix_mautrix_facebook_systemd_required_services_list_custom }}"
  85. matrix_mautrix_facebook_systemd_required_services_list_default: "{{ [devture_systemd_docker_base_docker_service_name] if devture_systemd_docker_base_docker_service_name else [] }}"
  86. matrix_mautrix_facebook_systemd_required_services_list_auto: []
  87. matrix_mautrix_facebook_systemd_required_services_list_custom: []
  88. # List of systemd services that matrix-mautrix-facebook.service wants
  89. matrix_mautrix_facebook_systemd_wanted_services_list: []
  90. matrix_mautrix_facebook_appservice_token: ''
  91. matrix_mautrix_facebook_homeserver_token: ''
  92. # Whether or not created rooms should have federation enabled.
  93. # If false, created portal rooms will never be federated.
  94. matrix_mautrix_facebook_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_facebook_metrics_proxying_enabled`.
  98. matrix_mautrix_facebook_metrics_enabled: false
  99. # Controls whether metrics should be exposed on a public URL.
  100. matrix_mautrix_facebook_metrics_proxying_enabled: false
  101. matrix_mautrix_facebook_metrics_proxying_hostname: ''
  102. matrix_mautrix_facebook_metrics_proxying_path_prefix: ''
  103. matrix_mautrix_facebook_bridge_permissions: |
  104. {{
  105. {'*': 'relay', matrix_mautrix_facebook_homeserver_domain: 'user'}
  106. | combine({matrix_admin: 'admin'} if matrix_admin else {})
  107. }}
  108. # Controls whether the matrix-mautrix-facebook container exposes its HTTP port.
  109. #
  110. # Takes an "<ip>:<port>" or "<port>" value (e.g. "127.0.0.1:9008"), or empty string to not expose.
  111. matrix_mautrix_facebook_container_http_host_bind_port: ''
  112. # Database-related configuration fields.
  113. #
  114. # To use SQLite:
  115. # - change the engine (`matrix_mautrix_facebook_database_engine: 'sqlite'`)
  116. # - change to the last bridge version that supported SQLite:
  117. # `matrix_mautrix_facebook_docker_image: "{{ matrix_mautrix_facebook_docker_image_name_prefix }}tulir/mautrix-facebook:da1b4ec596e334325a1589e70829dea46e73064b"`
  118. # - plan your migration to Postgres, as this bridge does not support SQLite anymore (and neither will the playbook in the future).
  119. #
  120. # To use Postgres:
  121. # - adjust your database credentials via the `matrix_mautrix_facebook_database_*` variables
  122. matrix_mautrix_facebook_database_engine: 'postgres'
  123. matrix_mautrix_facebook_sqlite_database_path_local: "{{ matrix_mautrix_facebook_data_path }}/mautrix-facebook.db"
  124. matrix_mautrix_facebook_sqlite_database_path_in_container: "/data/mautrix-facebook.db"
  125. matrix_mautrix_facebook_database_username: 'matrix_mautrix_facebook'
  126. matrix_mautrix_facebook_database_password: 'some-password'
  127. matrix_mautrix_facebook_database_hostname: ''
  128. matrix_mautrix_facebook_database_port: 5432
  129. matrix_mautrix_facebook_database_name: 'matrix_mautrix_facebook'
  130. matrix_mautrix_facebook_database_connection_string: 'postgres://{{ matrix_mautrix_facebook_database_username }}:{{ matrix_mautrix_facebook_database_password }}@{{ matrix_mautrix_facebook_database_hostname }}:{{ matrix_mautrix_facebook_database_port }}/{{ matrix_mautrix_facebook_database_name }}'
  131. matrix_mautrix_facebook_appservice_database: "{{
  132. {
  133. 'sqlite': ('sqlite:///' + matrix_mautrix_facebook_sqlite_database_path_in_container),
  134. 'postgres': matrix_mautrix_facebook_database_connection_string,
  135. }[matrix_mautrix_facebook_database_engine]
  136. }}"
  137. # Can be set to enable automatic double-puppeting via Shared Secret Auth (https://github.com/devture/matrix-synapse-shared-secret-auth).
  138. matrix_mautrix_facebook_login_shared_secret: ''
  139. matrix_mautrix_facebook_bridge_login_shared_secret_map: "{{ {matrix_mautrix_facebook_homeserver_domain: matrix_mautrix_facebook_login_shared_secret} if matrix_mautrix_facebook_login_shared_secret else {} }}"
  140. # Enable bridge relay bot functionality
  141. matrix_mautrix_facebook_relay_enabled: "{{ matrix_bridges_relay_enabled }}"
  142. matrix_mautrix_facebook_appservice_bot_username: facebookbot
  143. matrix_mautrix_facebook_bridge_presence: true
  144. # Specifies the default log level for all bridge loggers.
  145. matrix_mautrix_facebook_logging_level: WARNING
  146. # Default configuration template which covers the generic use case.
  147. # You can customize it by controlling the various variables inside it.
  148. #
  149. # For a more advanced customization, you can extend the default (see `matrix_mautrix_facebook_configuration_extension_yaml`)
  150. # or completely replace this variable with your own template.
  151. matrix_mautrix_facebook_configuration_yaml: "{{ lookup('template', 'templates/config.yaml.j2') }}"
  152. matrix_mautrix_facebook_configuration_extension_yaml: |
  153. # Your custom YAML configuration goes here.
  154. # This configuration extends the default starting configuration (`matrix_mautrix_facebook_configuration_yaml`).
  155. #
  156. # You can override individual variables from the default configuration, or introduce new ones.
  157. #
  158. # If you need something more special, you can take full control by
  159. # completely redefining `matrix_mautrix_facebook_configuration_yaml`.
  160. matrix_mautrix_facebook_configuration_extension: "{{ matrix_mautrix_facebook_configuration_extension_yaml | from_yaml if matrix_mautrix_facebook_configuration_extension_yaml | from_yaml is mapping else {} }}"
  161. # Holds the final configuration (a combination of the default and its extension).
  162. # You most likely don't need to touch this variable. Instead, see `matrix_mautrix_facebook_configuration_yaml`.
  163. matrix_mautrix_facebook_configuration: "{{ matrix_mautrix_facebook_configuration_yaml | from_yaml | combine(matrix_mautrix_facebook_configuration_extension, recursive=True) }}"
  164. matrix_mautrix_facebook_registration_yaml: |
  165. id: facebook
  166. as_token: "{{ matrix_mautrix_facebook_appservice_token }}"
  167. hs_token: "{{ matrix_mautrix_facebook_homeserver_token }}"
  168. namespaces:
  169. users:
  170. - exclusive: true
  171. regex: '^@facebook_.+:{{ matrix_mautrix_facebook_homeserver_domain | regex_escape }}$'
  172. - exclusive: true
  173. regex: '^@{{ matrix_mautrix_facebook_appservice_bot_username | regex_escape }}:{{ matrix_mautrix_facebook_homeserver_domain | regex_escape }}$'
  174. url: {{ matrix_mautrix_facebook_appservice_address }}
  175. # See https://github.com/mautrix/signal/issues/43
  176. sender_localpart: _bot_{{ matrix_mautrix_facebook_appservice_bot_username }}
  177. rate_limited: false
  178. de.sorunome.msc2409.push_ephemeral: true
  179. receive_ephemeral: true
  180. matrix_mautrix_facebook_registration: "{{ matrix_mautrix_facebook_registration_yaml | from_yaml }}"
  181. # Enable End-to-bridge encryption
  182. matrix_mautrix_facebook_bridge_encryption_allow: "{{ matrix_bridges_encryption_enabled }}"
  183. matrix_mautrix_facebook_bridge_encryption_default: "{{ matrix_bridges_encryption_default }}"
  184. matrix_mautrix_facebook_bridge_encryption_key_sharing_allow: "{{ matrix_mautrix_facebook_bridge_encryption_allow }}"