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.
 
 

216 line
12 KiB

  1. # SPDX-FileCopyrightText: 2025 Jason LaGuidice
  2. #
  3. # SPDX-License-Identifier: AGPL-3.0-or-later
  4. ---
  5. # matrix-steam-bridge is a Matrix <-> Steam bridge
  6. # See: https://github.com/jasonlaguidice/matrix-steam-bridge
  7. matrix_steam_bridge_enabled: true
  8. matrix_steam_bridge_container_image_self_build: false
  9. matrix_steam_bridge_container_image_self_build_repo: "https://github.com/jasonlaguidice/matrix-steam-bridge.git"
  10. matrix_steam_bridge_container_image_self_build_repo_version: "{{ 'main' if matrix_steam_bridge_version == 'latest' else matrix_steam_bridge_version }}"
  11. # renovate: datasource=docker depName=ghcr.io/jasonlaguidice/matrix-steam-bridge
  12. matrix_steam_bridge_version: latest
  13. matrix_steam_bridge_docker_image: "{{ matrix_steam_bridge_docker_image_registry_prefix }}jasonlaguidice/matrix-steam-bridge:{{ matrix_steam_bridge_version }}"
  14. matrix_steam_bridge_docker_image_registry_prefix: "{{ 'localhost/' if matrix_steam_bridge_container_image_self_build else matrix_steam_bridge_docker_image_registry_prefix_upstream }}"
  15. matrix_steam_bridge_docker_image_registry_prefix_upstream: "{{ matrix_steam_bridge_docker_image_registry_prefix_upstream_default }}"
  16. matrix_steam_bridge_docker_image_registry_prefix_upstream_default: "ghcr.io/"
  17. matrix_steam_bridge_docker_image_tag: "{{ matrix_steam_bridge_version }}"
  18. matrix_steam_bridge_docker_image_force_pull: "{{ matrix_steam_bridge_docker_image.endswith(':latest') }}"
  19. matrix_steam_bridge_base_path: "{{ matrix_base_data_path }}/matrix-steam-bridge"
  20. matrix_steam_bridge_config_path: "{{ matrix_steam_bridge_base_path }}/config"
  21. matrix_steam_bridge_data_path: "{{ matrix_steam_bridge_base_path }}/data"
  22. matrix_steam_bridge_docker_src_files_path: "{{ matrix_steam_bridge_base_path }}/docker-src"
  23. matrix_steam_bridge_homeserver_address: ""
  24. matrix_steam_bridge_homeserver_domain: "{{ matrix_domain }}"
  25. matrix_steam_bridge_appservice_address: "http://matrix-steam-bridge:{{ matrix_steam_bridge_appservice_port }}"
  26. matrix_steam_bridge_appservice_port: "8080"
  27. matrix_steam_bridge_msc4190_enabled: "{{ matrix_bridges_msc4190_enabled }}"
  28. # A public address that external services can use to reach this appservice
  29. matrix_steam_bridge_appservice_public_address: "https://{{ matrix_server_fqn_matrix }}"
  30. # Public media configuration for external access to bridge media
  31. matrix_steam_bridge_public_media_enabled: true
  32. # A key for signing public media URLs. If set to "generate", a random key will be generated.
  33. matrix_steam_bridge_public_media_signing_key: "generate"
  34. # Number of seconds that public media URLs are valid for. If set to 0, URLs will never expire.
  35. matrix_steam_bridge_public_media_expiry: 0
  36. matrix_steam_bridge_public_media_hash_length: 32
  37. # Displayname template for Steam users
  38. # {{ .DisplayName }} is replaced with the display name of the Steam user
  39. # {{ .Username }} is replaced with the username of the Steam user
  40. matrix_steam_bridge_network_displayname_template: "{% raw %}{{ .DisplayName }}{% endraw %} (Steam)"
  41. matrix_steam_bridge_command_prefix: "!steam"
  42. matrix_steam_bridge_bridge_permissions: |
  43. {{
  44. {matrix_steam_bridge_homeserver_domain: 'user'}
  45. | combine ({matrix_admin: 'admin'} if matrix_admin else {})
  46. }}
  47. # TODO: May need to set network for public media?
  48. matrix_steam_bridge_container_network: ""
  49. matrix_steam_bridge_container_additional_networks: "{{ matrix_steam_bridge_container_additional_networks_auto + matrix_steam_bridge_container_additional_networks_custom }}"
  50. matrix_steam_bridge_container_additional_networks_auto: []
  51. matrix_steam_bridge_container_additional_networks_custom: []
  52. # matrix_steam_bridge_container_labels_traefik_enabled controls whether labels to assist a Traefik reverse-proxy will be attached to the container.
  53. # See `../templates/labels.j2` for details.
  54. #
  55. # To inject your own other container labels, see `matrix_steam_bridge_container_labels_additional_labels`.
  56. matrix_steam_bridge_container_labels_traefik_enabled: true
  57. matrix_steam_bridge_container_labels_traefik_docker_network: "{{ matrix_steam_bridge_container_network }}"
  58. matrix_steam_bridge_container_labels_traefik_entrypoints: web-secure
  59. matrix_steam_bridge_container_labels_traefik_tls_certResolver: default # noqa var-naming
  60. # Controls whether labels will be added that expose mautrix-instagram's metrics
  61. matrix_steam_bridge_container_labels_metrics_enabled: "{{ matrix_steam_bridge_metrics_enabled and matrix_steam_bridge_metrics_proxying_enabled }}"
  62. matrix_steam_bridge_container_labels_metrics_traefik_rule: "Host(`{{ matrix_steam_bridge_metrics_proxying_hostname }}`) && PathPrefix(`{{ matrix_steam_bridge_metrics_proxying_path_prefix }}`)"
  63. matrix_steam_bridge_container_labels_metrics_traefik_priority: 0
  64. matrix_steam_bridge_container_labels_metrics_traefik_entrypoints: "{{ matrix_steam_bridge_container_labels_traefik_entrypoints }}"
  65. matrix_steam_bridge_container_labels_metrics_traefik_tls: "{{ matrix_steam_bridge_container_labels_metrics_traefik_entrypoints != 'web' }}"
  66. matrix_steam_bridge_container_labels_metrics_traefik_tls_certResolver: "{{ matrix_steam_bridge_container_labels_traefik_tls_certResolver }}" # noqa var-naming
  67. matrix_steam_bridge_container_labels_metrics_middleware_basic_auth_enabled: false
  68. # See: https://doc.traefik.io/traefik/middlewares/http/basicauth/#users
  69. matrix_steam_bridge_container_labels_metrics_middleware_basic_auth_users: ''
  70. # matrix_steam_bridge_container_labels_additional_labels contains a multiline string with additional labels to add to the container label file.
  71. # See `../templates/labels.j2` for details.
  72. #
  73. # Example:
  74. # matrix_steam_bridge_container_labels_additional_labels: |
  75. # my.label=1
  76. # another.label="here"
  77. matrix_steam_bridge_container_labels_additional_labels: ''
  78. # A list of extra arguments to pass to the container
  79. matrix_steam_bridge_container_extra_arguments: []
  80. # List of systemd services that matrix_steam_bridge.service depends on.
  81. matrix_steam_bridge_systemd_required_services_list: "{{ matrix_steam_bridge_systemd_required_services_list_default + matrix_steam_bridge_systemd_required_services_list_auto + matrix_steam_bridge_systemd_required_services_list_custom }}"
  82. matrix_steam_bridge_systemd_required_services_list_default: "{{ [devture_systemd_docker_base_docker_service_name] if devture_systemd_docker_base_docker_service_name else [] }}"
  83. matrix_steam_bridge_systemd_required_services_list_auto: []
  84. matrix_steam_bridge_systemd_required_services_list_custom: []
  85. # List of systemd services that matrix_steam_bridge.service wants
  86. matrix_steam_bridge_systemd_wanted_services_list: []
  87. matrix_steam_bridge_appservice_token: ''
  88. matrix_steam_bridge_homeserver_token: ''
  89. # Whether or not created rooms should have federation enabled.
  90. # If false, created portal rooms will never be federated.
  91. matrix_steam_bridge_matrix_federate_rooms: false
  92. # Database-related configuration fields.
  93. #
  94. # To use Postgres:
  95. # - adjust your database credentials via the `matrix_steam_bridge_postgres_*` variables
  96. matrix_steam_bridge_database_engine: 'postgres'
  97. matrix_steam_bridge_database_username: 'matrix_steam_bridge'
  98. matrix_steam_bridge_database_password: 'some-password'
  99. matrix_steam_bridge_database_hostname: ''
  100. matrix_steam_bridge_database_port: 5432
  101. matrix_steam_bridge_database_name: 'matrix_steam_bridge'
  102. matrix_steam_bridge_database_sslmode: disable
  103. matrix_steam_bridge_database_connection_string: 'postgres://{{ matrix_steam_bridge_database_username }}:{{ matrix_steam_bridge_database_password }}@{{ matrix_steam_bridge_database_hostname }}:{{ matrix_steam_bridge_database_port }}/{{ matrix_steam_bridge_database_name }}?sslmode={{ matrix_steam_bridge_database_sslmode }}'
  104. matrix_steam_bridge_database_uri: "{{
  105. {
  106. 'postgres': matrix_steam_bridge_database_connection_string,
  107. }[matrix_steam_bridge_database_engine]
  108. }}"
  109. matrix_steam_bridge_double_puppet_secrets: "{{ matrix_steam_bridge_double_puppet_secrets_auto | combine(matrix_steam_bridge_double_puppet_secrets_custom) }}"
  110. matrix_steam_bridge_double_puppet_secrets_auto: {}
  111. matrix_steam_bridge_double_puppet_secrets_custom: {}
  112. matrix_steam_bridge_appservice_bot_username: steambot
  113. matrix_steam_bridge_appservice_bot_displayname: Steam bridge bot
  114. matrix_steam_bridge_appservice_bot_avatar: mxc://shadowdrake.org/EeNKAcrmByNubPwoyceQsBaN
  115. matrix_steam_bridge_backfill_enabled: true
  116. # Maximum number of messages to backfill in empty rooms
  117. matrix_steam_bridge_backfill_max_initial_messages: 50
  118. # Maximum number of missed messages to backfill after bridge restarts
  119. matrix_steam_bridge_backfill_max_catchup_messages: 500
  120. # Shared secret for authentication of provisioning API requests.
  121. # If set to "disable", the provisioning API will be disabled.
  122. matrix_steam_bridge_provisioning_shared_secret: disable
  123. # Minimum severity of journal log messages.
  124. # Valid values: fatal, error, warn, info, debug, trace
  125. matrix_steam_bridge_logging_level: 'warn'
  126. # Whether or not metrics endpoint should be enabled.
  127. # Enabling them is usually enough for a local (in-container) Prometheus to consume them.
  128. # If metrics need to be consumed by another (external) Prometheus server, consider exposing them via `matrix_steam_bridge_metrics_proxying_enabled`.
  129. matrix_steam_bridge_metrics_enabled: false
  130. # Controls whether metrics should be exposed on a public URL.
  131. matrix_steam_bridge_metrics_proxying_enabled: false
  132. matrix_steam_bridge_metrics_proxying_hostname: ''
  133. matrix_steam_bridge_metrics_proxying_path_prefix: ''
  134. # Default configuration template which covers the generic use case.
  135. # You can customize it by controlling the various variables inside it.
  136. #
  137. # For a more advanced customization, you can extend the default (see `matrix_steam_bridge_configuration_extension_yaml`)
  138. # or completely replace this variable with your own template.
  139. matrix_steam_bridge_configuration_yaml: "{{ lookup('template', 'templates/config.yaml.j2') }}"
  140. matrix_steam_bridge_configuration_extension_yaml: |
  141. # Your custom YAML configuration goes here.
  142. # This configuration extends the default starting configuration (`matrix_steam_bridge_configuration_yaml`).
  143. #
  144. # You can override individual variables from the default configuration, or introduce new ones.
  145. #
  146. # If you need something more special, you can take full control by
  147. # completely redefining `matrix_steam_bridge_configuration_yaml`.
  148. matrix_steam_bridge_configuration_extension: "{{ matrix_steam_bridge_configuration_extension_yaml | from_yaml if matrix_steam_bridge_configuration_extension_yaml | from_yaml is mapping else {} }}"
  149. # Holds the final configuration (a combination of the default and its extension).
  150. # You most likely don't need to touch this variable. Instead, see `matrix_steam_bridge_configuration_yaml`.
  151. matrix_steam_bridge_configuration: "{{ matrix_steam_bridge_configuration_yaml | from_yaml | combine(matrix_steam_bridge_configuration_extension, recursive=True) }}"
  152. matrix_steam_bridge_registration_yaml: |
  153. id: steam
  154. as_token: "{{ matrix_steam_bridge_appservice_token }}"
  155. hs_token: "{{ matrix_steam_bridge_homeserver_token }}"
  156. namespaces:
  157. users:
  158. - exclusive: true
  159. regex: '^@steam_.+:{{ matrix_steam_bridge_homeserver_domain | regex_escape }}$'
  160. - exclusive: true
  161. regex: '^@{{ matrix_steam_bridge_appservice_bot_username | regex_escape }}:{{ matrix_steam_bridge_homeserver_domain | regex_escape }}$'
  162. url: {{ matrix_steam_bridge_appservice_address }}
  163. sender_localpart: _bot_{{ matrix_steam_bridge_appservice_bot_username }}
  164. rate_limited: false
  165. de.sorunome.msc2409.push_ephemeral: true
  166. receive_ephemeral: true
  167. io.element.msc4190: {{ matrix_steam_bridge_msc4190_enabled | to_json }}
  168. matrix_steam_bridge_registration: "{{ matrix_steam_bridge_registration_yaml | from_yaml }}"
  169. # Enable End-to-bridge encryption
  170. matrix_steam_bridge_bridge_encryption_allow: "{{ matrix_bridges_encryption_enabled }}"
  171. matrix_steam_bridge_bridge_encryption_default: "{{ matrix_bridges_encryption_default }}"
  172. matrix_steam_bridge_bridge_encryption_require: false
  173. matrix_steam_bridge_bridge_encryption_appservice: false
  174. matrix_steam_bridge_bridge_encryption_key_sharing_allow: "{{ matrix_steam_bridge_bridge_encryption_allow }}"
  175. matrix_steam_bridge_bridge_encryption_pickle_key: mautrix.bridge.e2ee