Matrix Docker Ansible eploy
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.
 
 

215 rader
11 KiB

  1. # SPDX-FileCopyrightText: 2023 - 2025 Slavi Pantaleev
  2. # SPDX-FileCopyrightText: 2023 Cody Wyatt Neiman
  3. # SPDX-FileCopyrightText: 2023 Nikita Chernyi
  4. # SPDX-FileCopyrightText: 2023 Samuel Meenzen
  5. # SPDX-FileCopyrightText: 2024 MDAD project contributors
  6. #
  7. # SPDX-License-Identifier: AGPL-3.0-or-later
  8. ---
  9. # mautrix-slack is a Matrix <-> Slack bridge
  10. # Project source code URL: https://github.com/mautrix/slack
  11. matrix_mautrix_slack_enabled: true
  12. matrix_mautrix_slack_container_image_self_build: false
  13. matrix_mautrix_slack_container_image_self_build_repo: "https://mau.dev/mautrix/slack.git"
  14. matrix_mautrix_slack_container_image_self_build_branch: "{{ 'main' if matrix_mautrix_slack_version == 'latest' else matrix_mautrix_slack_version }}"
  15. # renovate: datasource=docker depName=dock.mau.dev/mautrix/slack
  16. matrix_mautrix_slack_version: v0.2511.0
  17. # See: https://mau.dev/mautrix/slack/container_registry
  18. matrix_mautrix_slack_docker_image: "{{ matrix_mautrix_slack_docker_image_registry_prefix }}mautrix/slack:{{ matrix_mautrix_slack_version }}"
  19. matrix_mautrix_slack_docker_image_registry_prefix: "{{ 'localhost/' if matrix_mautrix_slack_container_image_self_build else matrix_mautrix_slack_docker_image_registry_prefix_upstream }}"
  20. matrix_mautrix_slack_docker_image_registry_prefix_upstream: "{{ matrix_mautrix_slack_docker_image_registry_prefix_upstream_default }}"
  21. matrix_mautrix_slack_docker_image_registry_prefix_upstream_default: "dock.mau.dev/"
  22. matrix_mautrix_slack_docker_image_force_pull: "{{ matrix_mautrix_slack_docker_image.endswith(':latest') }}"
  23. matrix_mautrix_slack_base_path: "{{ matrix_base_data_path }}/mautrix-slack"
  24. matrix_mautrix_slack_config_path: "{{ matrix_mautrix_slack_base_path }}/config"
  25. matrix_mautrix_slack_data_path: "{{ matrix_mautrix_slack_base_path }}/data"
  26. matrix_mautrix_slack_docker_src_files_path: "{{ matrix_mautrix_slack_base_path }}/docker-src"
  27. matrix_mautrix_slack_homeserver_address: ""
  28. matrix_mautrix_slack_homeserver_domain: "{{ matrix_domain }}"
  29. # Whether asynchronous uploads via MSC2246 should be enabled for media.
  30. # Requires a homeserver that supports MSC2246 (https://github.com/matrix-org/matrix-spec-proposals/pull/2246).
  31. matrix_mautrix_slack_homeserver_async_media: false
  32. matrix_mautrix_slack_appservice_address: "http://matrix-mautrix-slack:8080"
  33. matrix_mautrix_slack_msc4190_enabled: "{{ matrix_bridges_msc4190_enabled }}"
  34. matrix_mautrix_slack_self_sign_enabled: "{{ matrix_bridges_self_sign_enabled }}"
  35. # Displayname template for Slack users. Available variables:
  36. # .Name - The username of the user
  37. # .Team.Name - The name of the team the channel is in
  38. # .Team.Domain - The Slack subdomain of the team the channel is in
  39. # .ID - The internal ID of the user
  40. # .IsBot - Whether the user is a bot
  41. # .Profile.DisplayName - The username or real name of the user (depending on settings)
  42. # Variables only available for users (not bots):
  43. # .TeamID - The internal ID of the workspace the user is in
  44. # .TZ - The timezone region of the user (e.g. Europe/London)
  45. # .TZLabel - The label of the timezone of the user (e.g. Greenwich Mean Time)
  46. # .TZOffset - The UTC offset of the timezone of the user (e.g. 0)
  47. # .Profile.RealName - The real name of the user
  48. # .Profile.FirstName - The first name of the user
  49. # .Profile.LastName - The last name of the user
  50. # .Profile.Title - The job title of the user
  51. # .Profile.Pronouns - The pronouns of the user
  52. # .Profile.Email - The email address of the user
  53. # .Profile.Phone - The formatted phone number of the user
  54. matrix_mautrix_slack_network_displayname_template: '{% raw %}{{or .Profile.DisplayName .Profile.RealName .Name}}{{if .IsBot}} (bot){{end}}{% endraw %}'
  55. matrix_mautrix_slack_command_prefix: "!slack"
  56. matrix_mautrix_slack_bridge_permissions: |
  57. {{
  58. {'*': 'relay', matrix_mautrix_slack_homeserver_domain: 'user'}
  59. | combine({matrix_admin: 'admin'} if matrix_admin else {})
  60. }}
  61. matrix_mautrix_slack_container_network: ""
  62. matrix_mautrix_slack_container_additional_networks: "{{ matrix_mautrix_slack_container_additional_networks_auto + matrix_mautrix_slack_container_additional_networks_custom }}"
  63. matrix_mautrix_slack_container_additional_networks_auto: []
  64. matrix_mautrix_slack_container_additional_networks_custom: []
  65. # A list of extra arguments to pass to the container
  66. matrix_mautrix_slack_container_extra_arguments: []
  67. # List of systemd services that matrix-mautrix-slack.service depends on.
  68. matrix_mautrix_slack_systemd_required_services_list: "{{ matrix_mautrix_slack_systemd_required_services_list_default + matrix_mautrix_slack_systemd_required_services_list_auto + matrix_mautrix_slack_systemd_required_services_list_custom }}"
  69. matrix_mautrix_slack_systemd_required_services_list_default: "{{ [devture_systemd_docker_base_docker_service_name] if devture_systemd_docker_base_docker_service_name else [] }}"
  70. matrix_mautrix_slack_systemd_required_services_list_auto: []
  71. matrix_mautrix_slack_systemd_required_services_list_custom: []
  72. # List of systemd services that matrix-mautrix-slack.service wants
  73. matrix_mautrix_slack_systemd_wanted_services_list: []
  74. matrix_mautrix_slack_appservice_token: ''
  75. matrix_mautrix_slack_homeserver_token: ''
  76. matrix_mautrix_slack_appservice_bot_username: slackbot
  77. matrix_mautrix_slack_backfill_enabled: true
  78. matrix_mautrix_slack_backfill_max_initial_messages: 50
  79. matrix_mautrix_slack_backfill_max_catchup_messages: 500
  80. matrix_mautrix_slack_backfill_unread_hours_threshold: 720
  81. matrix_mautrix_slack_backfill_threads_max_initial_messages: 50
  82. # Minimum severity of journal log messages.
  83. # Valid values: fatal, error, warn, info, debug, trace
  84. matrix_mautrix_slack_logging_level: 'warn'
  85. # Database-related configuration fields.
  86. #
  87. # To use SQLite, stick to these defaults.
  88. #
  89. # To use Postgres:
  90. # - change the engine (`matrix_mautrix_slack_database_engine: 'postgres'`)
  91. # - adjust your database credentials via the `matrix_mautrix_slack_database_*` variables
  92. matrix_mautrix_slack_database_engine: 'sqlite'
  93. matrix_mautrix_slack_sqlite_database_path_local: "{{ matrix_mautrix_slack_data_path }}/mautrix-slack.db"
  94. matrix_mautrix_slack_sqlite_database_path_in_container: "/data/mautrix-slack.db"
  95. matrix_mautrix_slack_database_username: 'matrix_mautrix_slack'
  96. matrix_mautrix_slack_database_password: 'some-password'
  97. matrix_mautrix_slack_database_hostname: ''
  98. matrix_mautrix_slack_database_port: 5432
  99. matrix_mautrix_slack_database_name: 'matrix_mautrix_slack'
  100. matrix_mautrix_slack_database_sslmode: disable
  101. matrix_mautrix_slack_database_connection_string: 'postgresql://{{ matrix_mautrix_slack_database_username }}:{{ matrix_mautrix_slack_database_password }}@{{ matrix_mautrix_slack_database_hostname }}:{{ matrix_mautrix_slack_database_port }}/{{ matrix_mautrix_slack_database_name }}?sslmode={{ matrix_mautrix_slack_database_sslmode }}'
  102. matrix_mautrix_slack_appservice_database_type: "{{
  103. {
  104. 'sqlite': 'sqlite3',
  105. 'postgres':'postgres',
  106. }[matrix_mautrix_slack_database_engine]
  107. }}"
  108. matrix_mautrix_slack_appservice_database_uri: "{{
  109. {
  110. 'sqlite': matrix_mautrix_slack_sqlite_database_path_in_container,
  111. 'postgres': matrix_mautrix_slack_database_connection_string,
  112. }[matrix_mautrix_slack_database_engine]
  113. }}"
  114. matrix_mautrix_slack_double_puppet_secrets: "{{ matrix_mautrix_slack_double_puppet_secrets_auto | combine(matrix_mautrix_slack_double_puppet_secrets_custom) }}"
  115. matrix_mautrix_slack_double_puppet_secrets_auto: {}
  116. matrix_mautrix_slack_double_puppet_secrets_custom: {}
  117. # Default mautrix-slack configuration template which covers the generic use case.
  118. # You can customize it by controlling the various variables inside it.
  119. #
  120. # For a more advanced customization, you can extend the default (see `matrix_mautrix_slack_configuration_extension_yaml`)
  121. # or completely replace this variable with your own template.
  122. matrix_mautrix_slack_configuration_yaml: "{{ lookup('template', 'templates/config.yaml.j2') }}"
  123. matrix_mautrix_slack_configuration_extension_yaml: |
  124. # Your custom YAML configuration goes here.
  125. # This configuration extends the default starting configuration (`matrix_mautrix_slack_configuration_yaml`).
  126. #
  127. # You can override individual variables from the default configuration, or introduce new ones.
  128. #
  129. # If you need something more special, you can take full control by
  130. # completely redefining `matrix_mautrix_slack_configuration_yaml`.
  131. matrix_mautrix_slack_configuration_extension: "{{ matrix_mautrix_slack_configuration_extension_yaml | from_yaml if matrix_mautrix_slack_configuration_extension_yaml | from_yaml is mapping else {} }}"
  132. # Holds the final configuration (a combination of the default and its extension).
  133. # You most likely don't need to touch this variable. Instead, see `matrix_mautrix_slack_configuration_yaml`.
  134. matrix_mautrix_slack_configuration: "{{ matrix_mautrix_slack_configuration_yaml | from_yaml | combine(matrix_mautrix_slack_configuration_extension, recursive=True) }}"
  135. matrix_mautrix_slack_registration_yaml: |
  136. id: slack
  137. url: {{ matrix_mautrix_slack_appservice_address | to_json }}
  138. as_token: {{ matrix_mautrix_slack_appservice_token | to_json }}
  139. hs_token: {{ matrix_mautrix_slack_homeserver_token | to_json }}
  140. # See https://github.com/mautrix/signal/issues/43
  141. sender_localpart: _bot_{{ matrix_mautrix_slack_appservice_bot_username }}
  142. rate_limited: false
  143. namespaces:
  144. users:
  145. - regex: '^@slack_[a-z-A-Z0-9\-]+:{{ matrix_mautrix_slack_homeserver_domain | regex_escape }}$'
  146. exclusive: true
  147. - exclusive: true
  148. regex: '^@{{ matrix_mautrix_slack_appservice_bot_username | regex_escape }}:{{ matrix_mautrix_slack_homeserver_domain | regex_escape }}$'
  149. de.sorunome.msc2409.push_ephemeral: true
  150. receive_ephemeral: true
  151. io.element.msc4190: {{ matrix_mautrix_slack_msc4190_enabled | to_json }}
  152. matrix_mautrix_slack_registration: "{{ matrix_mautrix_slack_registration_yaml | from_yaml }}"
  153. # Enable End-to-bridge encryption
  154. matrix_mautrix_slack_bridge_encryption_allow: "{{ matrix_bridges_encryption_enabled }}"
  155. matrix_mautrix_slack_bridge_encryption_default: "{{ matrix_bridges_encryption_default }}"
  156. matrix_mautrix_slack_bridge_encryption_key_sharing_allow: "{{ matrix_mautrix_slack_bridge_encryption_allow }}"
  157. # This pickle key value is backward-compatible with the old bridge.
  158. # See: https://github.com/mautrix/slack/releases/tag/v0.1.0
  159. matrix_mautrix_slack_bridge_encryption_pickle_key: maunium.net/go/mautrix-whatsapp
  160. matrix_mautrix_slack_provisioning_shared_secret: ''
  161. matrix_mautrix_slack_public_media_signing_key: ''
  162. # Controls whether relay mode is enabled
  163. matrix_mautrix_slack_bridge_relay_enabled: "{{ matrix_bridges_relay_enabled }}"
  164. # Controls whether only admins can set themselves as relay users
  165. matrix_mautrix_slack_bridge_relay_admin_only: true
  166. # List of user login IDs which anyone can set as a relay, as long as the relay user is in the room
  167. matrix_mautrix_slack_bridge_relay_default_relays: []
  168. # matrix_mautrix_slack_restart_necessary controls whether the service
  169. # will be restarted (when true) or merely started (when false) by the
  170. # systemd service manager role (when conditional restart is enabled).
  171. #
  172. # This value is automatically computed during installation based on whether
  173. # any configuration files, the systemd service file, or the container image changed.
  174. # The default of `false` means "no restart needed" — appropriate when the role's
  175. # installation tasks haven't run (e.g., due to --tags skipping them).
  176. matrix_mautrix_slack_restart_necessary: false