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.
 
 

471 lines
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.36.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_image_force_pull: "{{ matrix_static_files_container_image.endswith(':latest') }}"
  30. matrix_static_files_container_network: "{{ matrix_static_files_identifier }}"
  31. # A list of additional container networks that matrix-static-files would be connected to.
  32. # The playbook does not create these networks, so make sure they already exist.
  33. matrix_static_files_container_additional_networks: []
  34. # Controls whether the matrix-static-files container exposes its HTTP port (tcp/8080 in the container).
  35. #
  36. # Takes an "<ip>:<port>" or "<port>" value (e.g. "127.0.0.1:8080"), or empty string to not expose.
  37. matrix_static_files_container_http_host_bind_port: ''
  38. # matrix_static_files_container_labels_traefik_enabled controls whether labels to assist a Traefik reverse-proxy will be attached to the container.
  39. # See `../templates/labels.j2` for details.
  40. #
  41. # To inject your own other container labels, see `matrix_static_files_container_labels_additional_labels`.
  42. matrix_static_files_container_labels_traefik_enabled: true
  43. matrix_static_files_container_labels_traefik_docker_network: "{{ matrix_static_files_container_network }}"
  44. matrix_static_files_container_labels_traefik_entrypoints: web-secure
  45. matrix_static_files_container_labels_traefik_tls_certResolver: default # noqa var-naming
  46. # Controls whether labels will be added that expose the well-known public endpoint on the Matrix domain.
  47. matrix_static_files_container_labels_well_known_matrix_endpoint_enabled: true
  48. matrix_static_files_container_labels_well_known_matrix_endpoint_traefik_hostname: ''
  49. matrix_static_files_container_labels_well_known_matrix_endpoint_traefik_path_prefix: /.well-known/matrix
  50. 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 }}`)"
  51. matrix_static_files_container_labels_well_known_matrix_endpoint_traefik_priority: 0
  52. matrix_static_files_container_labels_well_known_matrix_endpoint_traefik_entrypoints: "{{ matrix_static_files_container_labels_traefik_entrypoints }}"
  53. matrix_static_files_container_labels_well_known_matrix_endpoint_traefik_tls: "{{ matrix_static_files_container_labels_well_known_matrix_endpoint_traefik_entrypoints != 'web' }}"
  54. matrix_static_files_container_labels_well_known_matrix_endpoint_traefik_tls_certResolver: "{{ matrix_static_files_container_labels_traefik_tls_certResolver }}" # noqa var-naming
  55. # Controls whether the compress middleware (https://doc.traefik.io/traefik/middlewares/http/compress/) will be enabled for this router.
  56. # The web-server only compresses known file types and our /.well-known/matrix/* files have no file extension.
  57. # As such, they are not being compressed there and we compress them at the Traefik level.
  58. matrix_static_files_container_labels_well_known_matrix_endpoint_middleware_compress_enabled: true
  59. matrix_static_files_container_labels_well_known_matrix_endpoint_middleware_compress_minResponseBodyBytes: 100 # noqa var-naming
  60. # Controls whether labels will be added that serve the base domain.
  61. #
  62. # This is similar to `matrix_static_files_container_labels_well_known_matrix_endpoint_*`, but does more.
  63. #
  64. # 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.
  65. #
  66. # By default, these labels are configured to handle all paths for the provided base domain
  67. # (see `matrix_static_files_container_labels_base_domain_traefik_path_prefix`), not just the `/.well-known/matrix` prefix.
  68. #
  69. # By default, an index.html page is also served (see `matrix_static_files_file_index_html_enabled`).
  70. matrix_static_files_container_labels_base_domain_enabled: false
  71. matrix_static_files_container_labels_base_domain_traefik_hostname: ''
  72. matrix_static_files_container_labels_base_domain_traefik_path_prefix: /
  73. 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 %}"
  74. matrix_static_files_container_labels_base_domain_traefik_priority: 0
  75. matrix_static_files_container_labels_base_domain_traefik_entrypoints: "{{ matrix_static_files_container_labels_traefik_entrypoints }}"
  76. matrix_static_files_container_labels_base_domain_traefik_tls: "{{ matrix_static_files_container_labels_base_domain_traefik_entrypoints != 'web' }}"
  77. matrix_static_files_container_labels_base_domain_traefik_tls_certResolver: "{{ matrix_static_files_container_labels_traefik_tls_certResolver }}" # noqa var-naming
  78. # Controls whether the root path (/) at the base domain would respond with a redirect to some URL.
  79. matrix_static_files_container_labels_base_domain_root_path_redirection_enabled: false
  80. 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 }}(\\?.*)?$"
  81. matrix_static_files_container_labels_base_domain_root_path_redirection_url: ""
  82. # matrix_static_files_container_labels_additional_labels contains a multiline string with additional labels to add to the container label file.
  83. # See `../templates/labels.j2` for details.
  84. #
  85. # Example:
  86. # matrix_static_files_container_labels_additional_labels: |
  87. # my.label=1
  88. # another.label="here"
  89. matrix_static_files_container_labels_additional_labels: ''
  90. # Controls the SERVER_PORT environment variable.
  91. # See: https://static-web-server.net/configuration/environment-variables/
  92. matrix_static_files_environment_variable_server_port: 8080
  93. # Controls the SERVER_LOG_LEVEL environment variable.
  94. # See: https://static-web-server.net/configuration/environment-variables/
  95. # Valid values: error, warn, info, debug or trace
  96. matrix_static_files_environment_variable_server_log_level: error
  97. # Controls the SERVER_LOG_REMOTE_ADDRESS environment variable.
  98. # See: https://static-web-server.net/configuration/environment-variables/
  99. matrix_static_files_environment_variable_server_log_remote_address: false
  100. # Controls the SERVER_CONFIG_FILE environment variable.
  101. # See: https://static-web-server.net/configuration/environment-variables/
  102. matrix_static_files_environment_variable_server_config_file: /config/config.toml
  103. # Additional environment variables.
  104. matrix_static_files_environment_variables_additional_variables: ''
  105. # Controls the caching time (max-age property of the `Cache-Control` HTTP header) for all `/.well-known/matrix/*` files.
  106. # We use a somewhat long expires value is to prevent outages in case this is unreachable due to network failure
  107. # or due to the base domain's server completely dying.
  108. matrix_static_files_files_cache_time_hours: 4
  109. ########################################################################
  110. # #
  111. # Related to /.well-known/matrix/client #
  112. # #
  113. ########################################################################
  114. # Controls the m.homeserver/base_url property in the /.well-known/matrix/client file
  115. matrix_static_files_file_matrix_client_property_m_homeserver_base_url: "{{ matrix_homeserver_url }}"
  116. # Controls the m.identity_server/base_url property in the /.well-known/matrix/client file
  117. matrix_static_files_file_matrix_client_property_m_identity_server_base_url: "{{ matrix_identity_server_url }}"
  118. # Controls the m.integrations/managers/0/api_url property in the /.well-known/matrix/client file
  119. matrix_static_files_file_matrix_client_property_m_integrations_managers_api_url: "{{ matrix_integration_manager_rest_url }}"
  120. # Controls the m.integrations/managers/0/ui_url property in the /.well-known/matrix/client file
  121. matrix_static_files_file_matrix_client_property_m_integrations_managers_ui_url: "{{ matrix_integration_manager_ui_url }}"
  122. # Controls the io.element.jitsi/preferredDomain property in the /.well-known/matrix/client file
  123. # This specifies the domain name where a Jitsi server is self-hosted.
  124. # If set, `/.well-known/matrix/client` will suggest Element clients to use that Jitsi server.
  125. # See: https://github.com/element-hq/element-web/blob/develop/docs/jitsi.md#configuring-element-to-use-your-self-hosted-jitsi-server
  126. matrix_static_files_file_matrix_client_property_io_element_jitsi_preferred_domain: ""
  127. # Controls if the org.matrix.msc3575.authentication section of the /.well-known/matrix/client file is enabled.
  128. matrix_static_files_file_matrix_client_property_org_matrix_msc2965_authentication_enabled: false
  129. # Controls the org.matrix.msc2965.authentication/issuer property in the /.well-known/matrix/client file
  130. matrix_static_files_file_matrix_client_property_org_matrix_msc2965_authentication_issuer: ""
  131. # Controls the org.matrix.msc2965.authentication/account property in the /.well-known/matrix/client file
  132. matrix_static_files_file_matrix_client_property_org_matrix_msc2965_authentication_account: ""
  133. # Controls the org.matrix.msc3575.proxy/url (sliding sync) property in the /.well-known/matrix/client file
  134. matrix_static_files_file_matrix_client_property_org_matrix_msc3575_proxy_url: ""
  135. # Controls whether the m.tile_server configuration is added to the /.well-known/matrix/client file
  136. matrix_static_files_file_matrix_client_property_m_tile_server_entries_enabled: false
  137. # Controls the m.tile_server/map_style_url property in the /.well-known/matrix/client file
  138. matrix_static_files_file_matrix_client_property_m_tile_server_map_style_url: ""
  139. # Controls whether Element related entries (io.element.e2ee) should be added to the client well-known.
  140. # By default if any of the following change from their default this would be set to true:
  141. # `matrix_static_files_file_matrix_client_property_io_element_e2ee_default`
  142. # `matrix_static_files_file_matrix_client_property_io_element_e2ee_secure_backup_required`
  143. # `matrix_static_files_file_matrix_client_property_io_element_e2ee_secure_backup_setup_methods`
  144. 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_secure_backup_required or matrix_static_files_file_matrix_client_property_io_element_e2ee_secure_backup_setup_methods | length > 0 }}"
  145. # Controls the io.element.e2ee/default property in the /.well-known/matrix/client file,
  146. # which instructs Element clients whether they should use End-to-End Encryption by default.
  147. # Setting this to false will update `/.well-known/matrix/client` and tell Element clients to avoid E2EE.
  148. # See: https://github.com/element-hq/element-web/blob/develop/docs/e2ee.md
  149. matrix_static_files_file_matrix_client_property_io_element_e2ee_default: true
  150. # Controls the io.element.e2ee/secure_backup_required property in the /.well-known/matrix/client file,
  151. # which instructs Element clients whether they should require a secure backup set up before they can be used.
  152. # Setting this to true will update `/.well-known/matrix/client` and tell Element clients require a secure backup.
  153. # See: https://github.com/element-hq/element-web/blob/develop/docs/e2ee.md
  154. matrix_static_files_file_matrix_client_property_io_element_e2ee_secure_backup_required: false
  155. # Controls the io.element.e2ee/secure_backup_setup_methods property in the /.well-known/matrix/client file,
  156. # which instructs Element clients which backup methods from ["key", "passphrase"] should be used.
  157. # When an empty list is provided, Element clients default to using both.
  158. # Setting this to other than empty will update `/.well-known/matrix/client` and tell Element clients which method to use.
  159. # See: https://github.com/element-hq/element-web/blob/develop/docs/e2ee.md
  160. matrix_static_files_file_matrix_client_property_io_element_e2ee_secure_backup_setup_methods: []
  161. # Controls the io.element.e2ee/force_disable property in the /.well-known/matrix/client file,
  162. # which can be set to `true` to instruct Element clients whether to disable End-to-End Encryption by default
  163. # and to not show encryption related-settings in room settings.
  164. # See: https://github.com/element-hq/element-web/blob/develop/docs/e2ee.md
  165. matrix_static_files_file_matrix_client_property_io_element_e2ee_force_disable: false
  166. # Controls whether `cc.etke.synapse-admin`-related entries should be added to the client well-known.
  167. # By default, if there are entries in `matrix_static_files_file_matrix_client_property_cc_etke_synapse_admin`, we show them (by enabling this).
  168. matrix_static_files_file_matrix_client_property_cc_etke_synapse_admin_enabled: "{{ matrix_static_files_file_matrix_client_property_cc_etke_synapse_admin | default({}) | dict2items | length > 0 }}"
  169. # Controls the cc.etke.synapse-admin property in the /.well-known/matrix/client file.
  170. # See `matrix_static_files_file_matrix_client_property_cc_etke_synapse_admin_entries_enabled`
  171. matrix_static_files_file_matrix_client_property_cc_etke_synapse_admin: "{{ matrix_static_files_file_matrix_client_property_cc_etke_synapse_admin_auto | combine(matrix_static_files_file_matrix_client_property_cc_etke_synapse_admin_custom, recursive=True) }}"
  172. matrix_static_files_file_matrix_client_property_cc_etke_synapse_admin_auto: {}
  173. matrix_static_files_file_matrix_client_property_cc_etke_synapse_admin_custom: {}
  174. # Controls whether `org.matrix.msc4143.rtc_foci`-related entries should be added to the client well-known.
  175. # 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).
  176. 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 }}"
  177. # Controls the org.matrix.msc4143.rtc_foci property in the /.well-known/matrix/client file.
  178. # See `matrix_static_files_file_matrix_client_property_org_matrix_msc4143_rtc_foci_enabled`
  179. 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 | combine(matrix_static_files_file_matrix_client_property_org_matrix_msc4143_rtc_foci_custom, recursive=True) }}"
  180. matrix_static_files_file_matrix_client_property_org_matrix_msc4143_rtc_foci_auto: {}
  181. matrix_static_files_file_matrix_client_property_org_matrix_msc4143_rtc_foci_custom: {}
  182. # Default /.well-known/matrix/client configuration template which covers the generic use case.
  183. # You can customize it by controlling the various variables inside it.
  184. #
  185. # For a more advanced customization, you can extend the default (see `matrix_static_files_file_matrix_client_configuration_extension_json`)
  186. # or completely replace this variable with your own template.
  187. matrix_static_files_file_matrix_client_configuration_json: "{{ lookup('template', 'templates/public/.well-known/matrix/client.j2') }}"
  188. # Your custom JSON configuration for /.well-known/matrix/client should go to `matrix_static_files_file_matrix_client_configuration_extension_json`.
  189. # This configuration extends the default starting configuration (`matrix_static_files_file_matrix_client_configuration_extension_json`).
  190. #
  191. # You can override individual variables from the default configuration, or introduce new ones.
  192. #
  193. # If you need something more special, you can take full control by
  194. # completely redefining `matrix_static_files_file_matrix_client_configuration_json`.
  195. #
  196. # Example configuration extension follows:
  197. #
  198. # matrix_static_files_file_matrix_client_configuration_extension_json: |
  199. # {
  200. # "m.another": "value",
  201. # "m.yet_another": 3
  202. # }
  203. matrix_static_files_file_matrix_client_configuration_extension_json: '{}'
  204. 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 {} }}"
  205. # Holds the final /.well-known/matrix/client configuration (a combination of the default and its extension).
  206. # 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`.
  207. 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) }}"
  208. ########################################################################
  209. # #
  210. # /Related to /.well-known/matrix/client #
  211. # #
  212. ########################################################################
  213. ########################################################################
  214. # #
  215. # Related to /.well-known/matrix/server #
  216. # #
  217. ########################################################################
  218. # Controls whether a `/.well-known/matrix/server` file is generated and used at all.
  219. #
  220. # If you wish to rely on DNS SRV records only, you can disable this.
  221. # Using DNS SRV records implies that you'll be handling Matrix Federation API traffic (tcp/8448)
  222. # using certificates for the base domain (`matrix_domain`) and not for the
  223. # Matrix domain (`matrix_server_fqn_matrix`).
  224. matrix_static_files_file_matrix_server_enabled: true
  225. # Controls the m.server property in the /.well-known/matrix/server file
  226. matrix_static_files_file_matrix_server_property_m_server: ''
  227. # Default /.well-known/matrix/server configuration template which covers the generic use case.
  228. # You can customize it by controlling the various variables inside it.
  229. #
  230. # For a more advanced customization, you can extend the default (see `matrix_static_files_file_matrix_server_configuration_extension_json`)
  231. # or completely replace this variable with your own template.
  232. matrix_static_files_file_matrix_server_configuration_json: "{{ lookup('template', 'templates/public/.well-known/matrix/server.j2') }}"
  233. # Your custom JSON configuration for /.well-known/matrix/server should go to `matrix_static_files_file_matrix_server_configuration_extension_json`.
  234. # This configuration extends the default starting configuration (`matrix_static_files_file_matrix_server_configuration_extension_json`).
  235. #
  236. # You can override individual variables from the default configuration, or introduce new ones.
  237. #
  238. # If you need something more special, you can take full control by
  239. # completely redefining `matrix_static_files_file_matrix_server_configuration_json`.
  240. #
  241. # Example configuration extension follows:
  242. #
  243. # matrix_static_files_file_matrix_server_configuration_extension_json: |
  244. # {
  245. # "m.another": "value",
  246. # "m.yet_another": 3
  247. # }
  248. matrix_static_files_file_matrix_server_configuration_extension_json: '{}'
  249. 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 {} }}"
  250. # Holds the final /.well-known/matrix/server configuration (a combination of the default and its extension).
  251. # 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`.
  252. 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) }}"
  253. ########################################################################
  254. # #
  255. # /Related to /.well-known/matrix/server #
  256. # #
  257. ########################################################################
  258. ########################################################################
  259. # #
  260. # Related to /.well-known/matrix/support #
  261. # #
  262. ########################################################################
  263. # Controls whether a `/.well-known/matrix/support` file is generated and used at all.
  264. # For details about this file, see the spec: https://github.com/matrix-org/matrix-spec-proposals/pull/1929
  265. #
  266. # This is not enabled by default, as for it to be useful, other information is necessary.
  267. # See `matrix_static_files_file_matrix_support_property_m_contacts`, `matrix_static_files_file_matrix_support_property_m_support_page`, etc.
  268. matrix_static_files_file_matrix_support_enabled: false
  269. # Controls the m.contacts property in the /.well-known/matrix/support file
  270. matrix_static_files_file_matrix_support_property_m_contacts: []
  271. # Controls the m.support_page property in the /.well-known/matrix/support file
  272. matrix_static_files_file_matrix_support_property_m_support_page: ""
  273. # Default /.well-known/matrix/support configuration template which covers the generic use case.
  274. # You can customize it by controlling the various variables inside it.
  275. #
  276. # For a more advanced customization, you can extend the default (see `matrix_static_files_file_matrix_support_configuration_extension_json`)
  277. # or completely replace this variable with your own template.
  278. matrix_static_files_file_matrix_support_configuration_json: "{{ lookup('template', 'templates/public/.well-known/matrix/support.j2') }}"
  279. # Your custom JSON configuration for /.well-known/matrix/support should go to `matrix_static_files_file_matrix_support_configuration_extension_json`.
  280. # This configuration extends the default starting configuration (`matrix_static_files_file_matrix_support_configuration_extension_json`).
  281. #
  282. # You can override individual variables from the default configuration, or introduce new ones.
  283. #
  284. # If you need something more special, you can take full control by
  285. # completely redefining `matrix_static_files_file_matrix_support_configuration_json`.
  286. #
  287. # Example configuration extension follows:
  288. #
  289. # matrix_static_files_file_matrix_support_configuration_extension_json: |
  290. # {
  291. # "m.another": "value",
  292. # "m.yet_another": 3
  293. # }
  294. matrix_static_files_file_matrix_support_configuration_extension_json: '{}'
  295. 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 {} }}"
  296. # Holds the final /.well-known/matrix/support configuration (a combination of the default and its extension).
  297. # 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`.
  298. 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) }}"
  299. ########################################################################
  300. # #
  301. # /Related to /.well-known/matrix/support #
  302. # #
  303. ########################################################################
  304. ########################################################################
  305. # #
  306. # Related to /.well-known/element/element.json #
  307. # #
  308. ########################################################################
  309. # Controls whether a `/.well-known/element/element.json` file is generated and used at all.
  310. matrix_static_files_file_element_element_json_enabled: true
  311. # Controls the call.widget_url property in the /.well-known/element/element.json file
  312. matrix_static_files_file_element_element_json_property_call_widget_url: ''
  313. # Default /.well-known/element/element.json configuration template which covers the generic use case.
  314. # You can customize it by controlling the various variables inside it.
  315. #
  316. # For a more advanced customization, you can extend the default (see `matrix_static_files_file_matrix_support_configuration_extension_json`)
  317. # or completely replace this variable with your own template.
  318. matrix_static_files_file_element_element_json_configuration_json: "{{ lookup('template', 'templates/public/.well-known/element/element.json.j2') }}"
  319. # Your custom JSON configuration for /.well-known/element/element.json should go to `matrix_static_files_file_element_element_json_configuration_extension_json`.
  320. # This configuration extends the default starting configuration (`matrix_static_files_file_matrix_support_configuration_extension_json`).
  321. #
  322. # You can override individual variables from the default configuration, or introduce new ones.
  323. #
  324. # If you need something more special, you can take full control by
  325. # completely redefining `matrix_static_files_file_matrix_support_configuration_json`.
  326. #
  327. # Example configuration extension follows:
  328. #
  329. # matrix_static_files_file_element_element_json_configuration_extension_json: |
  330. # {
  331. # "call": {
  332. # "url": "value"
  333. # }
  334. # }
  335. matrix_static_files_file_element_element_json_configuration_extension_json: '{}'
  336. matrix_static_files_file_element_element_json_configuration_extension: "{{ matrix_static_files_file_element_element_json_configuration_extension_json | from_json if matrix_static_files_file_element_element_json_configuration_extension_json | from_json is mapping else {} }}"
  337. # Holds the final /.well-known/matrix/support configuration (a combination of the default and its extension).
  338. # You most likely don't need to touch this variable. Instead, see `matrix_static_files_file_element_element_json_configuration_json` or `matrix_static_files_file_element_element_json_configuration_extension_json`.
  339. matrix_static_files_file_element_element_json_configuration: "{{ matrix_static_files_file_element_element_json_configuration_json | combine(matrix_static_files_file_element_element_json_configuration_extension, recursive=True) }}"
  340. ########################################################################
  341. # #
  342. # /Related to /.well-known/element/element.json #
  343. # #
  344. ########################################################################
  345. ########################################################################
  346. # #
  347. # Related to index.html #
  348. # #
  349. ########################################################################
  350. # Controls whether `matrix_static_files_file_index_html_template` would be dumped to an `index.html` file
  351. # in the public directory (matrix_static_files_public_path).
  352. #
  353. # This is useful if you have enabled serving of the base domain (matrix_static_files_container_labels_base_domain_enabled)
  354. # and wish to serve more than just the `/.well-known/matrix` files from it.
  355. #
  356. # You can also use the auxiliary role (https://github.com/mother-of-all-self-hosting/ansible-role-aux) to create files in
  357. # the public directory (matrix_static_files_public_path) by yourself.
  358. # If you're disabling this but are preparing some HTML files by yourself,
  359. # consider explicitly disabling `matrix_static_files_container_labels_base_domain_root_path_redirection_enabled` as well.
  360. # The default behavior when this is disabled is to enable root-path-redirection.
  361. #
  362. # Because you may wish to manage these static files yourself, disabling this variable will intentionally not delete an already existing `index.html` file.
  363. matrix_static_files_file_index_html_enabled: "{{ matrix_static_files_container_labels_base_domain_enabled }}"
  364. matrix_static_files_file_index_html_template: |-
  365. <!doctype html>
  366. <meta charset="utf-8" />
  367. <html>
  368. <body>
  369. Hello from {{ matrix_static_files_container_labels_base_domain_traefik_hostname }}!
  370. </body>
  371. </html>
  372. ########################################################################
  373. # #
  374. # /Related to /index.html #
  375. # #
  376. ########################################################################
  377. matrix_static_files_scheme: https
  378. # Controls whether the self-check feature should validate SSL certificates.
  379. matrix_static_files_self_check_validate_certificates: "{{ matrix_static_files_scheme == 'https' }}"
  380. matrix_static_files_self_check_hostname_matrix: ''
  381. matrix_static_files_self_check_hostname_identity: ''
  382. # Controls whether redirects will be followed when checking the `/.well-known/matrix/client` resource.
  383. #
  384. # As per the spec (https://matrix.org/docs/spec/client_server/r0.6.0#well-known-uri), it shouldn't be,
  385. # so we default to not following redirects as well.
  386. matrix_static_files_self_check_well_known_matrix_client_follow_redirects: none