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

208 строки
12 KiB

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