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.
 
 

223 líneas
12 KiB

  1. # SPDX-FileCopyrightText: 2025 MDAD project contributors
  2. #
  3. # SPDX-License-Identifier: AGPL-3.0-or-later
  4. ---
  5. # matrix-bridge-rustpush is a Matrix <-> iMessage bridge using RustPush
  6. # Project source code URL: https://github.com/lrhodin/imessage
  7. matrix_rustpush_bridge_enabled: true
  8. # No upstream Docker image exists; self-build is always required.
  9. matrix_rustpush_bridge_container_image_self_build: true
  10. matrix_rustpush_bridge_container_image_self_build_repo: "https://github.com/lrhodin/imessage.git"
  11. matrix_rustpush_bridge_container_image_self_build_repo_version: "{{ 'main' if matrix_rustpush_bridge_version == 'latest' else matrix_rustpush_bridge_version }}"
  12. matrix_rustpush_bridge_version: latest
  13. matrix_rustpush_bridge_docker_image: "{{ matrix_rustpush_bridge_docker_image_registry_prefix }}lrhodin/imessage:{{ matrix_rustpush_bridge_version }}"
  14. matrix_rustpush_bridge_docker_image_registry_prefix: "localhost/"
  15. matrix_rustpush_bridge_docker_image_force_pull: "{{ matrix_rustpush_bridge_docker_image.endswith(':latest') }}"
  16. matrix_rustpush_bridge_base_path: "{{ matrix_base_data_path }}/rustpush-bridge"
  17. matrix_rustpush_bridge_config_path: "{{ matrix_rustpush_bridge_base_path }}/config"
  18. matrix_rustpush_bridge_data_path: "{{ matrix_rustpush_bridge_base_path }}/data"
  19. matrix_rustpush_bridge_docker_src_files_path: "{{ matrix_rustpush_bridge_base_path }}/docker-src"
  20. matrix_rustpush_bridge_homeserver_address: ""
  21. # Whether asynchronous uploads via MSC2246 should be enabled for media.
  22. matrix_rustpush_bridge_homeserver_async_media: false
  23. matrix_rustpush_bridge_homeserver_domain: '{{ matrix_domain }}'
  24. matrix_rustpush_bridge_appservice_address: 'http://matrix-rustpush-bridge:8081'
  25. matrix_rustpush_bridge_msc4190_enabled: "{{ matrix_bridges_msc4190_enabled }}"
  26. matrix_rustpush_bridge_self_sign_enabled: "{{ matrix_bridges_self_sign_enabled }}"
  27. # A public address that external services can use to reach this appservice.
  28. matrix_rustpush_bridge_appservice_public_address: ''
  29. # Displayname template for iMessage contacts.
  30. # Available variables: {{.FirstName}}, {{.LastName}}, {{.Nickname}},
  31. # {{.Phone}}, {{.Email}}, {{.ID}}
  32. matrix_rustpush_bridge_network_displayname_template: "{% raw %}{{if .FirstName}}{{.FirstName}}{{if .LastName}} {{.LastName}}{{end}}{{else if .Nickname}}{{.Nickname}}{{else if .Phone}}{{.Phone}}{{else if .Email}}{{.Email}}{{else}}{{.ID}}{{end}}{% endraw %}"
  33. matrix_rustpush_bridge_bridge_command_prefix: "!imessage"
  34. matrix_rustpush_bridge_bridge_permissions: |
  35. {{
  36. {matrix_rustpush_bridge_homeserver_domain: 'user'}
  37. | combine({matrix_admin: 'admin'} if matrix_admin else {})
  38. }}
  39. matrix_rustpush_bridge_container_network: ""
  40. matrix_rustpush_bridge_container_additional_networks: "{{ matrix_rustpush_bridge_container_additional_networks_auto + matrix_rustpush_bridge_container_additional_networks_custom }}"
  41. matrix_rustpush_bridge_container_additional_networks_auto: []
  42. matrix_rustpush_bridge_container_additional_networks_custom: []
  43. # matrix_rustpush_bridge_container_labels_traefik_enabled controls whether labels to assist a Traefik reverse-proxy will be attached to the container.
  44. # See `../templates/labels.j2` for details.
  45. #
  46. # To inject your own other container labels, see `matrix_rustpush_bridge_container_labels_additional_labels`.
  47. matrix_rustpush_bridge_container_labels_traefik_enabled: true
  48. matrix_rustpush_bridge_container_labels_traefik_docker_network: "{{ matrix_rustpush_bridge_container_network }}"
  49. matrix_rustpush_bridge_container_labels_traefik_entrypoints: web-secure
  50. matrix_rustpush_bridge_container_labels_traefik_tls_certResolver: default # noqa var-naming
  51. # Controls whether labels will be added that expose metrics
  52. matrix_rustpush_bridge_container_labels_metrics_enabled: "{{ matrix_rustpush_bridge_metrics_enabled and matrix_rustpush_bridge_metrics_proxying_enabled }}"
  53. matrix_rustpush_bridge_container_labels_metrics_traefik_rule: "Host(`{{ matrix_rustpush_bridge_metrics_proxying_hostname }}`) && PathPrefix(`{{ matrix_rustpush_bridge_metrics_proxying_path_prefix }}`)"
  54. matrix_rustpush_bridge_container_labels_metrics_traefik_priority: 0
  55. matrix_rustpush_bridge_container_labels_metrics_traefik_entrypoints: "{{ matrix_rustpush_bridge_container_labels_traefik_entrypoints }}"
  56. matrix_rustpush_bridge_container_labels_metrics_traefik_tls: "{{ matrix_rustpush_bridge_container_labels_metrics_traefik_entrypoints != 'web' }}"
  57. matrix_rustpush_bridge_container_labels_metrics_traefik_tls_certResolver: "{{ matrix_rustpush_bridge_container_labels_traefik_tls_certResolver }}" # noqa var-naming
  58. matrix_rustpush_bridge_container_labels_metrics_middleware_basic_auth_enabled: false
  59. # See: https://doc.traefik.io/traefik/middlewares/http/basicauth/#users
  60. matrix_rustpush_bridge_container_labels_metrics_middleware_basic_auth_users: ''
  61. # matrix_rustpush_bridge_container_labels_additional_labels contains a multiline string with additional labels to add to the container label file.
  62. # See `../templates/labels.j2` for details.
  63. #
  64. # Example:
  65. # matrix_rustpush_bridge_container_labels_additional_labels: |
  66. # my.label=1
  67. # another.label="here"
  68. matrix_rustpush_bridge_container_labels_additional_labels: ''
  69. # A list of extra arguments to pass to the container
  70. matrix_rustpush_bridge_container_extra_arguments: []
  71. # List of systemd services that matrix-rustpush-bridge.service depends on.
  72. matrix_rustpush_bridge_systemd_required_services_list: "{{ matrix_rustpush_bridge_systemd_required_services_list_default + matrix_rustpush_bridge_systemd_required_services_list_auto + matrix_rustpush_bridge_systemd_required_services_list_custom }}"
  73. matrix_rustpush_bridge_systemd_required_services_list_default: "{{ [devture_systemd_docker_base_docker_service_name] if devture_systemd_docker_base_docker_service_name else [] }}"
  74. matrix_rustpush_bridge_systemd_required_services_list_auto: []
  75. matrix_rustpush_bridge_systemd_required_services_list_custom: []
  76. # List of systemd services that matrix-rustpush-bridge.service wants
  77. matrix_rustpush_bridge_systemd_wanted_services_list: []
  78. matrix_rustpush_bridge_appservice_token: ''
  79. matrix_rustpush_bridge_homeserver_token: ''
  80. # Whether or not created rooms should have federation enabled.
  81. # If false, created portal rooms will never be federated.
  82. matrix_rustpush_bridge_matrix_federate_rooms: true
  83. # Database-related configuration fields.
  84. #
  85. # To use Postgres:
  86. # - adjust your database credentials via the `matrix_rustpush_bridge_postgres_*` variables
  87. matrix_rustpush_bridge_database_engine: 'postgres'
  88. matrix_rustpush_bridge_database_username: 'matrix_rustpush_bridge'
  89. matrix_rustpush_bridge_database_password: 'some-password'
  90. matrix_rustpush_bridge_database_hostname: ''
  91. matrix_rustpush_bridge_database_port: 5432
  92. matrix_rustpush_bridge_database_name: 'matrix_rustpush_bridge'
  93. matrix_rustpush_bridge_database_sslmode: disable
  94. matrix_rustpush_bridge_database_connection_string: 'postgres://{{ matrix_rustpush_bridge_database_username }}:{{ matrix_rustpush_bridge_database_password }}@{{ matrix_rustpush_bridge_database_hostname }}:{{ matrix_rustpush_bridge_database_port }}/{{ matrix_rustpush_bridge_database_name }}?sslmode={{ matrix_rustpush_bridge_database_sslmode }}'
  95. matrix_rustpush_bridge_database_uri: "{{
  96. {
  97. 'postgres': matrix_rustpush_bridge_database_connection_string,
  98. }[matrix_rustpush_bridge_database_engine]
  99. }}"
  100. matrix_rustpush_bridge_double_puppet_secrets: "{{ matrix_rustpush_bridge_double_puppet_secrets_auto | combine(matrix_rustpush_bridge_double_puppet_secrets_custom) }}"
  101. matrix_rustpush_bridge_double_puppet_secrets_auto: {}
  102. matrix_rustpush_bridge_double_puppet_secrets_custom: {}
  103. matrix_rustpush_bridge_appservice_bot_username: imessagebot
  104. matrix_rustpush_bridge_appservice_bot_displayname: iMessage bridge bot
  105. matrix_rustpush_bridge_appservice_bot_avatar: ''
  106. # Backfill is disabled by default because Linux Docker cannot access chat.db.
  107. # On macOS with Full Disk Access, this can be set to true.
  108. matrix_rustpush_bridge_backfill_enabled: false
  109. # Maximum number of messages to backfill in empty rooms
  110. matrix_rustpush_bridge_backfill_max_initial_messages: 50
  111. # Maximum number of missed messages to backfill after bridge restarts
  112. matrix_rustpush_bridge_backfill_max_catchup_messages: 500
  113. # How many days back to look for chats during initial sync.
  114. # Default in upstream is 365 (1 year). Set to 0 to disable.
  115. matrix_rustpush_bridge_initial_sync_days: 0
  116. # Shared secret for authentication of provisioning API requests.
  117. # If set to "disable", the provisioning API will be disabled.
  118. matrix_rustpush_bridge_provisioning_shared_secret: disable
  119. # Minimum severity of journal log messages.
  120. # Valid values: fatal, error, warn, info, debug, trace
  121. matrix_rustpush_bridge_logging_level: 'warn'
  122. # Whether or not metrics endpoint should be enabled.
  123. # Enabling them is usually enough for a local (in-container) Prometheus to consume them.
  124. # If metrics need to be consumed by another (external) Prometheus server, consider exposing them via `matrix_rustpush_bridge_metrics_proxying_enabled`.
  125. matrix_rustpush_bridge_metrics_enabled: false
  126. # Controls whether metrics should be exposed on a public URL.
  127. matrix_rustpush_bridge_metrics_proxying_enabled: false
  128. matrix_rustpush_bridge_metrics_proxying_hostname: ''
  129. matrix_rustpush_bridge_metrics_proxying_path_prefix: ''
  130. # Default configuration template which covers the generic use case.
  131. # You can customize it by controlling the various variables inside it.
  132. #
  133. # For a more advanced customization, you can extend the default (see `matrix_rustpush_bridge_configuration_extension_yaml`)
  134. # or completely replace this variable with your own template.
  135. matrix_rustpush_bridge_configuration_yaml: "{{ lookup('template', 'templates/config.yaml.j2') }}"
  136. matrix_rustpush_bridge_configuration_extension_yaml: |
  137. # Your custom YAML configuration goes here.
  138. # This configuration extends the default starting configuration (`matrix_rustpush_bridge_configuration_yaml`).
  139. #
  140. # You can override individual variables from the default configuration, or introduce new ones.
  141. #
  142. # If you need something more special, you can take full control by
  143. # completely redefining `matrix_rustpush_bridge_configuration_yaml`.
  144. matrix_rustpush_bridge_configuration_extension: "{{ matrix_rustpush_bridge_configuration_extension_yaml | from_yaml if matrix_rustpush_bridge_configuration_extension_yaml | from_yaml is mapping else {} }}"
  145. # Holds the final configuration (a combination of the default and its extension).
  146. # You most likely don't need to touch this variable. Instead, see `matrix_rustpush_bridge_configuration_yaml`.
  147. matrix_rustpush_bridge_configuration: "{{ matrix_rustpush_bridge_configuration_yaml | from_yaml | combine(matrix_rustpush_bridge_configuration_extension, recursive=True) }}"
  148. matrix_rustpush_bridge_registration_yaml: |
  149. id: rustpush-bridge
  150. as_token: "{{ matrix_rustpush_bridge_appservice_token }}"
  151. hs_token: "{{ matrix_rustpush_bridge_homeserver_token }}"
  152. namespaces:
  153. users:
  154. - exclusive: true
  155. regex: '^@imessage_.+:{{ matrix_rustpush_bridge_homeserver_domain | regex_escape }}$'
  156. - exclusive: true
  157. regex: '^@{{ matrix_rustpush_bridge_appservice_bot_username | regex_escape }}:{{ matrix_rustpush_bridge_homeserver_domain | regex_escape }}$'
  158. url: {{ matrix_rustpush_bridge_appservice_address }}
  159. sender_localpart: _bot_{{ matrix_rustpush_bridge_appservice_bot_username }}
  160. rate_limited: false
  161. de.sorunome.msc2409.push_ephemeral: true
  162. receive_ephemeral: true
  163. io.element.msc4190: {{ matrix_rustpush_bridge_msc4190_enabled | to_json }}
  164. matrix_rustpush_bridge_registration: "{{ matrix_rustpush_bridge_registration_yaml | from_yaml }}"
  165. # Enable End-to-bridge encryption
  166. matrix_rustpush_bridge_bridge_encryption_allow: "{{ matrix_bridges_encryption_enabled }}"
  167. matrix_rustpush_bridge_bridge_encryption_default: "{{ matrix_bridges_encryption_default }}"
  168. matrix_rustpush_bridge_bridge_encryption_require: false
  169. matrix_rustpush_bridge_bridge_encryption_appservice: false
  170. matrix_rustpush_bridge_bridge_encryption_key_sharing_allow: "{{ matrix_rustpush_bridge_bridge_encryption_allow }}"
  171. matrix_rustpush_bridge_bridge_encryption_pickle_key: mautrix.bridge.e2ee
  172. # matrix_rustpush_bridge_restart_necessary controls whether the service
  173. # will be restarted (when true) or merely started (when false) by the
  174. # systemd service manager role (when conditional restart is enabled).
  175. #
  176. # This value is automatically computed during installation based on whether
  177. # any configuration files, the systemd service file, or the container image changed.
  178. # The default of `false` means "no restart needed" — appropriate when the role's
  179. # installation tasks haven't run (e.g., due to --tags skipping them).
  180. matrix_rustpush_bridge_restart_necessary: false