Matrix Docker Ansible eploy
Não pode escolher mais do que 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
 
 

480 linhas
32 KiB

  1. # SPDX-FileCopyrightText: 2024 - 2025 Slavi Pantaleev
  2. # SPDX-FileCopyrightText: 2024 Suguru Hirahara
  3. #
  4. # SPDX-License-Identifier: AGPL-3.0-or-later
  5. ---
  6. # matrix-static-files is a role which generates and serves `/.well-known/matrix` files for the purposes of Matrix Delegation.
  7. # It also exposes some variables which allow this role to be used for serving additional files.
  8. matrix_static_files_enabled: true
  9. matrix_static_files_identifier: matrix-static-files
  10. # renovate: datasource=docker depName=joseluisq/static-web-server
  11. matrix_static_files_version: 2.44.0
  12. matrix_static_files_base_path: "{{ matrix_base_data_path }}/{{ 'static-files' if matrix_static_files_identifier == 'matrix-static-files' else matrix_static_files_identifier }}"
  13. matrix_static_files_config_path: "{{ matrix_static_files_base_path }}/config"
  14. matrix_static_files_public_path: "{{ matrix_static_files_base_path }}/public"
  15. matrix_static_files_public_well_known_path: "{{ matrix_static_files_public_path }}/.well-known"
  16. matrix_static_files_public_well_known_matrix_path: "{{ matrix_static_files_public_well_known_path }}/matrix"
  17. matrix_static_files_public_well_known_element_path: "{{ matrix_static_files_public_well_known_path }}/element"
  18. # List of systemd services that matrix-static-files.service depends on
  19. matrix_static_files_systemd_required_services_list: "{{ [devture_systemd_docker_base_docker_service_name] if devture_systemd_docker_base_docker_service_name else [] }}"
  20. # List of systemd services that matrix-static-files.service wants
  21. matrix_static_files_systemd_wanted_services_list: "{{ matrix_static_files_systemd_wanted_services_list_auto + matrix_static_files_systemd_wanted_services_list_custom }}"
  22. matrix_static_files_systemd_wanted_services_list_auto: []
  23. matrix_static_files_systemd_wanted_services_list_custom: []
  24. matrix_static_files_container_image: "{{ matrix_static_files_container_image_registry_prefix }}joseluisq/static-web-server:{{ matrix_static_files_container_image_tag }}"
  25. matrix_static_files_container_image_registry_prefix: "{{ matrix_static_files_container_image_registry_prefix_upstream }}"
  26. matrix_static_files_container_image_registry_prefix_upstream: "{{ matrix_static_files_container_image_registry_prefix_upstream_default }}"
  27. matrix_static_files_container_image_registry_prefix_upstream_default: "docker.io/"
  28. matrix_static_files_container_image_tag: "{{ 'latest' if matrix_static_files_version == 'latest' else (matrix_static_files_version + '-alpine') }}"
  29. matrix_static_files_container_network: "{{ matrix_static_files_identifier }}"
  30. # A list of additional container networks that matrix-static-files would be connected to.
  31. # The playbook does not create these networks, so make sure they already exist.
  32. matrix_static_files_container_additional_networks: []
  33. # Controls whether the matrix-static-files container exposes its HTTP port (tcp/8080 in the container).
  34. #
  35. # Takes an "<ip>:<port>" or "<port>" value (e.g. "127.0.0.1:8080"), or empty string to not expose.
  36. matrix_static_files_container_http_host_bind_port: ''
  37. # matrix_static_files_container_labels_traefik_enabled controls whether labels to assist a Traefik reverse-proxy will be attached to the container.
  38. # See `../templates/labels.j2` for details.
  39. #
  40. # To inject your own other container labels, see `matrix_static_files_container_labels_additional_labels`.
  41. matrix_static_files_container_labels_traefik_enabled: true
  42. matrix_static_files_container_labels_traefik_docker_network: "{{ matrix_static_files_container_network }}"
  43. matrix_static_files_container_labels_traefik_entrypoints: web-secure
  44. matrix_static_files_container_labels_traefik_tls_certResolver: default # noqa var-naming
  45. # Controls whether labels will be added that expose the `/.well-known/matrix` endpoint on the Matrix domain.
  46. matrix_static_files_container_labels_well_known_matrix_endpoint_enabled: true
  47. matrix_static_files_container_labels_well_known_matrix_endpoint_traefik_hostname: ''
  48. matrix_static_files_container_labels_well_known_matrix_endpoint_traefik_path_prefix: /.well-known/matrix
  49. matrix_static_files_container_labels_well_known_matrix_endpoint_traefik_rule: "Host(`{{ matrix_static_files_container_labels_well_known_matrix_endpoint_traefik_hostname }}`) && PathPrefix(`{{ matrix_static_files_container_labels_well_known_matrix_endpoint_traefik_path_prefix }}`)"
  50. matrix_static_files_container_labels_well_known_matrix_endpoint_traefik_priority: 0
  51. matrix_static_files_container_labels_well_known_matrix_endpoint_traefik_entrypoints: "{{ matrix_static_files_container_labels_traefik_entrypoints }}"
  52. matrix_static_files_container_labels_well_known_matrix_endpoint_traefik_tls: "{{ matrix_static_files_container_labels_well_known_matrix_endpoint_traefik_entrypoints != 'web' }}"
  53. matrix_static_files_container_labels_well_known_matrix_endpoint_traefik_tls_certResolver: "{{ matrix_static_files_container_labels_traefik_tls_certResolver }}" # noqa var-naming
  54. # Controls whether the compress middleware (https://doc.traefik.io/traefik/middlewares/http/compress/) will be enabled for this router.
  55. # The web-server only compresses known file types and our /.well-known/matrix/* files have no file extension.
  56. # As such, they are not being compressed there and we compress them at the Traefik level.
  57. matrix_static_files_container_labels_well_known_matrix_endpoint_middleware_compress_enabled: true
  58. matrix_static_files_container_labels_well_known_matrix_endpoint_middleware_compress_minResponseBodyBytes: 100 # noqa var-naming
  59. # Controls whether labels will be added that serve the base domain.
  60. #
  61. # This is similar to `matrix_static_files_container_labels_well_known_matrix_endpoint_*`, but does more.
  62. #
  63. # It's useful when you'd like to avoid setting up `/.well-known/matrix` redirects and can afford to point the base domain to the Matrix server.
  64. #
  65. # By default, these labels are configured to handle all paths for the provided base domain
  66. # (see `matrix_static_files_container_labels_base_domain_traefik_path_prefix`), not just the `/.well-known/matrix` prefix.
  67. #
  68. # By default, an index.html page is also served (see `matrix_static_files_file_index_html_enabled`).
  69. matrix_static_files_container_labels_base_domain_enabled: false
  70. matrix_static_files_container_labels_base_domain_traefik_hostname: ''
  71. matrix_static_files_container_labels_base_domain_traefik_path_prefix: /
  72. matrix_static_files_container_labels_base_domain_traefik_rule: "Host(`{{ matrix_static_files_container_labels_base_domain_traefik_hostname }}`){% if matrix_static_files_container_labels_base_domain_traefik_path_prefix != '/' %} && PathPrefix(`{{ matrix_static_files_container_labels_well_known_matrix_endpoint_traefik_path_prefix }}`){% endif %}"
  73. matrix_static_files_container_labels_base_domain_traefik_priority: 0
  74. matrix_static_files_container_labels_base_domain_traefik_entrypoints: "{{ matrix_static_files_container_labels_traefik_entrypoints }}"
  75. matrix_static_files_container_labels_base_domain_traefik_tls: "{{ matrix_static_files_container_labels_base_domain_traefik_entrypoints != 'web' }}"
  76. matrix_static_files_container_labels_base_domain_traefik_tls_certResolver: "{{ matrix_static_files_container_labels_traefik_tls_certResolver }}" # noqa var-naming
  77. # Controls whether the root path (/) at the base domain would respond with a redirect to some URL.
  78. matrix_static_files_container_labels_base_domain_root_path_redirection_enabled: false
  79. matrix_static_files_container_labels_base_domain_root_path_redirection_regex: "^{{ matrix_static_files_scheme }}://{{ matrix_static_files_container_labels_base_domain_traefik_hostname }}{{ matrix_static_files_container_labels_base_domain_traefik_path_prefix }}(\\?.*)?$"
  80. matrix_static_files_container_labels_base_domain_root_path_redirection_url: ""
  81. # matrix_static_files_container_labels_additional_labels contains a multiline string with additional labels to add to the container label file.
  82. # See `../templates/labels.j2` for details.
  83. #
  84. # Example:
  85. # matrix_static_files_container_labels_additional_labels: |
  86. # my.label=1
  87. # another.label="here"
  88. matrix_static_files_container_labels_additional_labels: ''
  89. # Controls the SERVER_PORT environment variable.
  90. # See: https://static-web-server.net/configuration/environment-variables/
  91. matrix_static_files_environment_variable_server_port: 8080
  92. # Controls the SERVER_LOG_LEVEL environment variable.
  93. # See: https://static-web-server.net/configuration/environment-variables/
  94. # Valid values: error, warn, info, debug or trace
  95. matrix_static_files_environment_variable_server_log_level: error
  96. # Controls the SERVER_LOG_REMOTE_ADDRESS environment variable.
  97. # See: https://static-web-server.net/configuration/environment-variables/
  98. matrix_static_files_environment_variable_server_log_remote_address: false
  99. # Controls the SERVER_CONFIG_FILE environment variable.
  100. # See: https://static-web-server.net/configuration/environment-variables/
  101. matrix_static_files_environment_variable_server_config_file: /config/config.toml
  102. # Controls the SERVER_IGNORE_HIDDEN_FILES environment variable.
  103. # See: https://static-web-server.net/configuration/environment-variables/
  104. matrix_static_files_environment_variable_server_ignore_hidden_files: false
  105. # Additional environment variables.
  106. matrix_static_files_environment_variables_additional_variables: ''
  107. # Controls the caching time (max-age property of the `Cache-Control` HTTP header) for all `/.well-known/matrix/*` files.
  108. # We use a somewhat long expires value is to prevent outages in case this is unreachable due to network failure
  109. # or due to the base domain's server completely dying.
  110. matrix_static_files_files_cache_time_hours: 4
  111. ########################################################################
  112. # #
  113. # Related to /.well-known/matrix/client #
  114. # #
  115. ########################################################################
  116. # Controls the m.homeserver/base_url property in the /.well-known/matrix/client file
  117. matrix_static_files_file_matrix_client_property_m_homeserver_base_url: "{{ matrix_homeserver_url }}"
  118. # Controls the m.identity_server/base_url property in the /.well-known/matrix/client file
  119. matrix_static_files_file_matrix_client_property_m_identity_server_base_url: "{{ matrix_identity_server_url }}"
  120. # Controls the m.integrations/managers/0/api_url property in the /.well-known/matrix/client file
  121. matrix_static_files_file_matrix_client_property_m_integrations_managers_api_url: "{{ matrix_integration_manager_rest_url }}"
  122. # Controls the m.integrations/managers/0/ui_url property in the /.well-known/matrix/client file
  123. matrix_static_files_file_matrix_client_property_m_integrations_managers_ui_url: "{{ matrix_integration_manager_ui_url }}"
  124. # Controls the io.element.jitsi/preferredDomain property in the /.well-known/matrix/client file
  125. # This specifies the domain name where a Jitsi server is self-hosted.
  126. # If set, `/.well-known/matrix/client` will suggest Element clients to use that Jitsi server.
  127. # See: https://github.com/element-hq/element-web/blob/develop/docs/jitsi.md#configuring-element-to-use-your-self-hosted-jitsi-server
  128. matrix_static_files_file_matrix_client_property_io_element_jitsi_preferred_domain: ""
  129. # Controls if the org.matrix.msc3575.authentication section of the /.well-known/matrix/client file is enabled.
  130. matrix_static_files_file_matrix_client_property_org_matrix_msc2965_authentication_enabled: false
  131. # Controls the org.matrix.msc2965.authentication/issuer property in the /.well-known/matrix/client file
  132. matrix_static_files_file_matrix_client_property_org_matrix_msc2965_authentication_issuer: ""
  133. # Controls the org.matrix.msc2965.authentication/account property in the /.well-known/matrix/client file
  134. matrix_static_files_file_matrix_client_property_org_matrix_msc2965_authentication_account: ""
  135. # Controls the org.matrix.msc3575.proxy/url (sliding sync) property in the /.well-known/matrix/client file
  136. matrix_static_files_file_matrix_client_property_org_matrix_msc3575_proxy_url: ""
  137. # Controls whether the m.tile_server configuration is added to the /.well-known/matrix/client file
  138. matrix_static_files_file_matrix_client_property_m_tile_server_entries_enabled: false
  139. # Controls the m.tile_server/map_style_url property in the /.well-known/matrix/client file
  140. matrix_static_files_file_matrix_client_property_m_tile_server_map_style_url: ""
  141. # Controls whether Element related entries (io.element.e2ee) should be added to the client well-known.
  142. # By default if any of the following change from their default this would be set to true:
  143. # - `matrix_static_files_file_matrix_client_property_io_element_e2ee_default`
  144. # - `matrix_static_files_file_matrix_client_property_io_element_e2ee_force_disable`
  145. matrix_static_files_file_matrix_client_property_io_element_e2ee_entries_enabled: "{{ not matrix_static_files_file_matrix_client_property_io_element_e2ee_default or matrix_static_files_file_matrix_client_property_io_element_e2ee_force_disable }}"
  146. # Controls the io.element.e2ee/default property in the /.well-known/matrix/client file,
  147. # which instructs Element clients whether they should use End-to-End Encryption by default.
  148. # Setting this to false will update `/.well-known/matrix/client` and tell Element clients to avoid E2EE.
  149. # See: https://github.com/element-hq/element-web/blob/develop/docs/e2ee.md
  150. matrix_static_files_file_matrix_client_property_io_element_e2ee_default: true
  151. # Controls the io.element.e2ee/force_disable property in the /.well-known/matrix/client file,
  152. # which can be set to `true` to instruct Element clients whether to disable End-to-End Encryption by default
  153. # and to not show encryption related-settings in room settings.
  154. # See: https://github.com/element-hq/element-web/blob/develop/docs/e2ee.md
  155. matrix_static_files_file_matrix_client_property_io_element_e2ee_force_disable: false
  156. # Controls whether `cc.etke.ketesa`-related entries should be added to the client well-known.
  157. # By default, if there are entries in `matrix_static_files_file_matrix_client_property_cc_etke_ketesa`, we show them (by enabling this).
  158. matrix_static_files_file_matrix_client_property_cc_etke_ketesa_enabled: "{{ matrix_static_files_file_matrix_client_property_cc_etke_ketesa | default({}) | dict2items | length > 0 }}"
  159. # Controls the cc.etke.ketesa property in the /.well-known/matrix/client file.
  160. matrix_static_files_file_matrix_client_property_cc_etke_ketesa: "{{ matrix_static_files_file_matrix_client_property_cc_etke_ketesa_auto | combine(matrix_static_files_file_matrix_client_property_cc_etke_ketesa_custom, recursive=True) }}"
  161. matrix_static_files_file_matrix_client_property_cc_etke_ketesa_auto: {}
  162. matrix_static_files_file_matrix_client_property_cc_etke_ketesa_custom: {}
  163. # The `org.matrix.msc4143.rtc_foci` property has been dropped from MSC4143 in favor of the homeserver's own RTC transports API,
  164. # but remains the only way to reach clients which cannot consult that API.
  165. # Element Call running as a widget (which is how Element Web and Element Desktop invoke it) is one such client,
  166. # because a widget holds no access token of its own and the API requires authentication.
  167. # Newer Element Call versions ask their host client for the transports over the widget API (MSC4515) instead,
  168. # so this property can go away once such versions are widely deployed.
  169. #
  170. # Controls whether `org.matrix.msc4143.rtc_foci`-related entries should be added to the client well-known.
  171. # By default, if there are entries in `matrix_static_files_file_matrix_client_property_org_matrix_msc4143_rtc_foci`, we show them (by enabling this).
  172. matrix_static_files_file_matrix_client_property_org_matrix_msc4143_rtc_foci_enabled: "{{ matrix_static_files_file_matrix_client_property_org_matrix_msc4143_rtc_foci | default({}) | dict2items | length > 0 }}"
  173. # Controls the org.matrix.msc4143.rtc_foci property in the /.well-known/matrix/client file.
  174. # See `matrix_static_files_file_matrix_client_property_org_matrix_msc4143_rtc_foci_enabled`
  175. matrix_static_files_file_matrix_client_property_org_matrix_msc4143_rtc_foci: "{{ matrix_static_files_file_matrix_client_property_org_matrix_msc4143_rtc_foci_auto + matrix_static_files_file_matrix_client_property_org_matrix_msc4143_rtc_foci_custom }}"
  176. matrix_static_files_file_matrix_client_property_org_matrix_msc4143_rtc_foci_auto: []
  177. matrix_static_files_file_matrix_client_property_org_matrix_msc4143_rtc_foci_custom: []
  178. # Default /.well-known/matrix/client configuration template which covers the generic use case.
  179. # You can customize it by controlling the various variables inside it.
  180. #
  181. # For a more advanced customization, you can extend the default (see `matrix_static_files_file_matrix_client_configuration_extension_json`)
  182. # or completely replace this variable with your own template.
  183. matrix_static_files_file_matrix_client_configuration_json: "{{ lookup('template', 'templates/public/.well-known/matrix/client.j2', convert_data=False) | from_json }}"
  184. # Your custom JSON configuration for /.well-known/matrix/client should go to `matrix_static_files_file_matrix_client_configuration_extension_json`.
  185. # This configuration extends the default starting configuration (`matrix_static_files_file_matrix_client_configuration_extension_json`).
  186. #
  187. # You can override individual variables from the default configuration, or introduce new ones.
  188. #
  189. # If you need something more special, you can take full control by
  190. # completely redefining `matrix_static_files_file_matrix_client_configuration_json`.
  191. #
  192. # Example configuration extension follows:
  193. #
  194. # matrix_static_files_file_matrix_client_configuration_extension_json: |
  195. # {
  196. # "m.another": "value",
  197. # "m.yet_another": 3
  198. # }
  199. matrix_static_files_file_matrix_client_configuration_extension_json: '{}'
  200. matrix_static_files_file_matrix_client_configuration_extension: "{{ matrix_static_files_file_matrix_client_configuration_extension_json | from_json if matrix_static_files_file_matrix_client_configuration_extension_json | from_json is mapping else {} }}"
  201. # Holds the final /.well-known/matrix/client configuration (a combination of the default and its extension).
  202. # You most likely don't need to touch this variable. Instead, see `matrix_static_files_file_matrix_client_configuration_json` or `matrix_static_files_file_matrix_client_configuration_extension_json`.
  203. matrix_static_files_file_matrix_client_configuration: "{{ matrix_static_files_file_matrix_client_configuration_json | combine(matrix_static_files_file_matrix_client_configuration_extension, recursive=True) }}"
  204. ########################################################################
  205. # #
  206. # /Related to /.well-known/matrix/client #
  207. # #
  208. ########################################################################
  209. ########################################################################
  210. # #
  211. # Related to /.well-known/matrix/server #
  212. # #
  213. ########################################################################
  214. # Controls whether a `/.well-known/matrix/server` file is generated and used at all.
  215. #
  216. # If you wish to rely on DNS SRV records only, you can disable this.
  217. # Using DNS SRV records implies that you'll be handling Matrix Federation API traffic (tcp/8448)
  218. # using certificates for the base domain (`matrix_domain`) and not for the
  219. # Matrix domain (`matrix_server_fqn_matrix`).
  220. matrix_static_files_file_matrix_server_enabled: true
  221. # Controls the m.server property in the /.well-known/matrix/server file
  222. matrix_static_files_file_matrix_server_property_m_server: ''
  223. # Default /.well-known/matrix/server configuration template which covers the generic use case.
  224. # You can customize it by controlling the various variables inside it.
  225. #
  226. # For a more advanced customization, you can extend the default (see `matrix_static_files_file_matrix_server_configuration_extension_json`)
  227. # or completely replace this variable with your own template.
  228. matrix_static_files_file_matrix_server_configuration_json: "{{ lookup('template', 'templates/public/.well-known/matrix/server.j2', convert_data=False) | from_json }}"
  229. # Your custom JSON configuration for /.well-known/matrix/server should go to `matrix_static_files_file_matrix_server_configuration_extension_json`.
  230. # This configuration extends the default starting configuration (`matrix_static_files_file_matrix_server_configuration_extension_json`).
  231. #
  232. # You can override individual variables from the default configuration, or introduce new ones.
  233. #
  234. # If you need something more special, you can take full control by
  235. # completely redefining `matrix_static_files_file_matrix_server_configuration_json`.
  236. #
  237. # Example configuration extension follows:
  238. #
  239. # matrix_static_files_file_matrix_server_configuration_extension_json: |
  240. # {
  241. # "m.another": "value",
  242. # "m.yet_another": 3
  243. # }
  244. matrix_static_files_file_matrix_server_configuration_extension_json: '{}'
  245. matrix_static_files_file_matrix_server_configuration_extension: "{{ matrix_static_files_file_matrix_server_configuration_extension_json | from_json if matrix_static_files_file_matrix_server_configuration_extension_json | from_json is mapping else {} }}"
  246. # Holds the final /.well-known/matrix/server configuration (a combination of the default and its extension).
  247. # You most likely don't need to touch this variable. Instead, see `matrix_static_files_file_matrix_server_configuration_json` or `matrix_static_files_file_matrix_server_configuration_extension_json`.
  248. matrix_static_files_file_matrix_server_configuration: "{{ matrix_static_files_file_matrix_server_configuration_json | combine(matrix_static_files_file_matrix_server_configuration_extension, recursive=True) }}"
  249. ########################################################################
  250. # #
  251. # /Related to /.well-known/matrix/server #
  252. # #
  253. ########################################################################
  254. ########################################################################
  255. # #
  256. # Related to /.well-known/matrix/support #
  257. # #
  258. ########################################################################
  259. # Controls whether a `/.well-known/matrix/support` file is generated and used at all.
  260. # For details about this file, see the spec: https://github.com/matrix-org/matrix-spec-proposals/pull/1929
  261. #
  262. # This is not enabled by default, as for it to be useful, other information is necessary.
  263. # See `matrix_static_files_file_matrix_support_property_m_contacts`, `matrix_static_files_file_matrix_support_property_m_support_page`, etc.
  264. matrix_static_files_file_matrix_support_enabled: false
  265. # Controls the m.contacts property in the /.well-known/matrix/support file
  266. matrix_static_files_file_matrix_support_property_m_contacts: []
  267. # Controls the m.support_page property in the /.well-known/matrix/support file
  268. matrix_static_files_file_matrix_support_property_m_support_page: ""
  269. # Default /.well-known/matrix/support configuration template which covers the generic use case.
  270. # You can customize it by controlling the various variables inside it.
  271. #
  272. # For a more advanced customization, you can extend the default (see `matrix_static_files_file_matrix_support_configuration_extension_json`)
  273. # or completely replace this variable with your own template.
  274. matrix_static_files_file_matrix_support_configuration_json: "{{ lookup('template', 'templates/public/.well-known/matrix/support.j2', convert_data=False) | from_json }}"
  275. # Your custom JSON configuration for /.well-known/matrix/support should go to `matrix_static_files_file_matrix_support_configuration_extension_json`.
  276. # This configuration extends the default starting configuration (`matrix_static_files_file_matrix_support_configuration_extension_json`).
  277. #
  278. # You can override individual variables from the default configuration, or introduce new ones.
  279. #
  280. # If you need something more special, you can take full control by
  281. # completely redefining `matrix_static_files_file_matrix_support_configuration_json`.
  282. #
  283. # Example configuration extension follows:
  284. #
  285. # matrix_static_files_file_matrix_support_configuration_extension_json: |
  286. # {
  287. # "m.another": "value",
  288. # "m.yet_another": 3
  289. # }
  290. matrix_static_files_file_matrix_support_configuration_extension_json: '{}'
  291. matrix_static_files_file_matrix_support_configuration_extension: "{{ matrix_static_files_file_matrix_support_configuration_extension_json | from_json if matrix_static_files_file_matrix_support_configuration_extension_json | from_json is mapping else {} }}"
  292. # Holds the final /.well-known/matrix/support configuration (a combination of the default and its extension).
  293. # You most likely don't need to touch this variable. Instead, see `matrix_static_files_file_matrix_support_configuration_json` or `matrix_static_files_file_matrix_support_configuration_extension_json`.
  294. matrix_static_files_file_matrix_support_configuration: "{{ matrix_static_files_file_matrix_support_configuration_json | combine(matrix_static_files_file_matrix_support_configuration_extension, recursive=True) }}"
  295. ########################################################################
  296. # #
  297. # /Related to /.well-known/matrix/support #
  298. # #
  299. ########################################################################
  300. ########################################################################
  301. # #
  302. # Related to /.well-known/matrix/mautrix #
  303. # #
  304. ########################################################################
  305. # Controls whether a `/.well-known/matrix/mautrix` file is generated and used at all.
  306. # This file allows tools like Mautrix Manager (https://github.com/mautrix/manager) to auto-discover the bridges hosted on this server.
  307. # By default, it's enabled only when there's something to advertise (see `matrix_static_files_file_matrix_mautrix_property_fi_mau_bridges`).
  308. matrix_static_files_file_matrix_mautrix_enabled: "{{ matrix_static_files_file_matrix_mautrix_property_fi_mau_bridges | length > 0 }}"
  309. # Controls the fi.mau.bridges property in the /.well-known/matrix/mautrix file.
  310. # This is a list of base URLs for bridges hosted on (and connected to) this server.
  311. matrix_static_files_file_matrix_mautrix_property_fi_mau_bridges: "{{ matrix_static_files_file_matrix_mautrix_property_fi_mau_bridges_auto + matrix_static_files_file_matrix_mautrix_property_fi_mau_bridges_custom }}"
  312. matrix_static_files_file_matrix_mautrix_property_fi_mau_bridges_auto: []
  313. matrix_static_files_file_matrix_mautrix_property_fi_mau_bridges_custom: []
  314. # Default /.well-known/matrix/mautrix configuration template which covers the generic use case.
  315. # You can customize it by controlling the various variables inside it.
  316. #
  317. # For a more advanced customization, you can extend the default (see `matrix_static_files_file_matrix_mautrix_configuration_extension_json`)
  318. # or completely replace this variable with your own template.
  319. matrix_static_files_file_matrix_mautrix_configuration_json: "{{ lookup('template', 'templates/public/.well-known/matrix/mautrix.j2', convert_data=False) | from_json }}"
  320. # Your custom JSON configuration for /.well-known/matrix/mautrix should go to `matrix_static_files_file_matrix_mautrix_configuration_extension_json`.
  321. # This configuration extends the default starting configuration (`matrix_static_files_file_matrix_mautrix_configuration_extension_json`).
  322. #
  323. # You can override individual variables from the default configuration, or introduce new ones.
  324. #
  325. # If you need something more special, you can take full control by
  326. # completely redefining `matrix_static_files_file_matrix_mautrix_configuration_json`.
  327. #
  328. # Example configuration extension follows:
  329. #
  330. # matrix_static_files_file_matrix_mautrix_configuration_extension_json: |
  331. # {
  332. # "fi.mau.external_bridge_servers": ["https://bridges.example.com"]
  333. # }
  334. matrix_static_files_file_matrix_mautrix_configuration_extension_json: '{}'
  335. matrix_static_files_file_matrix_mautrix_configuration_extension: "{{ matrix_static_files_file_matrix_mautrix_configuration_extension_json | from_json if matrix_static_files_file_matrix_mautrix_configuration_extension_json | from_json is mapping else {} }}"
  336. # Holds the final /.well-known/matrix/mautrix configuration (a combination of the default and its extension).
  337. # You most likely don't need to touch this variable. Instead, see `matrix_static_files_file_matrix_mautrix_configuration_json` or `matrix_static_files_file_matrix_mautrix_configuration_extension_json`.
  338. matrix_static_files_file_matrix_mautrix_configuration: "{{ matrix_static_files_file_matrix_mautrix_configuration_json | combine(matrix_static_files_file_matrix_mautrix_configuration_extension, recursive=True) }}"
  339. ########################################################################
  340. # #
  341. # /Related to /.well-known/matrix/mautrix #
  342. # #
  343. ########################################################################
  344. ########################################################################
  345. # #
  346. # Related to index.html #
  347. # #
  348. ########################################################################
  349. # Controls whether `matrix_static_files_file_index_html_template` would be dumped to an `index.html` file
  350. # in the public directory (matrix_static_files_public_path).
  351. #
  352. # This is useful if you have enabled serving of the base domain (matrix_static_files_container_labels_base_domain_enabled)
  353. # and wish to serve more than just the `/.well-known/matrix` files from it.
  354. #
  355. # You can also use the auxiliary role (https://github.com/mother-of-all-self-hosting/ansible-role-aux) to create files in
  356. # the public directory (matrix_static_files_public_path) by yourself.
  357. # If you're disabling this but are preparing some HTML files by yourself,
  358. # consider explicitly disabling `matrix_static_files_container_labels_base_domain_root_path_redirection_enabled` as well.
  359. # The default behavior when this is disabled is to enable root-path-redirection.
  360. #
  361. # Because you may wish to manage these static files yourself, disabling this variable will intentionally not delete an already existing `index.html` file.
  362. matrix_static_files_file_index_html_enabled: "{{ matrix_static_files_container_labels_base_domain_enabled }}"
  363. matrix_static_files_file_index_html_template: |-
  364. <!doctype html>
  365. <meta charset="utf-8" />
  366. <html>
  367. <body>
  368. Hello from {{ matrix_static_files_container_labels_base_domain_traefik_hostname }}!
  369. </body>
  370. </html>
  371. ########################################################################
  372. # #
  373. # /Related to /index.html #
  374. # #
  375. ########################################################################
  376. matrix_static_files_scheme: https
  377. # Controls whether the self-check feature should validate SSL certificates.
  378. matrix_static_files_self_check_validate_certificates: "{{ matrix_static_files_scheme == 'https' }}"
  379. matrix_static_files_self_check_hostname_matrix: ''
  380. matrix_static_files_self_check_hostname_identity: ''
  381. # Controls whether redirects will be followed when checking the `/.well-known/matrix/client` resource.
  382. #
  383. # As per the spec (https://matrix.org/docs/spec/client_server/r0.6.0#well-known-uri), it shouldn't be,
  384. # so we default to not following redirects as well.
  385. matrix_static_files_self_check_well_known_matrix_client_follow_redirects: none
  386. # matrix_static_files_restart_necessary controls whether the service
  387. # will be restarted (when true) or merely started (when false) by the
  388. # systemd service manager role (when conditional restart is enabled).
  389. #
  390. # This value is automatically computed during installation based on whether
  391. # any configuration files, the systemd service file, or the container image changed.
  392. # The default of `false` means "no restart needed" — appropriate when the role's
  393. # installation tasks haven't run (e.g., due to --tags skipping them).
  394. matrix_static_files_restart_necessary: false