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.
 
 

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