Matrix Docker Ansible eploy
Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.
 
 
 

6741 righe
367 KiB

  1. ---
  2. # This variables file wires together the various components (roles) used by the playbook.
  3. #
  4. # Roles used by playbook are pretty minimal and kept independent of one another as much as possible.
  5. # To deliver a turnkey fully-featured Matrix server, this playbook needs
  6. # to connect them all together. It does so by overriding role variables.
  7. #
  8. # You can also override ANY variable (seen here or in any given role),
  9. # by re-defining it in your own configuration file (`inventory/host_vars/matrix.example.com`).
  10. ########################################################################
  11. # #
  12. # Playbook #
  13. # #
  14. ########################################################################
  15. # Controls whether to install Docker or not
  16. # Also see `devture_docker_sdk_for_python_installation_enabled`.
  17. matrix_playbook_docker_installation_enabled: true
  18. matrix_playbook_docker_installation_daemon_options: "{{ matrix_playbook_docker_installation_daemon_options_auto | combine(matrix_playbook_docker_installation_daemon_options_custom, recursive=True) }}"
  19. # Since Docker 27.0.1, Docker daemon options do not need to be changed to enable IPv6 support on the daemon side.
  20. # See: https://docs.docker.com/engine/release-notes/27/#ipv6
  21. # We only enable `ip6tables` and `experimental` for people who explicitly request it (perhaps due to running an old Docker version).
  22. #
  23. # Despite IPv6-enablement at the Docker level being a thing, for IPv6 to work for containers
  24. # networks need to be created with IPv6 explicitly enabled.
  25. # This is controlled by the `devture_systemd_docker_base_ipv6_enabled` variable and it's up to the various roles to
  26. # respect this variable when creating their networks.
  27. matrix_playbook_docker_installation_daemon_options_auto: |
  28. {{
  29. ({'experimental': true, 'ip6tables': true} if devture_systemd_docker_base_ipv6_daemon_options_changing_enabled else {})
  30. }}
  31. matrix_playbook_docker_installation_daemon_options_custom: {}
  32. matrix_playbook_docker_installation_daemon_options_file_path: /etc/docker/daemon.json
  33. # Controls whether to attach Traefik labels to services.
  34. # This is separate from `traefik_enabled`, because you may wish to disable Traefik installation by the playbook,
  35. # yet still use Traefik installed in another way.
  36. matrix_playbook_traefik_labels_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  37. matrix_playbook_reverse_proxy_container_network: "{{ traefik_container_network if traefik_enabled else 'traefik' if matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] else '' }}"
  38. matrix_playbook_reverse_proxy_hostname: "{{ traefik_identifier if traefik_enabled else 'traefik' }}"
  39. matrix_playbook_reverse_proxy_traefik_middleware_compression_enabled: "{{ traefik_config_http_middlewares_compression_enabled if (traefik_enabled and traefik_config_http_middlewares_compression_enabled) else false }}"
  40. matrix_playbook_reverse_proxy_traefik_middleware_compression_name: "{{ (traefik_config_http_middlewares_compression_middleware_name + '@file') if traefik_enabled else '' }}"
  41. # A separate Matrix Federation entrypoint is always enabled, unless the federation port matches one of the ports for existing (default) entrypoints
  42. matrix_playbook_public_matrix_federation_api_traefik_entrypoint_enabled: "{{ matrix_federation_public_port not in [traefik_config_entrypoint_web_port, traefik_config_entrypoint_web_secure_port] }}"
  43. # We only enable HTTP/3 on the federation entrypoint if the main web-secure entrypoint has it enabled.
  44. matrix_playbook_public_matrix_federation_api_traefik_entrypoint_config_http3_enabled: "{{ traefik_config_entrypoint_web_secure_http3_enabled }}"
  45. # `traefik_config_entrypoint_web_secure_enabled` is the variable we currently follow to determine if SSL is enabled or not.
  46. # `matrix_playbook_ssl_enabled` is merely an indicator if (when looked at it publicly), the server supports SSL or not,
  47. # and affects how services configure their public URLs.
  48. matrix_federation_traefik_entrypoint_tls: "{{ traefik_config_entrypoint_web_secure_enabled }}"
  49. # The public URLs of all playbook-managed Matrix client (web) applications which are enabled,
  50. # ordered by preference (that is: the same order that these clients are wired up in this file).
  51. matrix_playbook_public_client_urls: |
  52. {{
  53. ([matrix_client_element_scheme + '://' + matrix_client_element_hostname + matrix_client_element_path_prefix] if matrix_client_element_enabled else [])
  54. +
  55. ([matrix_client_gomuks_scheme + '://' + matrix_client_gomuks_hostname + matrix_client_gomuks_path_prefix] if matrix_client_gomuks_enabled else [])
  56. +
  57. ([matrix_client_commet_scheme + '://' + matrix_client_commet_hostname + matrix_client_commet_path_prefix] if matrix_client_commet_enabled else [])
  58. +
  59. ([hydrogen_scheme + '://' + hydrogen_hostname + hydrogen_path_prefix] if hydrogen_enabled else [])
  60. +
  61. ([cinny_scheme + '://' + cinny_hostname + cinny_path_prefix] if cinny_enabled else [])
  62. +
  63. ([sable_scheme + '://' + sable_hostname + sable_path_prefix] if sable_enabled else [])
  64. +
  65. ([matrix_client_schildichat_scheme + '://' + matrix_client_schildichat_hostname + matrix_client_schildichat_path_prefix] if matrix_client_schildichat_enabled else [])
  66. +
  67. ([matrix_client_fluffychat_scheme + '://' + matrix_client_fluffychat_hostname + matrix_client_fluffychat_path_prefix] if matrix_client_fluffychat_enabled else [])
  68. }}
  69. # The URL that requests hitting the homeserver's root path (`/`) are redirected to.
  70. #
  71. # It points to the most-preferred playbook-managed client (see `matrix_playbook_public_client_urls`),
  72. # or is empty (no redirection) if no such client is enabled.
  73. matrix_playbook_public_client_root_redirection_url: "{{ matrix_playbook_public_client_urls | first | default('', true) }}"
  74. ########################################################################
  75. # #
  76. # /Playbook #
  77. # #
  78. ########################################################################
  79. ########################################################################
  80. # #
  81. # aux #
  82. # #
  83. ########################################################################
  84. aux_directory_default_owner: "{{ matrix_user_name }}"
  85. aux_directory_default_group: "{{ matrix_group_name }}"
  86. aux_file_default_owner: "{{ matrix_user_name }}"
  87. aux_file_default_group: "{{ matrix_group_name }}"
  88. ########################################################################
  89. # #
  90. # /aux #
  91. # #
  92. ########################################################################
  93. ########################################################################
  94. # #
  95. # base #
  96. # #
  97. ########################################################################
  98. matrix_homeserver_container_extra_arguments_auto: |
  99. {{
  100. (['--mount type=bind,src=' + matrix_bridge_appservice_discord_config_path + '/registration.yaml,dst=/matrix-appservice-discord-registration.yaml,ro'] if matrix_bridge_appservice_discord_enabled else [])
  101. +
  102. (['--mount type=bind,src=' + matrix_appservice_draupnir_for_all_config_path + '/draupnir-for-all-registration.yaml,dst=/matrix-appservice-draupnir-for-all-registration.yaml,ro'] if matrix_appservice_draupnir_for_all_enabled else [])
  103. +
  104. (['--mount type=bind,src=' + matrix_bot_meowlnir_config_path + '/registration.yaml,dst=/matrix-bot-meowlnir-registration.yaml,ro'] if matrix_bot_meowlnir_enabled else [])
  105. +
  106. (['--mount type=bind,src=' + matrix_appservice_double_puppet_config_path + '/registration.yaml,dst=/matrix-appservice-double-puppet-registration.yaml,ro'] if matrix_appservice_double_puppet_enabled else [])
  107. +
  108. (['--mount type=bind,src=' + matrix_bridge_appservice_irc_config_path + '/registration.yaml,dst=/matrix-appservice-irc-registration.yaml,ro'] if matrix_bridge_appservice_irc_enabled else [])
  109. +
  110. (['--mount type=bind,src=' + matrix_bridge_beeper_linkedin_config_path + '/registration.yaml,dst=/matrix-beeper-linkedin-registration.yaml,ro'] if matrix_bridge_beeper_linkedin_enabled else [])
  111. +
  112. (['--mount type=bind,src=' + matrix_bridge_beeper_line_config_path + '/registration.yaml,dst=/matrix-beeper-line-registration.yaml,ro'] if matrix_bridge_beeper_line_enabled else [])
  113. +
  114. (['--mount type=bind,src=' + matrix_bridge_wechat_config_path + '/registration.yaml,dst=/matrix-wechat-registration.yaml,ro'] if matrix_bridge_wechat_enabled else [])
  115. +
  116. (['--mount type=bind,src=' + matrix_bridge_heisenbridge_base_path + '/registration.yaml,dst=/heisenbridge-registration.yaml,ro'] if matrix_bridge_heisenbridge_enabled else [])
  117. +
  118. (['--mount type=bind,src=' + matrix_bridge_hookshot_base_path + '/registration.yml,dst=/hookshot-registration.yml,ro'] if matrix_bridge_hookshot_enabled else [])
  119. +
  120. (['--mount type=bind,src=' + matrix_bridge_mautrix_bluesky_config_path + '/registration.yaml,dst=/matrix-mautrix-bluesky-registration.yaml,ro'] if matrix_bridge_mautrix_bluesky_enabled else [])
  121. +
  122. (['--mount type=bind,src=' + matrix_bridge_rustpush_config_path + '/registration.yaml,dst=/matrix-rustpush-bridge-registration.yaml,ro'] if matrix_bridge_rustpush_enabled else [])
  123. +
  124. (['--mount type=bind,src=' + matrix_bridge_mautrix_discord_config_path + '/registration.yaml,dst=/matrix-mautrix-discord-registration.yaml,ro'] if matrix_bridge_mautrix_discord_enabled else [])
  125. +
  126. (['--mount type=bind,src=' + matrix_bridge_mautrix_slack_config_path + '/registration.yaml,dst=/matrix-mautrix-slack-registration.yaml,ro'] if matrix_bridge_mautrix_slack_enabled else [])
  127. +
  128. (['--mount type=bind,src=' + matrix_bridge_mautrix_googlechat_config_path + '/registration.yaml,dst=/matrix-mautrix-googlechat-registration.yaml,ro'] if matrix_bridge_mautrix_googlechat_enabled else [])
  129. +
  130. (['--mount type=bind,src=' + matrix_bridge_mautrix_signal_config_path + '/registration.yaml,dst=/matrix-mautrix-signal-registration.yaml,ro'] if matrix_bridge_mautrix_signal_enabled else [])
  131. +
  132. (['--mount type=bind,src=' + matrix_bridge_mautrix_meta_messenger_config_path + '/registration.yaml,dst=/matrix-mautrix-meta-messenger-registration.yaml,ro'] if matrix_bridge_mautrix_meta_messenger_enabled else [])
  133. +
  134. (['--mount type=bind,src=' + matrix_bridge_mautrix_meta_instagram_config_path + '/registration.yaml,dst=/matrix-mautrix-meta-instagram-registration.yaml,ro'] if matrix_bridge_mautrix_meta_instagram_enabled else [])
  135. +
  136. (['--mount type=bind,src=' + matrix_bridge_mautrix_telegram_config_path + '/registration.yaml,dst=/matrix-mautrix-telegram-registration.yaml,ro'] if matrix_bridge_mautrix_telegram_enabled else [])
  137. +
  138. (['--mount type=bind,src=' + matrix_bridge_mautrix_twitter_config_path + '/registration.yaml,dst=/matrix-mautrix-twitter-registration.yaml,ro'] if matrix_bridge_mautrix_twitter_enabled else [])
  139. +
  140. (['--mount type=bind,src=' + matrix_bridge_mautrix_gmessages_config_path + '/registration.yaml,dst=/matrix-mautrix-gmessages-registration.yaml,ro'] if matrix_bridge_mautrix_gmessages_enabled else [])
  141. +
  142. (['--mount type=bind,src=' + matrix_bridge_mautrix_gvoice_config_path + '/registration.yaml,dst=/matrix-mautrix-gvoice-registration.yaml,ro'] if matrix_bridge_mautrix_gvoice_enabled else [])
  143. +
  144. (['--mount type=bind,src=' + matrix_bridge_mautrix_linkedin_config_path + '/registration.yaml,dst=/matrix-mautrix-linkedin-registration.yaml,ro'] if matrix_bridge_mautrix_linkedin_enabled else [])
  145. +
  146. (['--mount type=bind,src=' + matrix_bridge_mautrix_whatsapp_config_path + '/registration.yaml,dst=/matrix-mautrix-whatsapp-registration.yaml,ro'] if matrix_bridge_mautrix_whatsapp_enabled else [])
  147. +
  148. (['--mount type=bind,src=' + matrix_bridge_mautrix_wsproxy_config_path + '/androidsms-registration.yaml,dst=/matrix-mautrix-androidsms-registration.yaml,ro'] if matrix_bridge_mautrix_wsproxy_enabled else [])
  149. +
  150. (['--mount type=bind,src=' + matrix_bridge_mautrix_wsproxy_config_path + '/imessage-registration.yaml,dst=/matrix-mautrix-imessage-registration.yaml,ro'] if matrix_bridge_mautrix_wsproxy_enabled else [])
  151. +
  152. (['--mount type=bind,src=' + matrix_bridge_mx_puppet_groupme_config_path + '/registration.yaml,dst=/matrix-mx-puppet-groupme-registration.yaml,ro'] if matrix_bridge_mx_puppet_groupme_enabled else [])
  153. +
  154. (['--mount type=bind,src=' + matrix_bridge_mx_puppet_steam_config_path + '/registration.yaml,dst=/matrix-mx-puppet-steam-registration.yaml,ro'] if matrix_bridge_mx_puppet_steam_enabled else [])
  155. +
  156. (['--mount type=bind,src=' + matrix_bridge_sms_config_path + '/registration.yaml,dst=/matrix-sms-bridge-registration.yaml,ro'] if matrix_bridge_sms_enabled else [])
  157. +
  158. (['--mount type=bind,src=' + matrix_bridge_steam_config_path + '/registration.yaml,dst=/matrix-steam-bridge-registration.yaml,ro'] if matrix_bridge_steam_enabled else [])
  159. +
  160. (['--mount type=bind,src=' + matrix_cactus_comments_app_service_config_file + ',dst=/matrix-cactus-comments.yaml,ro'] if matrix_cactus_comments_enabled else [])
  161. }}
  162. matrix_homeserver_app_service_config_files_auto: |
  163. {{
  164. (['/matrix-appservice-discord-registration.yaml'] if matrix_bridge_appservice_discord_enabled else [])
  165. +
  166. (['/matrix-appservice-draupnir-for-all-registration.yaml'] if matrix_appservice_draupnir_for_all_enabled else [])
  167. +
  168. (['/matrix-bot-meowlnir-registration.yaml'] if matrix_bot_meowlnir_enabled else [])
  169. +
  170. (['/matrix-appservice-double-puppet-registration.yaml'] if matrix_appservice_double_puppet_enabled else [])
  171. +
  172. (['/matrix-appservice-irc-registration.yaml'] if matrix_bridge_appservice_irc_enabled else [])
  173. +
  174. (['/matrix-beeper-linkedin-registration.yaml'] if matrix_bridge_beeper_linkedin_enabled else [])
  175. +
  176. (['/matrix-beeper-line-registration.yaml'] if matrix_bridge_beeper_line_enabled else [])
  177. +
  178. (['/matrix-wechat-registration.yaml'] if matrix_bridge_wechat_enabled else [])
  179. +
  180. (['/heisenbridge-registration.yaml'] if matrix_bridge_heisenbridge_enabled else [])
  181. +
  182. (['/hookshot-registration.yml'] if matrix_bridge_hookshot_enabled else [])
  183. +
  184. (['/matrix-mautrix-bluesky-registration.yaml'] if matrix_bridge_mautrix_bluesky_enabled else [])
  185. +
  186. (['/matrix-rustpush-bridge-registration.yaml'] if matrix_bridge_rustpush_enabled else [])
  187. +
  188. (['/matrix-mautrix-discord-registration.yaml'] if matrix_bridge_mautrix_discord_enabled else [])
  189. +
  190. (['/matrix-mautrix-slack-registration.yaml'] if matrix_bridge_mautrix_slack_enabled else [])
  191. +
  192. (['/matrix-mautrix-googlechat-registration.yaml'] if matrix_bridge_mautrix_googlechat_enabled else [])
  193. +
  194. (['/matrix-mautrix-signal-registration.yaml'] if matrix_bridge_mautrix_signal_enabled else [])
  195. +
  196. (['/matrix-mautrix-meta-messenger-registration.yaml'] if matrix_bridge_mautrix_meta_messenger_enabled else [])
  197. +
  198. (['/matrix-mautrix-meta-instagram-registration.yaml'] if matrix_bridge_mautrix_meta_instagram_enabled else [])
  199. +
  200. (['/matrix-mautrix-telegram-registration.yaml'] if matrix_bridge_mautrix_telegram_enabled else [])
  201. +
  202. (['/matrix-mautrix-twitter-registration.yaml'] if matrix_bridge_mautrix_twitter_enabled else [])
  203. +
  204. (['/matrix-mautrix-gmessages-registration.yaml'] if matrix_bridge_mautrix_gmessages_enabled else [])
  205. +
  206. (['/matrix-mautrix-gvoice-registration.yaml'] if matrix_bridge_mautrix_gvoice_enabled else [])
  207. +
  208. (['/matrix-mautrix-linkedin-registration.yaml'] if matrix_bridge_mautrix_linkedin_enabled else [])
  209. +
  210. (['/matrix-mautrix-whatsapp-registration.yaml'] if matrix_bridge_mautrix_whatsapp_enabled else [])
  211. +
  212. (['/matrix-mautrix-androidsms-registration.yaml'] if matrix_bridge_mautrix_wsproxy_enabled else [])
  213. +
  214. (['/matrix-mautrix-imessage-registration.yaml'] if matrix_bridge_mautrix_wsproxy_enabled else [])
  215. +
  216. (['/matrix-mx-puppet-groupme-registration.yaml'] if matrix_bridge_mx_puppet_groupme_enabled else [])
  217. +
  218. (['/matrix-mx-puppet-steam-registration.yaml'] if matrix_bridge_mx_puppet_steam_enabled else [])
  219. +
  220. (['/matrix-sms-bridge-registration.yaml'] if matrix_bridge_sms_enabled else [])
  221. +
  222. (['/matrix-cactus-comments.yaml'] if matrix_cactus_comments_enabled else [])
  223. +
  224. (['/matrix-steam-bridge-registration.yaml'] if matrix_bridge_steam_enabled else [])
  225. }}
  226. matrix_addons_homeserver_container_network: "{{ matrix_playbook_reverse_proxy_container_network if matrix_playbook_internal_matrix_client_api_traefik_entrypoint_enabled else matrix_homeserver_container_network }}"
  227. matrix_addons_homeserver_client_api_url: "{{ ('http://' + matrix_playbook_reverse_proxy_hostname + ':' + matrix_playbook_internal_matrix_client_api_traefik_entrypoint_port | string) if matrix_playbook_internal_matrix_client_api_traefik_entrypoint_enabled else matrix_homeserver_container_url }}"
  228. matrix_addons_homeserver_systemd_services_list: |
  229. {{
  230. (
  231. matrix_homeserver_systemd_services_list
  232. +
  233. (
  234. [traefik_identifier + '.service']
  235. if matrix_playbook_reverse_proxy_type == 'playbook-managed-traefik'
  236. else []
  237. )
  238. )
  239. if matrix_playbook_internal_matrix_client_api_traefik_entrypoint_enabled
  240. else matrix_homeserver_systemd_services_list
  241. }}
  242. ########################################################################
  243. # #
  244. # /base #
  245. # #
  246. ########################################################################
  247. ########################################################################
  248. # #
  249. # com.devture.ansible.role.systemd_service_manager #
  250. # #
  251. ########################################################################
  252. # This list is not exhaustive and final.
  253. # Synapse workers are still injected into the list at runtime.
  254. # Additional JVB workers (jitsi_jvb.yml — roles/galaxy/jitsi/tasks/init_additional_jvb.yml) override this variable at runtime as well.
  255. #
  256. # Priority levels are like this:
  257. # - Traefik starts first with a level of 250, so that:
  258. # - it can get an early start on obtaining SSL certificates and routing to other services as soon as they start (later)
  259. # - so that addon services (starting later) can communicte with the homeserver via Traefik's internal entrypoint
  260. # (see `matrix_playbook_internal_matrix_client_api_traefik_entrypoint_enabled`)
  261. # - core services (the homeserver) get a level of ~1000
  262. # - services that the homeserver depends on (database, Redis, ntfy, etc.) get a lower level — between 500 and 1000
  263. # - coturn gets a higher priority level (= starts later) in all cases, to intentionally delay it in relation to the homeserver, because:
  264. # - when starting services one by one, the service manager waits for each service to fully start before proceeding to the next one
  265. # - if coturn has a lower priority than the homeserver, it would be started before it
  266. # - if coturn is started before the homeserver, there'd be no container label (usually on the homeserver) telling Traefik to get a `matrix.example.com` certificate
  267. # - thus, coturn would spin and wait for a certificate until it fails. We'd get a playbook failure due to it, but service manager will proceed to start all other services anyway.
  268. # - only later, when the homeserver actually starts, would that certificate be fetched and dumped
  269. # - this is a problem for `one-by-one`, `clean-stop-start` (which behaves like one-by-one initially) and possibly other modes, except `all-at-once`
  270. # - reverse-proxying services get level 3000
  271. # - Matrix utility services (bridges, bots) get a level of 2000/2200, so that:
  272. # - they can start before the reverse-proxy
  273. # - so that, when the reverse-proxy is up (Matrix is up), all bots and bridges can be interacted with
  274. # - monitoring services (Prometheus, Grafana, …) get a level of 4000 — they can start later than all-of-Matrix
  275. # - services which aren't time-sensitive (various crons and timers) get a level of 5000 — they can start later than all-of-Matrix
  276. # The systemd_service_manager role supports conditional restart — only restarting services
  277. # whose configuration or container image actually changed, leaving unchanged services running.
  278. # This is controlled by `devture_systemd_service_manager_conditional_restart_enabled` (default: true in the role).
  279. #
  280. # We override it here to automatically match the intent of the playbook tags being used:
  281. # - install-* tags (regular upgrades): conditional restart ON — only changed services restart, reducing downtime
  282. # - setup-* tags (full setup/reconfiguration): conditional restart OFF — all services restart unconditionally
  283. #
  284. # This ensures consistent behavior whether users invoke the playbook via `just` shortcuts
  285. # or raw `ansible-playbook --tags=...` commands.
  286. devture_systemd_service_manager_conditional_restart_enabled: "{{ ansible_run_tags | select('match', 'setup-') | list | length == 0 }}"
  287. devture_systemd_service_manager_services_list_auto: |
  288. {{
  289. ([{
  290. 'name': (backup_borg_identifier + '.timer'),
  291. 'priority': 5000,
  292. 'restart_necessary': (backup_borg_restart_necessary | bool),
  293. 'groups': ['matrix', 'backup', 'borg'],
  294. }] if backup_borg_enabled else [])
  295. +
  296. ([{
  297. 'name': 'matrix-alertmanager-receiver.service',
  298. 'priority': 2200,
  299. 'restart_necessary': (matrix_alertmanager_receiver_restart_necessary | bool),
  300. 'groups': ['matrix', 'alertmanager-receiver'],
  301. }] if matrix_alertmanager_receiver_enabled else [])
  302. +
  303. ([{
  304. 'name': 'matrix-authentication-service.service',
  305. 'priority': 2200,
  306. 'restart_necessary': (matrix_authentication_service_restart_necessary | bool),
  307. 'groups': ['matrix', 'matrix-authentication-service'],
  308. }] if matrix_authentication_service_enabled else [])
  309. +
  310. ([{
  311. 'name': 'matrix-bot-buscarron.service',
  312. 'priority': 2200,
  313. 'restart_necessary': (matrix_bot_buscarron_restart_necessary | bool),
  314. 'groups': ['matrix', 'bots', 'buscarron', 'bot-buscarron'],
  315. }] if matrix_bot_buscarron_enabled else [])
  316. +
  317. ([{
  318. 'name': 'matrix-bot-baibot.service',
  319. 'priority': 2200,
  320. 'restart_necessary': (matrix_bot_baibot_restart_necessary | bool),
  321. 'groups': ['matrix', 'bots', 'baibot', 'bot-baibot'],
  322. }] if matrix_bot_baibot_enabled else [])
  323. +
  324. ([{
  325. 'name': 'matrix-bot-honoroit.service',
  326. 'priority': 2200,
  327. 'restart_necessary': (matrix_bot_honoroit_restart_necessary | bool),
  328. 'groups': ['matrix', 'bots', 'honoroit', 'bot-honoroit'],
  329. }] if matrix_bot_honoroit_enabled else [])
  330. +
  331. ([{
  332. 'name': 'matrix-bot-matrix-reminder-bot.service',
  333. 'priority': 2200,
  334. 'restart_necessary': (matrix_bot_matrix_reminder_bot_restart_necessary | bool),
  335. 'groups': ['matrix', 'bots', 'reminder-bot', 'bot-matrix-reminder-bot'],
  336. }] if matrix_bot_matrix_reminder_bot_enabled else [])
  337. +
  338. ([{
  339. 'name': 'matrix-bot-maubot.service',
  340. 'priority': 2200,
  341. 'restart_necessary': (matrix_bot_maubot_restart_necessary | bool),
  342. 'groups': ['matrix', 'bots', 'maubot', 'bot-maubot'],
  343. }] if matrix_bot_maubot_enabled else [])
  344. +
  345. ([{
  346. 'name': 'matrix-bot-mjolnir.service',
  347. 'priority': 4000,
  348. 'restart_necessary': (matrix_bot_mjolnir_restart_necessary | bool),
  349. 'groups': ['matrix', 'bots', 'mjolnir', 'bot-mjolnir'],
  350. }] if matrix_bot_mjolnir_enabled else [])
  351. +
  352. ([{
  353. 'name': 'matrix-bot-draupnir.service',
  354. 'priority': 4000,
  355. 'restart_necessary': (matrix_bot_draupnir_restart_necessary | bool),
  356. 'groups': ['matrix', 'bots', 'draupnir', 'bot-draupnir'],
  357. }] if matrix_bot_draupnir_enabled else [])
  358. +
  359. ([{
  360. 'name': 'matrix-bot-meowlnir.service',
  361. 'priority': 4000,
  362. 'restart_necessary': (matrix_bot_meowlnir_restart_necessary | bool),
  363. 'groups': ['matrix', 'bots', 'meowlnir', 'bot-meowlnir'],
  364. }] if matrix_bot_meowlnir_enabled else [])
  365. +
  366. ([{
  367. 'name': 'matrix-appservice-discord.service',
  368. 'priority': 2000,
  369. 'restart_necessary': (matrix_bridge_appservice_discord_restart_necessary | bool),
  370. 'groups': ['matrix', 'bridges', 'appservice-discord'],
  371. }] if matrix_bridge_appservice_discord_enabled else [])
  372. +
  373. ([{
  374. 'name': 'matrix-appservice-draupnir-for-all.service',
  375. 'priority': 4000,
  376. 'restart_necessary': (matrix_appservice_draupnir_for_all_restart_necessary | bool),
  377. 'groups': ['matrix', 'bridges', 'draupnir-for-all', 'appservice-draupnir-for-all'],
  378. }] if matrix_appservice_draupnir_for_all_enabled else [])
  379. +
  380. ([{
  381. 'name': 'matrix-appservice-irc.service',
  382. 'priority': 2000,
  383. 'restart_necessary': (matrix_bridge_appservice_irc_restart_necessary | bool),
  384. 'groups': ['matrix', 'bridges', 'appservice-irc'],
  385. }] if matrix_bridge_appservice_irc_enabled else [])
  386. +
  387. ([{
  388. 'name': 'matrix-beeper-linkedin.service',
  389. 'priority': 2000,
  390. 'restart_necessary': (matrix_bridge_beeper_linkedin_restart_necessary | bool),
  391. 'groups': ['matrix', 'bridges', 'beeper-linkedin'],
  392. }] if matrix_bridge_beeper_linkedin_enabled else [])
  393. +
  394. ([{
  395. 'name': 'matrix-beeper-line.service',
  396. 'priority': 2000,
  397. 'restart_necessary': (matrix_bridge_beeper_line_restart_necessary | bool),
  398. 'groups': ['matrix', 'bridges', 'beeper-line'],
  399. }] if matrix_bridge_beeper_line_enabled else [])
  400. +
  401. ([{
  402. 'name': 'matrix-wechat.service',
  403. 'priority': 2000,
  404. 'restart_necessary': (matrix_bridge_wechat_restart_necessary | bool),
  405. 'groups': ['matrix', 'bridges', 'wechat'],
  406. }] if matrix_bridge_wechat_enabled else [])
  407. +
  408. ([{
  409. 'name': 'matrix-wechat-agent.service',
  410. 'priority': 2000,
  411. 'restart_necessary': (matrix_bridge_wechat_restart_necessary | bool),
  412. 'groups': ['matrix', 'bridges', 'wechat'],
  413. }] if matrix_bridge_wechat_enabled else [])
  414. +
  415. ([{
  416. 'name': 'matrix-heisenbridge.service',
  417. 'priority': 2000,
  418. 'restart_necessary': (matrix_bridge_heisenbridge_restart_necessary | bool),
  419. 'groups': ['matrix', 'bridges', 'heisenbridge'],
  420. }] if matrix_bridge_heisenbridge_enabled else [])
  421. +
  422. ([{
  423. 'name': 'matrix-hookshot.service',
  424. 'priority': 2000,
  425. 'restart_necessary': (matrix_bridge_hookshot_restart_necessary | bool),
  426. 'groups': ['matrix', 'bridges', 'hookshot', 'bridge-hookshot'],
  427. }] if matrix_bridge_hookshot_enabled else [])
  428. +
  429. ([{
  430. 'name': 'matrix-meshtastic-relay.service',
  431. 'priority': 2000,
  432. 'restart_necessary': (matrix_bridge_meshtastic_relay_restart_necessary | bool),
  433. 'groups': ['matrix', 'bridges', 'meshtastic-relay'],
  434. }] if matrix_bridge_meshtastic_relay_enabled else [])
  435. +
  436. ([{
  437. 'name': 'matrix-mautrix-bluesky.service',
  438. 'priority': 2000,
  439. 'restart_necessary': (matrix_bridge_mautrix_bluesky_restart_necessary | bool),
  440. 'groups': ['matrix', 'bridges', 'mautrix-bluesky'],
  441. }] if matrix_bridge_mautrix_bluesky_enabled else [])
  442. +
  443. ([{
  444. 'name': 'matrix-rustpush-bridge.service',
  445. 'priority': 2000,
  446. 'restart_necessary': (matrix_bridge_rustpush_restart_necessary | bool),
  447. 'groups': ['matrix', 'bridges', 'matrix-rustpush-bridge'],
  448. }] if matrix_bridge_rustpush_enabled else [])
  449. +
  450. ([{
  451. 'name': 'matrix-mautrix-discord.service',
  452. 'priority': 2000,
  453. 'restart_necessary': (matrix_bridge_mautrix_discord_restart_necessary | bool),
  454. 'groups': ['matrix', 'bridges', 'mautrix-discord'],
  455. }] if matrix_bridge_mautrix_discord_enabled else [])
  456. +
  457. ([{
  458. 'name': 'matrix-mautrix-slack.service',
  459. 'priority': 2000,
  460. 'restart_necessary': (matrix_bridge_mautrix_slack_restart_necessary | bool),
  461. 'groups': ['matrix', 'bridges', 'mautrix-slack'],
  462. }] if matrix_bridge_mautrix_slack_enabled else [])
  463. +
  464. ([{
  465. 'name': 'matrix-mautrix-googlechat.service',
  466. 'priority': 2000,
  467. 'restart_necessary': (matrix_bridge_mautrix_googlechat_restart_necessary | bool),
  468. 'groups': ['matrix', 'bridges', 'mautrix-googlechat'],
  469. }] if matrix_bridge_mautrix_googlechat_enabled else [])
  470. +
  471. ([{
  472. 'name': 'matrix-mautrix-signal.service',
  473. 'priority': 2000,
  474. 'restart_necessary': (matrix_bridge_mautrix_signal_restart_necessary | bool),
  475. 'groups': ['matrix', 'bridges', 'mautrix-signal', 'mautrix-signal'],
  476. }] if matrix_bridge_mautrix_signal_enabled else [])
  477. +
  478. ([{
  479. 'name': (matrix_bridge_mautrix_meta_messenger_identifier + '.service'),
  480. 'priority': 2000,
  481. 'restart_necessary': (matrix_bridge_mautrix_meta_messenger_restart_necessary | bool),
  482. 'groups': ['matrix', 'bridges', 'mautrix-meta', 'mautrix-meta-messenger'],
  483. }] if matrix_bridge_mautrix_meta_messenger_enabled else [])
  484. +
  485. ([{
  486. 'name': (matrix_bridge_mautrix_meta_instagram_identifier + '.service'),
  487. 'priority': 2000,
  488. 'restart_necessary': (matrix_bridge_mautrix_meta_instagram_restart_necessary | bool),
  489. 'groups': ['matrix', 'bridges', 'mautrix-meta', 'mautrix-meta-instagram'],
  490. }] if matrix_bridge_mautrix_meta_instagram_enabled else [])
  491. +
  492. ([{
  493. 'name': 'matrix-mautrix-telegram.service',
  494. 'priority': 2000,
  495. 'restart_necessary': (matrix_bridge_mautrix_telegram_restart_necessary | bool),
  496. 'groups': ['matrix', 'bridges', 'mautrix-telegram'],
  497. }] if matrix_bridge_mautrix_telegram_enabled else [])
  498. +
  499. ([{
  500. 'name': 'matrix-mautrix-twitter.service',
  501. 'priority': 2000,
  502. 'restart_necessary': (matrix_bridge_mautrix_twitter_restart_necessary | bool),
  503. 'groups': ['matrix', 'bridges', 'mautrix-twitter'],
  504. }] if matrix_bridge_mautrix_twitter_enabled else [])
  505. +
  506. ([{
  507. 'name': 'matrix-mautrix-gmessages.service',
  508. 'priority': 2000,
  509. 'restart_necessary': (matrix_bridge_mautrix_gmessages_restart_necessary | bool),
  510. 'groups': ['matrix', 'bridges', 'mautrix-gmessages'],
  511. }] if matrix_bridge_mautrix_gmessages_enabled else [])
  512. +
  513. ([{
  514. 'name': 'matrix-mautrix-gvoice.service',
  515. 'priority': 2000,
  516. 'restart_necessary': (matrix_bridge_mautrix_gvoice_restart_necessary | bool),
  517. 'groups': ['matrix', 'bridges', 'mautrix-gvoice'],
  518. }] if matrix_bridge_mautrix_gvoice_enabled else [])
  519. +
  520. ([{
  521. 'name': 'matrix-mautrix-linkedin.service',
  522. 'priority': 2000,
  523. 'restart_necessary': (matrix_bridge_mautrix_linkedin_restart_necessary | bool),
  524. 'groups': ['matrix', 'bridges', 'mautrix-linkedin'],
  525. }] if matrix_bridge_mautrix_linkedin_enabled else [])
  526. +
  527. ([{
  528. 'name': 'matrix-mautrix-whatsapp.service',
  529. 'priority': 2000,
  530. 'restart_necessary': (matrix_bridge_mautrix_whatsapp_restart_necessary | bool),
  531. 'groups': ['matrix', 'bridges', 'mautrix-whatsapp'],
  532. }] if matrix_bridge_mautrix_whatsapp_enabled else [])
  533. +
  534. ([{
  535. 'name': 'matrix-mautrix-wsproxy.service',
  536. 'priority': 2000,
  537. 'restart_necessary': (matrix_bridge_mautrix_wsproxy_restart_necessary | bool),
  538. 'groups': ['matrix', 'bridges', 'mautrix-wsproxy'],
  539. }] if matrix_bridge_mautrix_wsproxy_enabled else [])
  540. +
  541. ([{
  542. 'name': 'matrix-mautrix-wsproxy-syncproxy.service',
  543. 'priority': 2000,
  544. 'restart_necessary': (matrix_bridge_mautrix_wsproxy_syncproxy_restart_necessary | bool),
  545. 'groups': ['matrix', 'bridges', 'mautrix-wsproxy-syncproxy'],
  546. }] if matrix_bridge_mautrix_wsproxy_enabled else [])
  547. +
  548. ([{
  549. 'name': 'matrix-mx-puppet-groupme.service',
  550. 'priority': 2000,
  551. 'restart_necessary': (matrix_bridge_mx_puppet_groupme_restart_necessary | bool),
  552. 'groups': ['matrix', 'bridges', 'mx-puppet-groupme'],
  553. }] if matrix_bridge_mx_puppet_groupme_enabled else [])
  554. +
  555. ([{
  556. 'name': 'matrix-mx-puppet-steam.service',
  557. 'priority': 2000,
  558. 'restart_necessary': (matrix_bridge_mx_puppet_steam_restart_necessary | bool),
  559. 'groups': ['matrix', 'bridges', 'mx-puppet-steam'],
  560. }] if matrix_bridge_mx_puppet_steam_enabled else [])
  561. +
  562. ([{
  563. 'name': 'matrix-postmoogle.service',
  564. 'priority': 2200,
  565. 'restart_necessary': (matrix_bridge_postmoogle_restart_necessary | bool),
  566. 'groups': ['matrix', 'bridges', 'postmoogle'],
  567. }] if matrix_bridge_postmoogle_enabled else [])
  568. +
  569. ([{
  570. 'name': 'matrix-sms-bridge.service',
  571. 'priority': 2000,
  572. 'restart_necessary': (matrix_bridge_sms_restart_necessary | bool),
  573. 'groups': ['matrix', 'bridges', 'sms'],
  574. }] if matrix_bridge_sms_enabled else [])
  575. +
  576. ([{
  577. 'name': 'matrix-steam-bridge.service',
  578. 'priority': 2000,
  579. 'restart_necessary': (matrix_bridge_steam_restart_necessary | bool),
  580. 'groups': ['matrix', 'bridges', 'matrix-steam-bridge'],
  581. }] if matrix_bridge_steam_enabled else [])
  582. +
  583. ([{
  584. 'name': 'matrix-cactus-comments.service',
  585. 'priority': 2000,
  586. 'restart_necessary': (matrix_cactus_comments_restart_necessary | bool),
  587. 'groups': ['matrix', 'cactus-comments'],
  588. }] if matrix_cactus_comments_enabled else [])
  589. +
  590. ([{
  591. 'name': 'matrix-cactus-comments-client.service',
  592. 'priority': 2000,
  593. 'restart_necessary': (matrix_cactus_comments_client_restart_necessary | bool),
  594. 'groups': ['matrix', 'cactus-comments-client'],
  595. }] if matrix_cactus_comments_client_enabled else [])
  596. +
  597. ([{
  598. 'name': (cinny_identifier + '.service'),
  599. 'priority': 2000,
  600. 'restart_necessary': (cinny_restart_necessary | bool),
  601. 'groups': ['matrix', 'clients', 'cinny', 'client-cinny'],
  602. }] if cinny_enabled else [])
  603. +
  604. ([{
  605. 'name': (sable_identifier + '.service'),
  606. 'priority': 2000,
  607. 'restart_necessary': (sable_restart_necessary | bool),
  608. 'groups': ['matrix', 'clients', 'sable', 'client-sable'],
  609. }] if sable_enabled else [])
  610. +
  611. ([{
  612. 'name': 'matrix-client-element.service',
  613. 'priority': 2000,
  614. 'restart_necessary': (matrix_client_element_restart_necessary | bool),
  615. 'groups': ['matrix', 'clients', 'element', 'client-element'],
  616. }] if matrix_client_element_enabled else [])
  617. +
  618. ([{
  619. 'name': (hydrogen_identifier + '.service'),
  620. 'priority': 2000,
  621. 'restart_necessary': (hydrogen_restart_necessary | bool),
  622. 'groups': ['matrix', 'clients', 'hydrogen', 'client-hydrogen'],
  623. }] if hydrogen_enabled else [])
  624. +
  625. ([{
  626. 'name': 'matrix-client-schildichat.service',
  627. 'priority': 2000,
  628. 'restart_necessary': (matrix_client_schildichat_restart_necessary | bool),
  629. 'groups': ['matrix', 'clients', 'schildichat', 'client-schildichat'],
  630. }] if matrix_client_schildichat_enabled else [])
  631. +
  632. ([{
  633. 'name': 'matrix-client-commet.service',
  634. 'priority': 2000,
  635. 'restart_necessary': (matrix_client_commet_restart_necessary | bool),
  636. 'groups': ['matrix', 'clients', 'commet', 'client-commet'],
  637. }] if matrix_client_commet_enabled else [])
  638. +
  639. ([{
  640. 'name': 'matrix-client-gomuks.service',
  641. 'priority': 2000,
  642. 'restart_necessary': (matrix_client_gomuks_restart_necessary | bool),
  643. 'groups': ['matrix', 'clients', 'gomuks', 'client-gomuks'],
  644. }] if matrix_client_gomuks_enabled else [])
  645. +
  646. ([{
  647. 'name': 'matrix-client-fluffychat.service',
  648. 'priority': 2000,
  649. 'restart_necessary': (matrix_client_fluffychat_restart_necessary | bool),
  650. 'groups': ['matrix', 'clients', 'fluffychat', 'client-fluffychat'],
  651. }] if matrix_client_fluffychat_enabled else [])
  652. +
  653. ([{
  654. 'name': ('matrix-' + matrix_homeserver_implementation + '.service'),
  655. 'priority': matrix_homeserver_systemd_service_manager_priority,
  656. 'restart_necessary': (
  657. (matrix_conduit_restart_necessary | bool) if matrix_homeserver_implementation == 'conduit'
  658. else (matrix_continuwuity_restart_necessary | bool) if matrix_homeserver_implementation == 'continuwuity'
  659. else (matrix_tuwunel_restart_necessary | bool) if matrix_homeserver_implementation == 'tuwunel'
  660. else (matrix_dendrite_restart_necessary | bool) if matrix_homeserver_implementation == 'dendrite'
  661. else true
  662. ),
  663. 'groups': ['matrix', 'homeservers', matrix_homeserver_implementation],
  664. }] if matrix_homeserver_enabled else [])
  665. +
  666. ([{
  667. 'name': 'matrix-corporal.service',
  668. 'priority': (matrix_homeserver_systemd_service_manager_priority + 500),
  669. 'restart_necessary': (matrix_corporal_restart_necessary | bool),
  670. 'groups': ['matrix', 'corporal'],
  671. }] if matrix_corporal_enabled else [])
  672. +
  673. ([{
  674. 'name': 'matrix-matrixto.service',
  675. 'priority': 4000,
  676. 'restart_necessary': (matrix_matrixto_restart_necessary | bool),
  677. 'groups': ['matrix', 'matrixto'],
  678. }] if matrix_matrixto_enabled else [])
  679. +
  680. ([{
  681. 'name': 'matrix-rageshake.service',
  682. 'priority': 4000,
  683. 'restart_necessary': (matrix_rageshake_restart_necessary | bool),
  684. 'groups': ['matrix', 'rageshake'],
  685. }] if matrix_rageshake_enabled else [])
  686. +
  687. ([{
  688. 'name': (coturn_identifier + '.service'),
  689. 'priority': (matrix_homeserver_systemd_service_manager_priority + 500),
  690. 'restart_necessary': (coturn_restart_necessary | bool),
  691. 'groups': ['matrix', 'coturn'],
  692. }] if coturn_enabled else [])
  693. +
  694. ([{
  695. 'name': (coturn_identifier + '-reload.timer'),
  696. 'priority': 5000,
  697. 'restart_necessary': (coturn_restart_necessary | bool),
  698. 'groups': ['matrix', 'coturn'],
  699. }] if (coturn_enabled and coturn_tls_enabled) else [])
  700. +
  701. ([{
  702. 'name': (ddclient_identifier + '.service'),
  703. 'priority': 5000,
  704. 'restart_necessary': (ddclient_restart_necessary | bool),
  705. 'groups': ['matrix', 'ddclient', 'dynamic-dns'],
  706. }] if ddclient_enabled else [])
  707. +
  708. ([{
  709. 'name': (etherpad_identifier + '.service'),
  710. 'priority': 4000,
  711. 'restart_necessary': (etherpad_restart_necessary | bool),
  712. 'groups': ['matrix', 'etherpad'],
  713. }] if etherpad_enabled else [])
  714. +
  715. ([{
  716. 'name': (grafana_identifier + '.service'),
  717. 'priority': 4000,
  718. 'restart_necessary': (grafana_restart_necessary | bool),
  719. 'groups': ['matrix', 'monitoring', 'grafana'],
  720. }] if grafana_enabled else [])
  721. +
  722. ([{
  723. 'name': (jitsi_identifier + '-web.service'),
  724. 'priority': 4200,
  725. 'restart_necessary': (jitsi_web_restart_necessary | bool),
  726. 'groups': ['matrix', 'jitsi', 'jitsi-web'],
  727. }] if jitsi_enabled else [])
  728. +
  729. ([{
  730. 'name': (jitsi_identifier + '-prosody.service'),
  731. 'priority': 4000,
  732. 'restart_necessary': (jitsi_prosody_restart_necessary | bool),
  733. 'groups': ['matrix', 'jitsi', 'jitsi-prosody'],
  734. }] if jitsi_enabled else [])
  735. +
  736. ([{
  737. 'name': (jitsi_identifier + '-jicofo.service'),
  738. 'priority': 4100,
  739. 'restart_necessary': (jitsi_jicofo_restart_necessary | bool),
  740. 'groups': ['matrix', 'jitsi', 'jitsi-jicofo'],
  741. }] if jitsi_enabled else [])
  742. +
  743. ([{
  744. 'name': (jitsi_identifier + '-jvb.service'),
  745. 'priority': 4100,
  746. 'restart_necessary': (jitsi_jvb_restart_necessary | bool),
  747. 'groups': ['matrix', 'jitsi', 'jitsi-jvb'],
  748. }] if jitsi_enabled else [])
  749. +
  750. ([{
  751. 'name': (matrix_media_repo_identifier + '.service'),
  752. 'priority': 4000,
  753. 'restart_necessary': (matrix_media_repo_restart_necessary | bool),
  754. 'groups': ['matrix', 'matrix-media-repo'],
  755. }] if matrix_media_repo_enabled else [])
  756. +
  757. ([{
  758. 'name': (exim_relay_identifier ~ '.service'),
  759. 'priority': 800,
  760. 'restart_necessary': (exim_relay_restart_necessary | bool),
  761. 'groups': ['matrix', 'mailer', 'exim-relay'],
  762. }] if exim_relay_enabled else [])
  763. +
  764. ([{
  765. 'name': (ntfy_identifier + '.service'),
  766. 'priority': 800,
  767. 'restart_necessary': (ntfy_restart_necessary | bool),
  768. 'groups': ['matrix', 'ntfy'],
  769. }] if ntfy_enabled else [])
  770. +
  771. ([{
  772. 'name': (postgres_identifier + '.service'),
  773. 'priority': 500,
  774. 'restart_necessary': (postgres_restart_necessary | bool),
  775. 'groups': ['matrix', 'postgres'],
  776. }] if postgres_enabled else [])
  777. +
  778. ([{
  779. 'name': (postgres_backup_identifier + '.service'),
  780. 'priority': 5000,
  781. 'restart_necessary': (postgres_backup_restart_necessary | bool),
  782. 'groups': ['matrix', 'backup', 'postgres-backup'],
  783. }] if postgres_backup_enabled else [])
  784. +
  785. ([{
  786. 'name': (prometheus_identifier + '.service'),
  787. 'priority': 4000,
  788. 'restart_necessary': (prometheus_restart_necessary | bool),
  789. 'groups': ['matrix', 'monitoring', 'prometheus'],
  790. }] if prometheus_enabled else [])
  791. +
  792. ([{
  793. 'name': (prometheus_node_exporter_identifier + '.service'),
  794. 'priority': 3900,
  795. 'restart_necessary': (prometheus_node_exporter_restart_necessary | bool),
  796. 'groups': ['matrix', 'monitoring', 'prometheus-exporters', 'prometheus-node-exporter'],
  797. }] if prometheus_node_exporter_enabled else [])
  798. +
  799. ([{
  800. 'name': (prometheus_postgres_exporter_identifier + '.service'),
  801. 'priority': 3900,
  802. 'restart_necessary': (prometheus_postgres_exporter_restart_necessary | bool),
  803. 'groups': ['matrix', 'monitoring', 'prometheus-exporters', 'prometheus-postgres-exporter'],
  804. }] if prometheus_postgres_exporter_enabled else [])
  805. +
  806. ([{
  807. 'name': (prometheus_nginxlog_exporter_identifier + '.service'),
  808. 'priority': 3900,
  809. 'restart_necessary': (prometheus_nginxlog_exporter_restart_necessary | bool),
  810. 'groups': ['matrix', 'monitoring', 'prometheus-exporters', 'prometheus-nginxlog-exporter'],
  811. }] if prometheus_nginxlog_exporter_enabled else [])
  812. +
  813. ([{
  814. 'name': (valkey_identifier + '.service'),
  815. 'priority': 750,
  816. 'restart_necessary': (valkey_restart_necessary | bool),
  817. 'groups': ['matrix', 'valkey'],
  818. }] if valkey_enabled else [])
  819. +
  820. ([{
  821. 'name': 'matrix-pantalaimon.service',
  822. 'priority': 4000,
  823. 'restart_necessary': (matrix_pantalaimon_restart_necessary | bool),
  824. 'groups': ['matrix', 'pantalaimon'],
  825. }] if matrix_pantalaimon_enabled else [])
  826. +
  827. ([{
  828. 'name': 'matrix-element-admin.service',
  829. 'priority': 4000,
  830. 'restart_necessary': (matrix_element_admin_restart_necessary | bool),
  831. 'groups': ['matrix', 'element-admin'],
  832. }] if matrix_element_admin_enabled else [])
  833. +
  834. ([{
  835. 'name': 'matrix-element-call.service',
  836. 'priority': 4000,
  837. 'restart_necessary': (matrix_element_call_restart_necessary | bool),
  838. 'groups': ['matrix', 'element-call'],
  839. }] if matrix_element_call_enabled else [])
  840. +
  841. ([{
  842. 'name': 'matrix-livekit-jwt-service.service',
  843. 'priority': 3500,
  844. 'restart_necessary': (matrix_livekit_jwt_service_restart_necessary | bool),
  845. 'groups': ['matrix', 'livekit-jwt-service'],
  846. }] if matrix_livekit_jwt_service_enabled else [])
  847. +
  848. ([{
  849. 'name': (livekit_server_identifier + '.service'),
  850. 'priority': 3000,
  851. 'restart_necessary': (livekit_server_restart_necessary | bool),
  852. 'groups': ['matrix', 'livekit-server'],
  853. }] if livekit_server_enabled else [])
  854. +
  855. ([{
  856. 'name': 'matrix-sygnal.service',
  857. 'priority': 800,
  858. 'restart_necessary': (matrix_sygnal_restart_necessary | bool),
  859. 'groups': ['matrix', 'sygnal'],
  860. }] if matrix_sygnal_enabled else [])
  861. +
  862. ([{
  863. 'name': 'matrix-goofys.service',
  864. 'priority': 800,
  865. 'restart_necessary': (matrix_goofys_restart_necessary | bool),
  866. 'groups': ['matrix', 'goofys'],
  867. }] if (matrix_synapse_enabled and matrix_s3_media_store_enabled) else [])
  868. +
  869. ([{
  870. 'name': 'matrix-synapse-s3-storage-provider-migrate.timer',
  871. 'priority': 5000,
  872. 'restart_necessary': (matrix_synapse_s3_storage_provider_restart_necessary | bool),
  873. 'groups': ['matrix'],
  874. }] if (matrix_synapse_enabled and matrix_synapse_ext_synapse_s3_storage_provider_enabled) else [])
  875. +
  876. ([{
  877. 'name': 'matrix-synapse-auto-compressor.timer',
  878. 'priority': 5000,
  879. 'restart_necessary': (matrix_synapse_auto_compressor_restart_necessary | bool),
  880. 'groups': ['matrix', 'synapse-auto-compressor'],
  881. }] if matrix_synapse_auto_compressor_enabled else [])
  882. +
  883. ([{
  884. 'name': 'matrix-ketesa.service',
  885. 'priority': 4000,
  886. 'restart_necessary': (matrix_ketesa_restart_necessary | bool),
  887. 'groups': ['matrix', 'ketesa'],
  888. }] if matrix_ketesa_enabled else [])
  889. +
  890. ([{
  891. 'name': (matrix_synapse_usage_exporter_identifier + '.service'),
  892. 'priority': 4000,
  893. 'restart_necessary': (matrix_synapse_usage_exporter_restart_necessary | bool),
  894. 'groups': ['matrix', 'synapse-usage-exporter'],
  895. }] if matrix_synapse_usage_exporter_enabled else [])
  896. +
  897. ([{
  898. 'name': 'matrix-synapse-reverse-proxy-companion.service',
  899. 'priority': 1500,
  900. 'restart_necessary': (matrix_synapse_reverse_proxy_companion_restart_necessary | bool),
  901. 'groups': ['matrix', 'homeservers', 'synapse', 'synapse-reverse-proxy-companion', 'reverse-proxies'],
  902. }] if matrix_synapse_reverse_proxy_companion_enabled else [])
  903. +
  904. ([{
  905. 'name': 'matrix-user-verification-service.service',
  906. 'priority': 800,
  907. 'restart_necessary': (matrix_user_verification_service_restart_necessary | bool),
  908. 'groups': ['matrix', 'matrix-user-verification-service'],
  909. }] if matrix_user_verification_service_enabled else [])
  910. +
  911. ([{
  912. 'name': (matrix_static_files_identifier + '.service'),
  913. 'priority': 4000,
  914. 'restart_necessary': (matrix_static_files_restart_necessary | bool),
  915. 'groups': ['matrix', 'matrix-static-files'],
  916. }] if matrix_static_files_enabled else [])
  917. +
  918. ([{
  919. 'name': (container_socket_proxy_identifier + '.service'),
  920. 'priority': 200,
  921. 'restart_necessary': (container_socket_proxy_restart_necessary | bool),
  922. 'groups': ['matrix', 'reverse-proxies', 'container-socket-proxy'],
  923. }] if container_socket_proxy_enabled else [])
  924. +
  925. ([{
  926. 'name': (traefik_identifier + '.service'),
  927. 'priority': 250,
  928. 'restart_necessary': (traefik_restart_necessary | bool),
  929. 'groups': ['matrix', 'traefik', 'reverse-proxies'],
  930. }] if traefik_enabled else [])
  931. +
  932. ([{
  933. 'name': (traefik_certs_dumper_identifier + '.service'),
  934. 'priority': 300,
  935. 'restart_necessary': (traefik_certs_dumper_restart_necessary | bool),
  936. 'groups': ['matrix', 'traefik-certs-dumper'],
  937. }] if traefik_certs_dumper_enabled else [])
  938. }}
  939. ########################################################################
  940. # #
  941. # /com.devture.ansible.role.systemd_service_manager #
  942. # #
  943. ########################################################################
  944. ########################################################################
  945. # #
  946. # com.devture.ansible.role.timesync #
  947. # #
  948. ########################################################################
  949. # To completely disable installing systemd-timesyncd/ntpd, use `devture_timesync_installation_enabled: false`.
  950. ########################################################################
  951. # #
  952. # /com.devture.ansible.role.timesync #
  953. # #
  954. ########################################################################
  955. ######################################################################
  956. #
  957. # com.devture.ansible.role.playbook_state_preserver
  958. #
  959. ######################################################################
  960. # To completely disable this feature, use `devture_playbook_state_preserver_enabled: false`.
  961. devture_playbook_state_preserver_uid: "{{ matrix_user_uid }}"
  962. devture_playbook_state_preserver_gid: "{{ matrix_user_gid }}"
  963. devture_playbook_state_preserver_vars_preservation_dst: "{{ matrix_base_data_path }}/vars.yml"
  964. devture_playbook_state_preserver_commit_hash_preservation_dst: "{{ matrix_base_data_path }}/git_hash.yml"
  965. ######################################################################
  966. #
  967. # /com.devture.ansible.role.playbook_state_preserver
  968. #
  969. ######################################################################
  970. ########################################################################
  971. # #
  972. # geerlingguy/ansible-role-docker #
  973. # #
  974. ########################################################################
  975. docker_daemon_options: "{{ matrix_playbook_docker_installation_daemon_options }}"
  976. ########################################################################
  977. # #
  978. # /geerlingguy/ansible-role-docker #
  979. # #
  980. ########################################################################
  981. ######################################################################
  982. #
  983. # matrix-base
  984. #
  985. ######################################################################
  986. matrix_homeserver_systemd_services_list: |-
  987. {{
  988. (
  989. ([('matrix-' + matrix_homeserver_implementation + '.service')] if matrix_homeserver_implementation != 'synapse' else [])
  990. +
  991. ([('matrix-' + matrix_homeserver_implementation + '.service')] if matrix_homeserver_implementation == 'synapse' and not matrix_synapse_reverse_proxy_companion_enabled else [])
  992. +
  993. (['matrix-synapse-reverse-proxy-companion.service'] if matrix_synapse_reverse_proxy_companion_enabled else [])
  994. ) | unique
  995. }}
  996. matrix_homeserver_container_client_api_endpoint: |-
  997. {{
  998. {
  999. 'synapse': ('matrix-synapse-reverse-proxy-companion:8008' if matrix_synapse_reverse_proxy_companion_enabled | default(false) else ('matrix-synapse:'+ matrix_synapse_container_client_api_port | default('8008') | string)),
  1000. 'dendrite': ('matrix-dendrite:' + matrix_dendrite_http_bind_port | default('8008') | string),
  1001. 'conduit': ('matrix-conduit:' + matrix_conduit_port_number | default('8008') | string),
  1002. 'continuwuity': ('matrix-continuwuity:' + matrix_continuwuity_config_port_number | default('8008') | string),
  1003. 'tuwunel': ('matrix-tuwunel:' + matrix_tuwunel_config_port_number | default('8008') | string),
  1004. }[matrix_homeserver_implementation]
  1005. }}
  1006. matrix_homeserver_container_federation_api_endpoint: |-
  1007. {{
  1008. {
  1009. 'synapse': ('matrix-synapse-reverse-proxy-companion:8048' if matrix_synapse_reverse_proxy_companion_enabled else ('matrix-synapse:'+ matrix_synapse_container_federation_api_plain_port | default('8008') | string)),
  1010. 'dendrite': ('matrix-dendrite:' + matrix_dendrite_http_bind_port | default('8008') | string),
  1011. 'conduit': ('matrix-conduit:' + matrix_conduit_port_number | default('8008') | string),
  1012. 'continuwuity': ('matrix-continuwuity:' + matrix_continuwuity_config_port_number | default('8008') | string),
  1013. 'tuwunel': ('matrix-tuwunel:' + matrix_tuwunel_config_port_number | default('8008') | string),
  1014. }[matrix_homeserver_implementation]
  1015. }}
  1016. matrix_integration_manager_rest_url: ""
  1017. matrix_integration_manager_ui_url: ""
  1018. ######################################################################
  1019. #
  1020. # /matrix-base
  1021. #
  1022. ######################################################################
  1023. ######################################################################
  1024. #
  1025. # matrix-alertmanager-receiver
  1026. #
  1027. ######################################################################
  1028. # We don't enable this by default.
  1029. matrix_alertmanager_receiver_enabled: false
  1030. matrix_alertmanager_receiver_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_alertmanager_receiver_container_image_registry_prefix_upstream_default }}"
  1031. matrix_alertmanager_receiver_container_image_self_build: "{{ matrix_architecture != 'amd64' }}"
  1032. matrix_alertmanager_receiver_container_network: "{{ matrix_addons_container_network }}"
  1033. matrix_alertmanager_receiver_container_additional_networks_auto: |-
  1034. {{
  1035. (
  1036. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  1037. +
  1038. ([matrix_playbook_reverse_proxyable_services_additional_network] if (matrix_playbook_reverse_proxyable_services_additional_network and matrix_alertmanager_receiver_container_labels_traefik_enabled) else [])
  1039. ) | unique
  1040. }}
  1041. matrix_alertmanager_receiver_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  1042. matrix_alertmanager_receiver_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  1043. matrix_alertmanager_receiver_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  1044. matrix_alertmanager_receiver_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  1045. matrix_alertmanager_receiver_container_labels_metrics_middleware_basic_auth_enabled: "{{ matrix_metrics_exposure_http_basic_auth_enabled }}"
  1046. matrix_alertmanager_receiver_container_labels_metrics_middleware_basic_auth_users: "{{ matrix_metrics_exposure_http_basic_auth_users }}"
  1047. matrix_alertmanager_receiver_systemd_required_services_list_auto: "{{ matrix_addons_homeserver_systemd_services_list }}"
  1048. matrix_alertmanager_receiver_config_matrix_homeserver_url: "{{ matrix_addons_homeserver_client_api_url }}"
  1049. matrix_alertmanager_receiver_metrics_enabled: "{{ prometheus_enabled or matrix_metrics_exposure_enabled }}"
  1050. matrix_alertmanager_receiver_metrics_proxying_enabled: "{{ matrix_alertmanager_receiver_config_http_metrics_enabled and matrix_metrics_exposure_enabled }}"
  1051. matrix_alertmanager_receiver_metrics_proxying_hostname: "{{ matrix_metrics_exposure_hostname }}"
  1052. matrix_alertmanager_receiver_metrics_proxying_path: "{{ matrix_metrics_exposure_path_prefix }}/matrix-alertmanager-receiver"
  1053. ######################################################################
  1054. #
  1055. # /matrix-alertmanager-receiver
  1056. #
  1057. ######################################################################
  1058. ######################################################################
  1059. #
  1060. # matrix-authentication-service
  1061. #
  1062. ######################################################################
  1063. matrix_authentication_service_enabled: false
  1064. matrix_authentication_service_hostname: "{{ matrix_server_fqn_matrix }}"
  1065. matrix_authentication_service_path_prefix: /auth
  1066. matrix_playbook_matrix_authentication_service_uses_managed_postgres: "{{ postgres_enabled }}"
  1067. matrix_authentication_service_config_database_host: "{{ matrix_authentication_service_config_database_socket_path if matrix_authentication_service_config_database_socket_enabled else (postgres_connection_hostname if matrix_playbook_matrix_authentication_service_uses_managed_postgres else '') }}"
  1068. matrix_authentication_service_config_database_password: "{{ (matrix_homeserver_generic_secret_key + ':mas.db') | hash('sha512') | to_uuid }}"
  1069. # unix socket connection
  1070. matrix_authentication_service_config_database_socket_enabled: "{{ matrix_playbook_matrix_authentication_service_uses_managed_postgres and postgres_container_unix_socket_enabled }}"
  1071. # path to the Postgres socket's parent dir inside the MAS container
  1072. matrix_authentication_service_config_database_socket_path: "{{ '/run-postgres' if matrix_playbook_matrix_authentication_service_uses_managed_postgres else '' }}"
  1073. # path to the Postgres socket on the host
  1074. matrix_authentication_service_config_database_socket_path_host: "{{ postgres_run_path if matrix_playbook_matrix_authentication_service_uses_managed_postgres else '' }}"
  1075. matrix_authentication_service_config_matrix_homeserver: "{{ matrix_domain }}"
  1076. matrix_authentication_service_config_matrix_secret: "{{ (matrix_homeserver_generic_secret_key + ':mas.hs.secret') | hash('sha512') | to_uuid }}"
  1077. matrix_authentication_service_config_matrix_endpoint: "{{ matrix_homeserver_container_url }}"
  1078. # We're using a non-default configuration which:
  1079. # - allows passwords from Synapse (hashed with bcrypt) to be imported with scheme version 1 so existing users will be able to login
  1080. # - as soon as they do one login, the hash will be 'upgraded' to argon2id
  1081. matrix_authentication_service_config_passwords_schemes:
  1082. - version: 1
  1083. secret: "{{ matrix_synapse_password_config_pepper }}"
  1084. algorithm: bcrypt
  1085. unicode_normalization: true
  1086. - version: 2
  1087. algorithm: argon2id
  1088. matrix_authentication_service_config_email_transport: "{{ 'smtp' if exim_relay_enabled else 'blackhole' }}"
  1089. matrix_authentication_service_config_email_hostname: "{{ exim_relay_identifier if exim_relay_enabled else '' }}"
  1090. matrix_authentication_service_config_email_port: "{{ 8025 if exim_relay_enabled else 587 }}"
  1091. matrix_authentication_service_config_email_mode: "{{ 'plain' if exim_relay_enabled else 'starttls' }}"
  1092. matrix_authentication_service_config_email_from_address: "{{ exim_relay_sender_address }}"
  1093. matrix_authentication_service_admin_api_enabled: "{{ matrix_element_admin_enabled or matrix_ketesa_enabled }}"
  1094. matrix_authentication_service_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_authentication_service_container_image_registry_prefix_upstream_default }}"
  1095. matrix_authentication_service_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm64'] }}"
  1096. matrix_authentication_service_container_network: "{{ matrix_homeserver_container_network }}"
  1097. matrix_authentication_service_container_additional_networks_auto: |-
  1098. {{
  1099. (
  1100. ([postgres_container_network] if (matrix_playbook_matrix_authentication_service_uses_managed_postgres and not matrix_authentication_service_config_database_socket_enabled) else [])
  1101. +
  1102. ([exim_relay_container_network] if (exim_relay_enabled and matrix_authentication_service_config_email_transport == 'smtp' and matrix_authentication_service_config_email_hostname == exim_relay_identifier and matrix_authentication_service_container_network != exim_relay_container_network) else [])
  1103. +
  1104. ([matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network and matrix_authentication_service_container_labels_traefik_enabled else [])
  1105. ) | unique
  1106. }}
  1107. matrix_authentication_service_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  1108. matrix_authentication_service_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  1109. matrix_authentication_service_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  1110. matrix_authentication_service_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  1111. matrix_authentication_service_container_labels_public_compatibility_layer_enabled: "{{ not matrix_authentication_service_migration_in_progress}}"
  1112. matrix_authentication_service_container_labels_public_compatibility_layer_hostname: "{{ matrix_server_fqn_matrix }}"
  1113. matrix_authentication_service_container_labels_internal_compatibility_layer_enabled: "{{ not matrix_authentication_service_migration_in_progress}}"
  1114. matrix_authentication_service_container_labels_internal_compatibility_layer_entrypoints: "{{ matrix_playbook_internal_matrix_client_api_traefik_entrypoint_name }}"
  1115. # MAS somewhat depends on the homeserver service, but the homeserver also depends on MAS.
  1116. # To avoid a circular dependency, we make MAS not depend on the homeserver here.
  1117. # The homeserver is more lost without MAS than MAS is without the homeserver, so we'll define the dependency on the homeserver side.
  1118. # We'll put our dependency on the homeserver as a "want", rather than a requirement.
  1119. matrix_authentication_service_systemd_required_services_list_auto: |
  1120. {{
  1121. ([postgres_identifier ~ '.service'] if matrix_playbook_matrix_authentication_service_uses_managed_postgres else [])
  1122. }}
  1123. # See more information about this homeserver "want" in the comment for `matrix_authentication_service_systemd_required_services_list_auto` above.
  1124. matrix_authentication_service_systemd_wanted_services_list_auto: |
  1125. {{
  1126. ['matrix-' + matrix_homeserver_implementation + '.service']
  1127. +
  1128. ([exim_relay_identifier ~ '.service'] if (exim_relay_enabled and matrix_authentication_service_config_email_transport == 'smtp' and matrix_authentication_service_config_email_hostname == exim_relay_identifier and matrix_authentication_service_container_network != exim_relay_container_network) else [])
  1129. }}
  1130. matrix_authentication_service_syn2mas_container_network: "{{ postgres_container_network if (matrix_playbook_matrix_authentication_service_uses_managed_postgres and not matrix_authentication_service_config_database_socket_enabled) else matrix_authentication_service_container_network }}"
  1131. matrix_authentication_service_syn2mas_synapse_homeserver_config_path: "{{ matrix_synapse_config_dir_path + '/homeserver.yaml' if matrix_synapse_enabled else '' }}"
  1132. matrix_authentication_service_syn2mas_synapse_database_socket_enabled: "{{ matrix_synapse_database_socket_enabled if matrix_synapse_enabled else false }}"
  1133. matrix_authentication_service_syn2mas_synapse_database_socket_path: "{{ matrix_synapse_database_socket_path if matrix_synapse_enabled else '' }}"
  1134. matrix_authentication_service_syn2mas_synapse_database_socket_path_host: "{{ matrix_synapse_database_socket_path_host if matrix_synapse_enabled else '' }}"
  1135. ######################################################################
  1136. #
  1137. # /matrix-authentication-service
  1138. #
  1139. ######################################################################
  1140. ######################################################################
  1141. #
  1142. # matrix-bridge-appservice-discord
  1143. #
  1144. ######################################################################
  1145. # We don't enable bridges by default.
  1146. matrix_bridge_appservice_discord_enabled: false
  1147. matrix_bridge_appservice_discord_systemd_required_services_list_auto: |
  1148. {{
  1149. matrix_addons_homeserver_systemd_services_list
  1150. +
  1151. ([postgres_identifier ~ '.service'] if (postgres_enabled and matrix_bridge_appservice_discord_database_hostname == postgres_connection_hostname) else [])
  1152. }}
  1153. matrix_bridge_appservice_discord_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_bridge_appservice_discord_container_image_registry_prefix_upstream_default }}"
  1154. matrix_bridge_appservice_discord_container_http_host_bind_port: "{{ (matrix_playbook_service_host_bind_interface_prefix ~ '9005') if matrix_playbook_service_host_bind_interface_prefix else '' }}"
  1155. matrix_bridge_appservice_discord_container_network: "{{ matrix_addons_container_network }}"
  1156. matrix_bridge_appservice_discord_container_additional_networks_auto: |-
  1157. {{
  1158. (
  1159. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  1160. +
  1161. ([postgres_container_network] if (postgres_enabled and matrix_bridge_appservice_discord_database_hostname == postgres_connection_hostname and matrix_bridge_appservice_discord_container_network != postgres_container_network) else [])
  1162. ) | unique
  1163. }}
  1164. # If the homeserver disables presence, it's likely better (less wasteful) to also disable presence on the bridge side.
  1165. matrix_bridge_appservice_discord_bridge_disablePresence: "{{ (not matrix_synapse_presence_enabled) if matrix_homeserver_implementation == 'synapse' else false }}"
  1166. matrix_bridge_appservice_discord_appservice_token: "{{ (matrix_homeserver_generic_secret_key + ':discord.as.token') | hash('sha512') | to_uuid }}"
  1167. matrix_bridge_appservice_discord_homeserver_token: "{{ (matrix_homeserver_generic_secret_key + ':discord.hs.token') | hash('sha512') | to_uuid }}"
  1168. # We only make this use Postgres if our own Postgres server is enabled.
  1169. # It's only then (for now) that we can automatically create the necessary database and user for this service.
  1170. matrix_bridge_appservice_discord_database_engine: "{{ 'postgres' if postgres_enabled else 'sqlite' }}"
  1171. matrix_bridge_appservice_discord_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  1172. matrix_bridge_appservice_discord_database_password: "{{ (matrix_homeserver_generic_secret_key + ':as.discord.db') | hash('sha512') | to_uuid }}"
  1173. ######################################################################
  1174. #
  1175. # /matrix-bridge-appservice-discord
  1176. #
  1177. ######################################################################
  1178. ######################################################################
  1179. #
  1180. # matrix-bridge-appservice-irc
  1181. #
  1182. ######################################################################
  1183. # We don't enable bridges by default.
  1184. matrix_bridge_appservice_irc_enabled: false
  1185. matrix_bridge_appservice_irc_systemd_required_services_list_auto: |
  1186. {{
  1187. matrix_addons_homeserver_systemd_services_list
  1188. +
  1189. ([postgres_identifier ~ '.service'] if (postgres_enabled and matrix_bridge_appservice_irc_database_hostname == postgres_connection_hostname) else [])
  1190. }}
  1191. matrix_bridge_appservice_irc_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_bridge_appservice_irc_container_image_registry_prefix_upstream_default }}"
  1192. matrix_bridge_appservice_irc_container_image_self_build: "{{ matrix_architecture != 'amd64' }}"
  1193. matrix_bridge_appservice_irc_container_http_host_bind_port: "{{ (matrix_playbook_service_host_bind_interface_prefix ~ '9999') if matrix_playbook_service_host_bind_interface_prefix else '' }}"
  1194. matrix_bridge_appservice_irc_container_network: "{{ matrix_addons_container_network }}"
  1195. matrix_bridge_appservice_irc_container_additional_networks_auto: |-
  1196. {{
  1197. (
  1198. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  1199. +
  1200. ([postgres_container_network] if (postgres_enabled and matrix_bridge_appservice_irc_database_hostname == postgres_connection_hostname and matrix_bridge_appservice_irc_container_network != postgres_container_network) else [])
  1201. +
  1202. [matrix_playbook_reverse_proxyable_services_additional_network] if (matrix_bridge_appservice_irc_container_labels_traefik_enabled and matrix_playbook_reverse_proxyable_services_additional_network) else []
  1203. ) | unique
  1204. }}
  1205. # The IRC bridge docs say that if homeserver presence is disabled, it's better to also disable
  1206. # IRC bridge presence, for performance reasons.
  1207. matrix_bridge_appservice_irc_homeserver_enablePresence: "{{ matrix_synapse_presence_enabled if matrix_homeserver_implementation == 'synapse' else true }}"
  1208. matrix_bridge_appservice_irc_appservice_token: "{{ (matrix_homeserver_generic_secret_key + ':irc.as.token') | hash('sha512') | to_uuid }}"
  1209. matrix_bridge_appservice_irc_homeserver_url: "{{ matrix_addons_homeserver_client_api_url }}"
  1210. matrix_bridge_appservice_irc_homeserver_token: "{{ (matrix_homeserver_generic_secret_key + ':irc.hs.token') | hash('sha512') | to_uuid }}"
  1211. matrix_bridge_appservice_irc_database_engine: "{{ 'postgres' if postgres_enabled else 'nedb' }}"
  1212. matrix_bridge_appservice_irc_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  1213. matrix_bridge_appservice_irc_database_password: "{{ (matrix_homeserver_generic_secret_key + ':as.irc.db') | hash('sha512') | to_uuid }}"
  1214. matrix_bridge_appservice_irc_database_container_network: "{{ postgres_container_network if postgres_enabled else '' }}"
  1215. matrix_bridge_appservice_irc_ircService_mediaProxy_publicUrl_scheme: "{{ 'https' if matrix_playbook_ssl_enabled else 'http' }}" # noqa var-naming
  1216. matrix_bridge_appservice_irc_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  1217. matrix_bridge_appservice_irc_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  1218. matrix_bridge_appservice_irc_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  1219. matrix_bridge_appservice_irc_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}" # noqa var-naming
  1220. ######################################################################
  1221. #
  1222. # /matrix-bridge-appservice-irc
  1223. #
  1224. ######################################################################
  1225. ######################################################################
  1226. #
  1227. # matrix-bridge-beeper-linkedin
  1228. #
  1229. ######################################################################
  1230. # We don't enable bridges by default.
  1231. matrix_bridge_beeper_linkedin_enabled: false
  1232. matrix_bridge_beeper_linkedin_systemd_required_services_list_auto: |
  1233. {{
  1234. matrix_addons_homeserver_systemd_services_list
  1235. +
  1236. ([postgres_identifier ~ '.service'] if (postgres_enabled and matrix_bridge_beeper_linkedin_database_hostname == postgres_connection_hostname) else [])
  1237. }}
  1238. matrix_bridge_beeper_linkedin_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_bridge_beeper_linkedin_container_image_registry_prefix_upstream_default }}"
  1239. matrix_bridge_beeper_linkedin_container_image_self_build: "{{ matrix_architecture not in ['amd64'] }}"
  1240. matrix_bridge_beeper_linkedin_container_network: "{{ matrix_addons_container_network }}"
  1241. matrix_bridge_beeper_linkedin_container_additional_networks_auto: |-
  1242. {{
  1243. (
  1244. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  1245. +
  1246. ([postgres_container_network] if (postgres_enabled and matrix_bridge_beeper_linkedin_database_hostname == postgres_connection_hostname and matrix_bridge_beeper_linkedin_container_network != postgres_container_network) else [])
  1247. ) | unique
  1248. }}
  1249. matrix_bridge_beeper_linkedin_appservice_token: "{{ (matrix_homeserver_generic_secret_key + ':linked.as.token') | hash('sha512') | to_uuid }}"
  1250. matrix_bridge_beeper_linkedin_homeserver_address: "{{ matrix_addons_homeserver_client_api_url }}"
  1251. matrix_bridge_beeper_linkedin_homeserver_token: "{{ (matrix_homeserver_generic_secret_key + ':linked.hs.token') | hash('sha512') | to_uuid }}"
  1252. matrix_bridge_beeper_linkedin_homeserver_async_media: "{{ matrix_homeserver_implementation in ['synapse'] }}"
  1253. matrix_bridge_beeper_linkedin_bridge_login_shared_secret_map_auto: |-
  1254. {{
  1255. ({
  1256. matrix_bridge_beeper_linkedin_homeserver_domain: ("as_token:" + matrix_appservice_double_puppet_registration_as_token)
  1257. })
  1258. if matrix_appservice_double_puppet_enabled
  1259. else (
  1260. {matrix_bridge_beeper_linkedin_homeserver_domain: matrix_synapse_ext_password_provider_shared_secret_auth_shared_secret}
  1261. if matrix_synapse_ext_password_provider_shared_secret_auth_enabled
  1262. else {}
  1263. )
  1264. }}
  1265. matrix_bridge_beeper_linkedin_bridge_presence: "{{ (matrix_synapse_presence_enabled if matrix_synapse_enabled else true) if matrix_homeserver_implementation == 'synapse' else true }}"
  1266. matrix_bridge_beeper_linkedin_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  1267. matrix_bridge_beeper_linkedin_database_password: "{{ (matrix_homeserver_generic_secret_key + ':maulinkedin.db') | hash('sha512') | to_uuid }}"
  1268. ######################################################################
  1269. #
  1270. # /matrix-bridge-beeper-linkedin
  1271. #
  1272. ######################################################################
  1273. ######################################################################
  1274. #
  1275. # matrix-bridge-beeper-line
  1276. #
  1277. ######################################################################
  1278. # We don't enable bridges by default.
  1279. matrix_bridge_beeper_line_enabled: false
  1280. matrix_bridge_beeper_line_systemd_required_services_list_auto: |
  1281. {{
  1282. matrix_addons_homeserver_systemd_services_list
  1283. +
  1284. ([postgres_identifier ~ '.service'] if (postgres_enabled and matrix_bridge_beeper_line_database_hostname == postgres_connection_hostname) else [])
  1285. }}
  1286. matrix_bridge_beeper_line_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_bridge_beeper_line_container_image_registry_prefix_upstream_default }}"
  1287. matrix_bridge_beeper_line_container_image_self_build: "{{ matrix_architecture not in ['amd64'] }}"
  1288. matrix_bridge_beeper_line_container_network: "{{ matrix_addons_container_network }}"
  1289. matrix_bridge_beeper_line_container_additional_networks_auto: |-
  1290. {{
  1291. (
  1292. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  1293. +
  1294. ([postgres_container_network] if (postgres_enabled and matrix_bridge_beeper_line_database_hostname == postgres_connection_hostname and matrix_bridge_beeper_line_container_network != postgres_container_network) else [])
  1295. +
  1296. ([matrix_playbook_reverse_proxyable_services_additional_network] if (matrix_playbook_reverse_proxyable_services_additional_network and matrix_bridge_beeper_line_container_labels_traefik_enabled) else [])
  1297. ) | unique
  1298. }}
  1299. matrix_bridge_beeper_line_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  1300. matrix_bridge_beeper_line_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  1301. matrix_bridge_beeper_line_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  1302. matrix_bridge_beeper_line_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  1303. matrix_bridge_beeper_line_appservice_token: "{{ (matrix_homeserver_generic_secret_key + ':line.as.token') | hash('sha512') | to_uuid }}"
  1304. matrix_bridge_beeper_line_homeserver_address: "{{ matrix_addons_homeserver_client_api_url }}"
  1305. matrix_bridge_beeper_line_homeserver_token: "{{ (matrix_homeserver_generic_secret_key + ':line.hs.token') | hash('sha512') | to_uuid }}"
  1306. matrix_bridge_beeper_line_homeserver_async_media: "{{ matrix_homeserver_implementation in ['synapse'] }}"
  1307. matrix_bridge_beeper_line_provisioning_shared_secret: "{{ (matrix_homeserver_generic_secret_key + ':line.prov') | hash('sha512') | to_uuid }}"
  1308. matrix_bridge_beeper_line_double_puppet_secrets_auto: |-
  1309. {{
  1310. ({
  1311. matrix_bridge_beeper_line_homeserver_domain: ("as_token:" + matrix_appservice_double_puppet_registration_as_token)
  1312. })
  1313. if matrix_appservice_double_puppet_enabled
  1314. else {}
  1315. }}
  1316. matrix_bridge_beeper_line_scheme: "{{ 'https' if matrix_playbook_ssl_enabled else 'http' }}"
  1317. matrix_bridge_beeper_line_exposure_enabled: "{{ matrix_bridges_exposure_enabled }}"
  1318. matrix_bridge_beeper_line_exposure_hostname: "{{ matrix_bridges_exposure_hostname }}"
  1319. matrix_bridge_beeper_line_exposure_path_prefix: "{{ matrix_bridges_exposure_path_prefix }}/line"
  1320. matrix_bridge_beeper_line_database_engine: "{{ 'postgres' if postgres_enabled else 'sqlite' }}"
  1321. matrix_bridge_beeper_line_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  1322. matrix_bridge_beeper_line_database_password: "{{ (matrix_homeserver_generic_secret_key + ':line.db') | hash('sha512') | to_uuid }}"
  1323. ######################################################################
  1324. #
  1325. # /matrix-bridge-beeper-line
  1326. #
  1327. ######################################################################
  1328. ######################################################################
  1329. #
  1330. # matrix-bridge-mautrix-bluesky
  1331. #
  1332. ######################################################################
  1333. # We don't enable bridges by default.
  1334. matrix_bridge_mautrix_bluesky_enabled: false
  1335. matrix_bridge_mautrix_bluesky_systemd_required_services_list_auto: |
  1336. {{
  1337. matrix_addons_homeserver_systemd_services_list
  1338. +
  1339. ([postgres_identifier ~ '.service'] if (postgres_enabled and matrix_bridge_mautrix_bluesky_database_hostname == postgres_connection_hostname) else [])
  1340. }}
  1341. matrix_bridge_mautrix_bluesky_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_bridge_mautrix_bluesky_container_image_registry_prefix_upstream_default }}"
  1342. matrix_bridge_mautrix_bluesky_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm64'] }}"
  1343. matrix_bridge_mautrix_bluesky_container_network: "{{ matrix_addons_container_network }}"
  1344. matrix_bridge_mautrix_bluesky_container_additional_networks_auto: |-
  1345. {{
  1346. (
  1347. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  1348. +
  1349. ([postgres_container_network] if (postgres_enabled and matrix_bridge_mautrix_bluesky_database_hostname == postgres_connection_hostname and matrix_bridge_mautrix_bluesky_container_network != postgres_container_network) else [])
  1350. +
  1351. ([matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network and matrix_bridge_mautrix_bluesky_container_labels_traefik_enabled else [])
  1352. ) | unique
  1353. }}
  1354. matrix_bridge_mautrix_bluesky_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  1355. matrix_bridge_mautrix_bluesky_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  1356. matrix_bridge_mautrix_bluesky_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  1357. matrix_bridge_mautrix_bluesky_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  1358. matrix_bridge_mautrix_bluesky_appservice_token: "{{ (matrix_homeserver_generic_secret_key + ':bsky.as.token') | hash('sha512') | to_uuid }}"
  1359. matrix_bridge_mautrix_bluesky_homeserver_address: "{{ matrix_addons_homeserver_client_api_url }}"
  1360. matrix_bridge_mautrix_bluesky_homeserver_token: "{{ (matrix_homeserver_generic_secret_key + ':bsky.hs.token') | hash('sha512') | to_uuid }}"
  1361. matrix_bridge_mautrix_bluesky_homeserver_async_media: "{{ matrix_homeserver_implementation in ['synapse'] }}"
  1362. matrix_bridge_mautrix_bluesky_provisioning_shared_secret: "{{ (matrix_homeserver_generic_secret_key + ':mau.bsky.prov') | hash('sha512') | to_uuid }}"
  1363. matrix_bridge_mautrix_bluesky_double_puppet_secrets_auto: |-
  1364. {{
  1365. ({
  1366. matrix_bridge_mautrix_bluesky_homeserver_domain: ("as_token:" + matrix_appservice_double_puppet_registration_as_token)
  1367. })
  1368. if matrix_appservice_double_puppet_enabled
  1369. else {}
  1370. }}
  1371. matrix_bridge_mautrix_bluesky_scheme: "{{ 'https' if matrix_playbook_ssl_enabled else 'http' }}"
  1372. matrix_bridge_mautrix_bluesky_exposure_enabled: "{{ matrix_bridges_exposure_enabled }}"
  1373. matrix_bridge_mautrix_bluesky_exposure_hostname: "{{ matrix_bridges_exposure_hostname }}"
  1374. matrix_bridge_mautrix_bluesky_exposure_path_prefix: "{{ matrix_bridges_exposure_path_prefix }}/bluesky"
  1375. matrix_bridge_mautrix_bluesky_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  1376. matrix_bridge_mautrix_bluesky_database_password: "{{ (matrix_homeserver_generic_secret_key + ':mau.twt.db') | hash('sha512') | to_uuid if postgres_enabled else '' }}"
  1377. ######################################################################
  1378. #
  1379. # /matrix-bridge-mautrix-bluesky
  1380. #
  1381. ######################################################################
  1382. ######################################################################
  1383. #
  1384. # matrix-bridge-rustpush
  1385. #
  1386. ######################################################################
  1387. # We don't enable bridges by default.
  1388. matrix_bridge_rustpush_enabled: false
  1389. matrix_bridge_rustpush_systemd_required_services_list_auto: |
  1390. {{
  1391. matrix_addons_homeserver_systemd_services_list
  1392. +
  1393. ([postgres_identifier ~ '.service'] if (postgres_enabled and matrix_bridge_rustpush_database_hostname == postgres_connection_hostname) else [])
  1394. }}
  1395. matrix_bridge_rustpush_container_network: "{{ matrix_addons_container_network }}"
  1396. matrix_bridge_rustpush_container_additional_networks_auto: |-
  1397. {{
  1398. (
  1399. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  1400. +
  1401. ([postgres_container_network] if (postgres_enabled and matrix_bridge_rustpush_database_hostname == postgres_connection_hostname and matrix_bridge_rustpush_container_network != postgres_container_network) else [])
  1402. +
  1403. ([matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network and matrix_bridge_rustpush_container_labels_traefik_enabled else [])
  1404. ) | unique
  1405. }}
  1406. matrix_bridge_rustpush_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  1407. matrix_bridge_rustpush_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  1408. matrix_bridge_rustpush_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  1409. matrix_bridge_rustpush_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  1410. matrix_bridge_rustpush_appservice_token: "{{ (matrix_homeserver_generic_secret_key + ':imsg.as.token') | hash('sha512') | to_uuid }}"
  1411. matrix_bridge_rustpush_homeserver_address: "{{ matrix_addons_homeserver_client_api_url }}"
  1412. matrix_bridge_rustpush_homeserver_token: "{{ (matrix_homeserver_generic_secret_key + ':imsg.hs.token') | hash('sha512') | to_uuid }}"
  1413. matrix_bridge_rustpush_homeserver_async_media: "{{ matrix_homeserver_implementation in ['synapse'] }}"
  1414. matrix_bridge_rustpush_provisioning_shared_secret: "{{ (matrix_homeserver_generic_secret_key + ':mau.imsg.prov') | hash('sha512') | to_uuid }}"
  1415. matrix_bridge_rustpush_exposure_enabled: "{{ matrix_bridges_exposure_enabled }}"
  1416. matrix_bridge_rustpush_exposure_hostname: "{{ matrix_bridges_exposure_hostname }}"
  1417. matrix_bridge_rustpush_exposure_path_prefix: "{{ matrix_bridges_exposure_path_prefix }}/imessage"
  1418. matrix_bridge_rustpush_double_puppet_secrets_auto: |-
  1419. {{
  1420. ({
  1421. matrix_bridge_rustpush_homeserver_domain: ("as_token:" + matrix_appservice_double_puppet_registration_as_token)
  1422. })
  1423. if matrix_appservice_double_puppet_enabled
  1424. else {}
  1425. }}
  1426. matrix_bridge_rustpush_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  1427. matrix_bridge_rustpush_database_password: "{{ (matrix_homeserver_generic_secret_key + ':mau.imsg.db') | hash('sha512') | to_uuid if postgres_enabled else '' }}"
  1428. ######################################################################
  1429. #
  1430. # /matrix-bridge-rustpush
  1431. #
  1432. ######################################################################
  1433. ######################################################################
  1434. #
  1435. # matrix-bridge-mautrix-discord
  1436. #
  1437. ######################################################################
  1438. # We don't enable bridges by default.
  1439. matrix_bridge_mautrix_discord_enabled: false
  1440. matrix_bridge_mautrix_discord_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_bridge_mautrix_discord_container_image_registry_prefix_upstream_default }}"
  1441. matrix_bridge_mautrix_discord_container_image_self_build: "{{ matrix_architecture not in ['arm64', 'amd64'] }}"
  1442. matrix_bridge_mautrix_discord_container_network: "{{ matrix_addons_container_network }}"
  1443. matrix_bridge_mautrix_discord_container_additional_networks_auto: |-
  1444. {{
  1445. (
  1446. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  1447. +
  1448. ([postgres_container_network] if postgres_enabled and matrix_bridge_mautrix_discord_database_hostname == postgres_connection_hostname else [])
  1449. +
  1450. ([matrix_playbook_reverse_proxyable_services_additional_network] if (matrix_playbook_reverse_proxyable_services_additional_network and matrix_bridge_mautrix_discord_container_labels_traefik_enabled) else [])
  1451. ) | unique
  1452. }}
  1453. matrix_bridge_mautrix_discord_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  1454. matrix_bridge_mautrix_discord_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  1455. matrix_bridge_mautrix_discord_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  1456. matrix_bridge_mautrix_discord_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  1457. matrix_bridge_mautrix_discord_systemd_required_services_list_auto: |
  1458. {{
  1459. matrix_addons_homeserver_systemd_services_list
  1460. +
  1461. ([postgres_identifier ~ '.service'] if (postgres_enabled and matrix_bridge_mautrix_discord_database_hostname == postgres_connection_hostname) else [])
  1462. }}
  1463. matrix_bridge_mautrix_discord_appservice_token: "{{ (matrix_homeserver_generic_secret_key + ':maudisc.as.tok') | hash('sha512') | to_uuid }}"
  1464. matrix_bridge_mautrix_discord_homeserver_address: "{{ matrix_addons_homeserver_client_api_url }}"
  1465. matrix_bridge_mautrix_discord_homeserver_token: "{{ (matrix_homeserver_generic_secret_key + ':maudisc.hs.tok') | hash('sha512') | to_uuid }}"
  1466. matrix_bridge_mautrix_discord_homeserver_async_media: "{{ matrix_homeserver_implementation in ['synapse'] }}"
  1467. matrix_bridge_mautrix_discord_bridge_avatar_proxy_key: "{{ (matrix_homeserver_generic_secret_key + ':maudisc.avatar') | hash('sha512') | to_uuid }}"
  1468. matrix_bridge_mautrix_discord_hostname: "{{ matrix_server_fqn_matrix }}"
  1469. matrix_bridge_mautrix_discord_scheme: "{{ 'https' if matrix_playbook_ssl_enabled else 'http' }}"
  1470. matrix_bridge_mautrix_discord_bridge_login_shared_secret_map_auto: |-
  1471. {{
  1472. ({
  1473. matrix_bridge_mautrix_discord_homeserver_domain: ("as_token:" + matrix_appservice_double_puppet_registration_as_token)
  1474. })
  1475. if matrix_appservice_double_puppet_enabled
  1476. else (
  1477. {matrix_bridge_mautrix_discord_homeserver_domain: matrix_synapse_ext_password_provider_shared_secret_auth_shared_secret}
  1478. if matrix_synapse_ext_password_provider_shared_secret_auth_enabled
  1479. else {}
  1480. )
  1481. }}
  1482. # Postgres is the default, except if not using internal Postgres server
  1483. matrix_bridge_mautrix_discord_database_engine: "{{ 'postgres' if postgres_enabled else 'sqlite' }}"
  1484. matrix_bridge_mautrix_discord_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  1485. matrix_bridge_mautrix_discord_database_password: "{{ (matrix_homeserver_generic_secret_key + ':maudiscord.db') | hash('sha512') | to_uuid }}"
  1486. ######################################################################
  1487. #
  1488. # /matrix-bridge-mautrix-discord
  1489. #
  1490. ######################################################################
  1491. ######################################################################
  1492. #
  1493. # matrix-bridge-mautrix-slack
  1494. #
  1495. ######################################################################
  1496. # We don't enable bridges by default.
  1497. matrix_bridge_mautrix_slack_enabled: false
  1498. matrix_bridge_mautrix_slack_systemd_required_services_list_auto: |
  1499. {{
  1500. matrix_addons_homeserver_systemd_services_list
  1501. +
  1502. ([postgres_identifier ~ '.service'] if (postgres_enabled and matrix_bridge_mautrix_slack_database_hostname == postgres_connection_hostname) else [])
  1503. }}
  1504. matrix_bridge_mautrix_slack_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_bridge_mautrix_slack_container_image_registry_prefix_upstream_default }}"
  1505. matrix_bridge_mautrix_slack_container_image_self_build: "{{ matrix_architecture not in ['arm64', 'amd64'] }}"
  1506. matrix_bridge_mautrix_slack_container_network: "{{ matrix_addons_container_network }}"
  1507. matrix_bridge_mautrix_slack_container_additional_networks_auto: |-
  1508. {{
  1509. (
  1510. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  1511. +
  1512. ([postgres_container_network] if (postgres_enabled and matrix_bridge_mautrix_slack_database_hostname == postgres_connection_hostname and matrix_bridge_mautrix_slack_container_network != postgres_container_network) else [])
  1513. +
  1514. ([matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network and matrix_bridge_mautrix_slack_container_labels_traefik_enabled else [])
  1515. ) | unique
  1516. }}
  1517. matrix_bridge_mautrix_slack_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  1518. matrix_bridge_mautrix_slack_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  1519. matrix_bridge_mautrix_slack_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  1520. matrix_bridge_mautrix_slack_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  1521. matrix_bridge_mautrix_slack_appservice_token: "{{ (matrix_homeserver_generic_secret_key + ':mauslack.as.tok') | hash('sha512') | to_uuid }}"
  1522. matrix_bridge_mautrix_slack_homeserver_address: "{{ matrix_addons_homeserver_client_api_url }}"
  1523. matrix_bridge_mautrix_slack_homeserver_token: "{{ (matrix_homeserver_generic_secret_key + ':mauslack.hs.tok') | hash('sha512') | to_uuid }}"
  1524. matrix_bridge_mautrix_slack_homeserver_async_media: "{{ matrix_homeserver_implementation in ['synapse'] }}"
  1525. matrix_bridge_mautrix_slack_double_puppet_secrets_auto: |-
  1526. {{
  1527. {
  1528. matrix_bridge_mautrix_slack_homeserver_domain: ("as_token:" + matrix_appservice_double_puppet_registration_as_token)
  1529. }
  1530. if matrix_appservice_double_puppet_enabled
  1531. else {}
  1532. }}
  1533. # Postgres is the default, except if not using internal Postgres server
  1534. matrix_bridge_mautrix_slack_database_engine: "{{ 'postgres' if postgres_enabled else 'sqlite' }}"
  1535. matrix_bridge_mautrix_slack_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  1536. matrix_bridge_mautrix_slack_database_password: "{{ (matrix_homeserver_generic_secret_key + ':mauslack.db') | hash('sha512') | to_uuid }}"
  1537. matrix_bridge_mautrix_slack_provisioning_shared_secret: "{{ (matrix_homeserver_generic_secret_key + ':mau.slack.prov') | hash('sha512') | to_uuid }}"
  1538. matrix_bridge_mautrix_slack_public_media_signing_key: "{{ (matrix_homeserver_generic_secret_key + ':mau.slack.pmed') | hash('sha512') | to_uuid }}"
  1539. matrix_bridge_mautrix_slack_scheme: "{{ 'https' if matrix_playbook_ssl_enabled else 'http' }}"
  1540. matrix_bridge_mautrix_slack_exposure_enabled: "{{ matrix_bridges_exposure_enabled }}"
  1541. matrix_bridge_mautrix_slack_exposure_hostname: "{{ matrix_bridges_exposure_hostname }}"
  1542. matrix_bridge_mautrix_slack_exposure_path_prefix: "{{ matrix_bridges_exposure_path_prefix }}/slack"
  1543. ######################################################################
  1544. #
  1545. # /matrix-bridge-mautrix-slack
  1546. #
  1547. ######################################################################
  1548. ######################################################################
  1549. #
  1550. # matrix-bridge-mautrix-googlechat
  1551. #
  1552. ######################################################################
  1553. # We don't enable bridges by default.
  1554. matrix_bridge_mautrix_googlechat_enabled: false
  1555. matrix_bridge_mautrix_googlechat_systemd_required_services_list_auto: |
  1556. {{
  1557. matrix_addons_homeserver_systemd_services_list
  1558. +
  1559. ([postgres_identifier ~ '.service'] if (postgres_enabled and matrix_bridge_mautrix_googlechat_database_hostname == postgres_connection_hostname) else [])
  1560. }}
  1561. matrix_bridge_mautrix_googlechat_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_bridge_mautrix_googlechat_container_image_registry_prefix_upstream_default }}"
  1562. matrix_bridge_mautrix_googlechat_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm64'] }}"
  1563. matrix_bridge_mautrix_googlechat_container_http_host_bind_port: "{{ (matrix_playbook_service_host_bind_interface_prefix ~ '9007') if matrix_playbook_service_host_bind_interface_prefix else '' }}"
  1564. matrix_bridge_mautrix_googlechat_container_network: "{{ matrix_addons_container_network }}"
  1565. matrix_bridge_mautrix_googlechat_container_additional_networks_auto: |-
  1566. {{
  1567. (
  1568. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  1569. +
  1570. ([postgres_container_network] if (postgres_enabled and matrix_bridge_mautrix_googlechat_database_hostname == postgres_connection_hostname and matrix_bridge_mautrix_googlechat_container_network != postgres_container_network) else [])
  1571. +
  1572. ([matrix_playbook_reverse_proxyable_services_additional_network] if (matrix_playbook_reverse_proxyable_services_additional_network and matrix_bridge_mautrix_gmessages_container_labels_traefik_enabled) else [])
  1573. ) | unique
  1574. }}
  1575. matrix_bridge_mautrix_googlechat_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  1576. matrix_bridge_mautrix_googlechat_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  1577. matrix_bridge_mautrix_googlechat_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  1578. matrix_bridge_mautrix_googlechat_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  1579. matrix_bridge_mautrix_googlechat_container_labels_public_endpoint_hostname: "{{ matrix_server_fqn_matrix }}"
  1580. matrix_bridge_mautrix_googlechat_container_labels_metrics_middleware_basic_auth_enabled: "{{ matrix_metrics_exposure_http_basic_auth_enabled }}"
  1581. matrix_bridge_mautrix_googlechat_container_labels_metrics_middleware_basic_auth_users: "{{ matrix_metrics_exposure_http_basic_auth_users }}"
  1582. matrix_bridge_mautrix_googlechat_appservice_token: "{{ (matrix_homeserver_generic_secret_key + ':gc.as.token') | hash('sha512') | to_uuid }}"
  1583. matrix_bridge_mautrix_googlechat_homeserver_address: "{{ matrix_addons_homeserver_client_api_url }}"
  1584. matrix_bridge_mautrix_googlechat_homeserver_token: "{{ (matrix_homeserver_generic_secret_key + ':gc.hs.token') | hash('sha512') | to_uuid }}"
  1585. matrix_bridge_mautrix_googlechat_login_shared_secret: |-
  1586. {{
  1587. ("as_token:" + matrix_appservice_double_puppet_registration_as_token)
  1588. if matrix_appservice_double_puppet_enabled
  1589. else (
  1590. matrix_synapse_ext_password_provider_shared_secret_auth_shared_secret if matrix_synapse_ext_password_provider_shared_secret_auth_enabled
  1591. if matrix_synapse_ext_password_provider_shared_secret_auth_enabled
  1592. else ""
  1593. )
  1594. }}
  1595. matrix_bridge_mautrix_googlechat_metrics_enabled: "{{ prometheus_enabled or matrix_metrics_exposure_enabled }}"
  1596. matrix_bridge_mautrix_googlechat_metrics_proxying_enabled: "{{ matrix_bridge_mautrix_googlechat_metrics_enabled and matrix_metrics_exposure_enabled }}"
  1597. matrix_bridge_mautrix_googlechat_metrics_proxying_hostname: "{{ matrix_metrics_exposure_hostname }}"
  1598. matrix_bridge_mautrix_googlechat_metrics_proxying_path_prefix: "{{ matrix_metrics_exposure_path_prefix }}/mautrix-googlechat"
  1599. # Postgres is the default, except if not using internal Postgres server
  1600. matrix_bridge_mautrix_googlechat_database_engine: "{{ 'postgres' if postgres_enabled else 'sqlite' }}"
  1601. matrix_bridge_mautrix_googlechat_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  1602. matrix_bridge_mautrix_googlechat_database_password: "{{ (matrix_homeserver_generic_secret_key + ':mau.gc.db') | hash('sha512') | to_uuid }}"
  1603. ######################################################################
  1604. #
  1605. # /matrix-bridge-mautrix-googlechat
  1606. #
  1607. ######################################################################
  1608. ######################################################################
  1609. #
  1610. # matrix-bridge-mautrix-signal
  1611. #
  1612. ######################################################################
  1613. # We don't enable bridges by default.
  1614. matrix_bridge_mautrix_signal_enabled: false
  1615. matrix_bridge_mautrix_signal_systemd_required_services_list_auto: |
  1616. {{
  1617. matrix_addons_homeserver_systemd_services_list
  1618. +
  1619. ([postgres_identifier ~ '.service'] if (postgres_enabled and matrix_bridge_mautrix_signal_database_hostname == postgres_connection_hostname) else [])
  1620. }}
  1621. matrix_bridge_mautrix_signal_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_bridge_mautrix_signal_container_image_registry_prefix_upstream_default }}"
  1622. matrix_bridge_mautrix_signal_container_image_self_build: "{{ matrix_architecture not in ['arm64', 'amd64'] }}"
  1623. matrix_bridge_mautrix_signal_container_network: "{{ matrix_addons_container_network }}"
  1624. matrix_bridge_mautrix_signal_container_additional_networks_auto: |-
  1625. {{
  1626. (
  1627. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  1628. +
  1629. ([postgres_container_network] if (postgres_enabled and matrix_bridge_mautrix_signal_database_hostname == postgres_connection_hostname and matrix_bridge_mautrix_signal_container_network != postgres_container_network) else [])
  1630. +
  1631. ([matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network and matrix_bridge_mautrix_signal_container_labels_traefik_enabled else [])
  1632. ) | unique
  1633. }}
  1634. matrix_bridge_mautrix_signal_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  1635. matrix_bridge_mautrix_signal_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  1636. matrix_bridge_mautrix_signal_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  1637. matrix_bridge_mautrix_signal_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  1638. matrix_bridge_mautrix_signal_homeserver_domain: '{{ matrix_domain }}'
  1639. matrix_bridge_mautrix_signal_homeserver_address: "{{ matrix_addons_homeserver_client_api_url }}"
  1640. matrix_bridge_mautrix_signal_homeserver_token: "{{ (matrix_homeserver_generic_secret_key + ':si.hs.token') | hash('sha512') | to_uuid }}"
  1641. matrix_bridge_mautrix_signal_homeserver_async_media: "{{ matrix_homeserver_implementation in ['synapse'] }}"
  1642. matrix_bridge_mautrix_signal_appservice_token: "{{ (matrix_homeserver_generic_secret_key + ':si.as.token') | hash('sha512') | to_uuid }}"
  1643. matrix_bridge_mautrix_signal_double_puppet_secrets_auto: |-
  1644. {{
  1645. {
  1646. matrix_bridge_mautrix_signal_homeserver_domain: ("as_token:" + matrix_appservice_double_puppet_registration_as_token)
  1647. }
  1648. if matrix_appservice_double_puppet_enabled
  1649. else {}
  1650. }}
  1651. matrix_bridge_mautrix_signal_scheme: "{{ 'https' if matrix_playbook_ssl_enabled else 'http' }}"
  1652. matrix_bridge_mautrix_signal_exposure_enabled: "{{ matrix_bridges_exposure_enabled }}"
  1653. matrix_bridge_mautrix_signal_exposure_hostname: "{{ matrix_bridges_exposure_hostname }}"
  1654. matrix_bridge_mautrix_signal_exposure_path_prefix: "{{ matrix_bridges_exposure_path_prefix }}/signal"
  1655. matrix_bridge_mautrix_signal_database_engine: "{{ 'postgres' if postgres_enabled else 'sqlite' }}"
  1656. matrix_bridge_mautrix_signal_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  1657. matrix_bridge_mautrix_signal_database_password: "{{ (matrix_homeserver_generic_secret_key + ':mau.signal.db') | hash('sha512') | to_uuid }}"
  1658. matrix_bridge_mautrix_signal_provisioning_shared_secret: "{{ (matrix_homeserver_generic_secret_key + ':mau.signal.prov') | hash('sha512') | to_uuid }}"
  1659. matrix_bridge_mautrix_signal_public_media_signing_key: "{{ (matrix_homeserver_generic_secret_key + ':mau.signal.pmed') | hash('sha512') | to_uuid }}"
  1660. ######################################################################
  1661. #
  1662. # /matrix-bridge-mautrix-signal
  1663. #
  1664. ######################################################################
  1665. ######################################################################
  1666. #
  1667. # matrix-bridge-mautrix-meta-messenger
  1668. #
  1669. ######################################################################
  1670. # We don't enable bridges by default.
  1671. matrix_bridge_mautrix_meta_messenger_enabled: false
  1672. matrix_bridge_mautrix_meta_messenger_systemd_required_services_list_auto: |
  1673. {{
  1674. matrix_addons_homeserver_systemd_services_list
  1675. +
  1676. ([postgres_identifier ~ '.service'] if (postgres_enabled and matrix_bridge_mautrix_meta_messenger_database_hostname == postgres_connection_hostname) else [])
  1677. }}
  1678. matrix_bridge_mautrix_meta_messenger_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_bridge_mautrix_meta_messenger_container_image_registry_prefix_upstream_default }}"
  1679. matrix_bridge_mautrix_meta_messenger_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm64'] }}"
  1680. matrix_bridge_mautrix_meta_messenger_container_network: "{{ matrix_addons_container_network }}"
  1681. matrix_bridge_mautrix_meta_messenger_container_additional_networks_auto: |-
  1682. {{
  1683. (
  1684. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  1685. +
  1686. ([postgres_container_network] if (postgres_enabled and matrix_bridge_mautrix_meta_messenger_database_hostname == postgres_connection_hostname and matrix_bridge_mautrix_meta_messenger_container_network != postgres_container_network) else [])
  1687. +
  1688. ([matrix_playbook_reverse_proxyable_services_additional_network] if (matrix_playbook_reverse_proxyable_services_additional_network and matrix_bridge_mautrix_meta_messenger_container_labels_traefik_enabled) else [])
  1689. ) | unique
  1690. }}
  1691. matrix_bridge_mautrix_meta_messenger_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  1692. matrix_bridge_mautrix_meta_messenger_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  1693. matrix_bridge_mautrix_meta_messenger_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  1694. matrix_bridge_mautrix_meta_messenger_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  1695. matrix_bridge_mautrix_meta_messenger_appservice_token: "{{ (matrix_homeserver_generic_secret_key + ':mau.meta.fb.as') | hash('sha512') | to_uuid }}"
  1696. matrix_bridge_mautrix_meta_messenger_homeserver_address: "{{ matrix_addons_homeserver_client_api_url }}"
  1697. matrix_bridge_mautrix_meta_messenger_homeserver_token: "{{ (matrix_homeserver_generic_secret_key + ':mau.meta.fb.hs') | hash('sha512') | to_uuid }}"
  1698. matrix_bridge_mautrix_meta_messenger_provisioning_shared_secret: "{{ (matrix_homeserver_generic_secret_key + ':mau.meta.fb.prov') | hash('sha512') | to_uuid }}"
  1699. matrix_bridge_mautrix_meta_messenger_homeserver_async_media: "{{ matrix_homeserver_implementation in ['synapse'] }}"
  1700. matrix_bridge_mautrix_meta_messenger_double_puppet_secrets_auto: |-
  1701. {{
  1702. {
  1703. matrix_bridge_mautrix_meta_messenger_homeserver_domain: ("as_token:" + matrix_appservice_double_puppet_registration_as_token)
  1704. }
  1705. if matrix_appservice_double_puppet_enabled
  1706. else {}
  1707. }}
  1708. matrix_bridge_mautrix_meta_messenger_scheme: "{{ 'https' if matrix_playbook_ssl_enabled else 'http' }}"
  1709. matrix_bridge_mautrix_meta_messenger_exposure_enabled: "{{ matrix_bridges_exposure_enabled }}"
  1710. matrix_bridge_mautrix_meta_messenger_exposure_hostname: "{{ matrix_bridges_exposure_hostname }}"
  1711. matrix_bridge_mautrix_meta_messenger_exposure_path_prefix: "{{ matrix_bridges_exposure_path_prefix }}/meta-messenger"
  1712. # We'd like to force-set people with external Postgres to SQLite, so the bridge role can complain
  1713. # and point them to a migration path.
  1714. matrix_bridge_mautrix_meta_messenger_database_engine: "{{ 'postgres' if postgres_enabled else 'sqlite3-fk-wal' }}"
  1715. matrix_bridge_mautrix_meta_messenger_database_hostname: "{{ postgres_connection_hostname if (postgres_enabled and matrix_bridge_mautrix_meta_messenger_database_engine == 'postgres') else '' }}"
  1716. matrix_bridge_mautrix_meta_messenger_database_password: "{{ ((matrix_homeserver_generic_secret_key + ':mau.fb.db') | hash('sha512') | to_uuid) if (postgres_enabled and matrix_bridge_mautrix_meta_messenger_database_engine == 'postgres') else '' }}"
  1717. ######################################################################
  1718. #
  1719. # /matrix-bridge-mautrix-meta-messenger
  1720. #
  1721. ######################################################################
  1722. ######################################################################
  1723. #
  1724. # matrix-bridge-mautrix-meta-instagram
  1725. #
  1726. ######################################################################
  1727. # We don't enable bridges by default.
  1728. matrix_bridge_mautrix_meta_instagram_enabled: false
  1729. matrix_bridge_mautrix_meta_instagram_systemd_required_services_list_auto: |
  1730. {{
  1731. matrix_addons_homeserver_systemd_services_list
  1732. +
  1733. ([postgres_identifier ~ '.service'] if (postgres_enabled and matrix_bridge_mautrix_meta_instagram_database_hostname == postgres_connection_hostname) else [])
  1734. }}
  1735. matrix_bridge_mautrix_meta_instagram_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_bridge_mautrix_meta_instagram_container_image_registry_prefix_upstream_default }}"
  1736. matrix_bridge_mautrix_meta_instagram_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm64'] }}"
  1737. matrix_bridge_mautrix_meta_instagram_container_network: "{{ matrix_addons_container_network }}"
  1738. matrix_bridge_mautrix_meta_instagram_container_additional_networks_auto: |-
  1739. {{
  1740. (
  1741. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  1742. +
  1743. ([postgres_container_network] if (postgres_enabled and matrix_bridge_mautrix_meta_instagram_database_hostname == postgres_connection_hostname and matrix_bridge_mautrix_meta_instagram_container_network != postgres_container_network) else [])
  1744. +
  1745. ([matrix_playbook_reverse_proxyable_services_additional_network] if (matrix_playbook_reverse_proxyable_services_additional_network and matrix_bridge_mautrix_meta_instagram_container_labels_traefik_enabled) else [])
  1746. ) | unique
  1747. }}
  1748. matrix_bridge_mautrix_meta_instagram_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  1749. matrix_bridge_mautrix_meta_instagram_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  1750. matrix_bridge_mautrix_meta_instagram_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  1751. matrix_bridge_mautrix_meta_instagram_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  1752. matrix_bridge_mautrix_meta_instagram_appservice_token: "{{ (matrix_homeserver_generic_secret_key + ':mau.meta.ig.as') | hash('sha512') | to_uuid }}"
  1753. matrix_bridge_mautrix_meta_instagram_homeserver_address: "{{ matrix_addons_homeserver_client_api_url }}"
  1754. matrix_bridge_mautrix_meta_instagram_homeserver_token: "{{ (matrix_homeserver_generic_secret_key + ':mau.meta.ig.hs') | hash('sha512') | to_uuid }}"
  1755. matrix_bridge_mautrix_meta_instagram_provisioning_shared_secret: "{{ (matrix_homeserver_generic_secret_key + ':mau.meta.ig.prov') | hash('sha512') | to_uuid }}"
  1756. matrix_bridge_mautrix_meta_instagram_homeserver_async_media: "{{ matrix_homeserver_implementation in ['synapse'] }}"
  1757. matrix_bridge_mautrix_meta_instagram_double_puppet_secrets_auto: |-
  1758. {{
  1759. {
  1760. matrix_bridge_mautrix_meta_instagram_homeserver_domain: ("as_token:" + matrix_appservice_double_puppet_registration_as_token)
  1761. }
  1762. if matrix_appservice_double_puppet_enabled
  1763. else {}
  1764. }}
  1765. matrix_bridge_mautrix_meta_instagram_scheme: "{{ 'https' if matrix_playbook_ssl_enabled else 'http' }}"
  1766. matrix_bridge_mautrix_meta_instagram_exposure_enabled: "{{ matrix_bridges_exposure_enabled }}"
  1767. matrix_bridge_mautrix_meta_instagram_exposure_hostname: "{{ matrix_bridges_exposure_hostname }}"
  1768. matrix_bridge_mautrix_meta_instagram_exposure_path_prefix: "{{ matrix_bridges_exposure_path_prefix }}/meta-instagram"
  1769. # We'd like to force-set people with external Postgres to SQLite, so the bridge role can complain
  1770. # and point them to a migration path.
  1771. matrix_bridge_mautrix_meta_instagram_database_engine: "{{ 'postgres' if postgres_enabled else 'sqlite3-fk-wal' }}"
  1772. matrix_bridge_mautrix_meta_instagram_database_hostname: "{{ postgres_connection_hostname if (postgres_enabled and matrix_bridge_mautrix_meta_instagram_database_engine == 'postgres') else '' }}"
  1773. matrix_bridge_mautrix_meta_instagram_database_password: "{{ ((matrix_homeserver_generic_secret_key + ':mau.fb.db') | hash('sha512') | to_uuid) if (postgres_enabled and matrix_bridge_mautrix_meta_instagram_database_engine == 'postgres') else '' }}"
  1774. ######################################################################
  1775. #
  1776. # /matrix-bridge-mautrix-meta-instagram
  1777. #
  1778. ######################################################################
  1779. ######################################################################
  1780. #
  1781. # matrix-bridge-mautrix-telegram
  1782. #
  1783. ######################################################################
  1784. # We don't enable bridges by default.
  1785. matrix_bridge_mautrix_telegram_enabled: false
  1786. matrix_bridge_mautrix_telegram_systemd_required_services_list_auto: |
  1787. {{
  1788. matrix_addons_homeserver_systemd_services_list
  1789. +
  1790. ([postgres_identifier ~ '.service'] if (postgres_enabled and matrix_bridge_mautrix_telegram_database_hostname == postgres_connection_hostname) else [])
  1791. }}
  1792. matrix_bridge_mautrix_telegram_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_bridge_mautrix_telegram_container_image_registry_prefix_upstream_default }}"
  1793. matrix_bridge_mautrix_telegram_container_image_self_build: "{{ matrix_architecture not in ['arm64', 'amd64'] }}"
  1794. matrix_bridge_mautrix_telegram_container_network: "{{ matrix_addons_container_network }}"
  1795. matrix_bridge_mautrix_telegram_container_additional_networks_auto: |-
  1796. {{
  1797. (
  1798. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  1799. +
  1800. ([postgres_container_network] if (postgres_enabled and matrix_bridge_mautrix_telegram_database_hostname == postgres_connection_hostname and matrix_bridge_mautrix_telegram_container_network != postgres_container_network) else [])
  1801. +
  1802. ([matrix_playbook_reverse_proxyable_services_additional_network] if (matrix_playbook_reverse_proxyable_services_additional_network and matrix_bridge_mautrix_telegram_container_labels_traefik_enabled) else [])
  1803. ) | unique
  1804. }}
  1805. matrix_bridge_mautrix_telegram_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  1806. matrix_bridge_mautrix_telegram_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  1807. matrix_bridge_mautrix_telegram_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  1808. matrix_bridge_mautrix_telegram_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  1809. matrix_bridge_mautrix_telegram_appservice_token: "{{ (matrix_homeserver_generic_secret_key + ':telegr.as.token') | hash('sha512') | to_uuid }}"
  1810. matrix_bridge_mautrix_telegram_homeserver_domain: "{{ matrix_domain }}"
  1811. matrix_bridge_mautrix_telegram_homeserver_address: "{{ matrix_addons_homeserver_client_api_url }}"
  1812. matrix_bridge_mautrix_telegram_homeserver_token: "{{ (matrix_homeserver_generic_secret_key + ':telegr.hs.token') | hash('sha512') | to_uuid }}"
  1813. matrix_bridge_mautrix_telegram_homeserver_async_media: "{{ matrix_homeserver_implementation in ['synapse'] }}"
  1814. matrix_bridge_mautrix_telegram_provisioning_shared_secret: "{{ (matrix_homeserver_generic_secret_key + ':mau.telegram.prov') | hash('sha512') | to_uuid }}"
  1815. matrix_bridge_mautrix_telegram_double_puppet_secrets_auto: |-
  1816. {{
  1817. {
  1818. matrix_bridge_mautrix_telegram_homeserver_domain: ("as_token:" + matrix_appservice_double_puppet_registration_as_token)
  1819. }
  1820. if matrix_appservice_double_puppet_enabled
  1821. else {}
  1822. }}
  1823. matrix_bridge_mautrix_telegram_scheme: "{{ 'https' if matrix_playbook_ssl_enabled else 'http' }}"
  1824. matrix_bridge_mautrix_telegram_exposure_enabled: "{{ matrix_bridges_exposure_enabled }}"
  1825. matrix_bridge_mautrix_telegram_exposure_hostname: "{{ matrix_bridges_exposure_hostname }}"
  1826. matrix_bridge_mautrix_telegram_exposure_path_prefix: "{{ matrix_bridges_exposure_path_prefix }}/telegram"
  1827. # Postgres is the default, except if not using internal Postgres server
  1828. matrix_bridge_mautrix_telegram_database_engine: "{{ 'postgres' if postgres_enabled else 'sqlite' }}"
  1829. matrix_bridge_mautrix_telegram_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  1830. matrix_bridge_mautrix_telegram_database_password: "{{ (matrix_homeserver_generic_secret_key + ':mau.telegram.db') | hash('sha512') | to_uuid }}"
  1831. ######################################################################
  1832. #
  1833. # /matrix-bridge-mautrix-telegram
  1834. #
  1835. ######################################################################
  1836. ######################################################################
  1837. #
  1838. # matrix-bridge-mautrix-twitter
  1839. #
  1840. ######################################################################
  1841. # We don't enable bridges by default.
  1842. matrix_bridge_mautrix_twitter_enabled: false
  1843. matrix_bridge_mautrix_twitter_systemd_required_services_list_auto: |
  1844. {{
  1845. matrix_addons_homeserver_systemd_services_list
  1846. +
  1847. ([postgres_identifier ~ '.service'] if (postgres_enabled and matrix_bridge_mautrix_twitter_database_hostname == postgres_connection_hostname) else [])
  1848. }}
  1849. matrix_bridge_mautrix_twitter_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_bridge_mautrix_twitter_container_image_registry_prefix_upstream_default }}"
  1850. matrix_bridge_mautrix_twitter_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm64'] }}"
  1851. matrix_bridge_mautrix_twitter_container_network: "{{ matrix_addons_container_network }}"
  1852. matrix_bridge_mautrix_twitter_container_additional_networks_auto: |-
  1853. {{
  1854. (
  1855. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  1856. +
  1857. ([postgres_container_network] if (postgres_enabled and matrix_bridge_mautrix_twitter_database_hostname == postgres_connection_hostname and matrix_bridge_mautrix_twitter_container_network != postgres_container_network) else [])
  1858. +
  1859. ([matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network and matrix_bridge_mautrix_twitter_container_labels_traefik_enabled else [])
  1860. ) | unique
  1861. }}
  1862. matrix_bridge_mautrix_twitter_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  1863. matrix_bridge_mautrix_twitter_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  1864. matrix_bridge_mautrix_twitter_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  1865. matrix_bridge_mautrix_twitter_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  1866. matrix_bridge_mautrix_twitter_appservice_token: "{{ (matrix_homeserver_generic_secret_key + ':twt.as.token') | hash('sha512') | to_uuid }}"
  1867. matrix_bridge_mautrix_twitter_homeserver_address: "{{ matrix_addons_homeserver_client_api_url }}"
  1868. matrix_bridge_mautrix_twitter_homeserver_token: "{{ (matrix_homeserver_generic_secret_key + ':twt.hs.token') | hash('sha512') | to_uuid }}"
  1869. matrix_bridge_mautrix_twitter_homeserver_async_media: "{{ matrix_homeserver_implementation in ['synapse'] }}"
  1870. matrix_bridge_mautrix_twitter_provisioning_shared_secret: "{{ (matrix_homeserver_generic_secret_key + ':mau.twit.prov') | hash('sha512') | to_uuid }}"
  1871. matrix_bridge_mautrix_twitter_double_puppet_secrets_auto: |-
  1872. {{
  1873. ({
  1874. matrix_bridge_mautrix_twitter_homeserver_domain: ("as_token:" + matrix_appservice_double_puppet_registration_as_token)
  1875. })
  1876. if matrix_appservice_double_puppet_enabled
  1877. else {}
  1878. }}
  1879. matrix_bridge_mautrix_twitter_scheme: "{{ 'https' if matrix_playbook_ssl_enabled else 'http' }}"
  1880. matrix_bridge_mautrix_twitter_exposure_enabled: "{{ matrix_bridges_exposure_enabled }}"
  1881. matrix_bridge_mautrix_twitter_exposure_hostname: "{{ matrix_bridges_exposure_hostname }}"
  1882. matrix_bridge_mautrix_twitter_exposure_path_prefix: "{{ matrix_bridges_exposure_path_prefix }}/twitter"
  1883. matrix_bridge_mautrix_twitter_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  1884. matrix_bridge_mautrix_twitter_database_password: "{{ (matrix_homeserver_generic_secret_key + ':mau.twt.db') | hash('sha512') | to_uuid if postgres_enabled else '' }}"
  1885. ######################################################################
  1886. #
  1887. # /matrix-bridge-mautrix-twitter
  1888. #
  1889. ######################################################################
  1890. ######################################################################
  1891. #
  1892. # matrix-bridge-mautrix-gmessages
  1893. #
  1894. ######################################################################
  1895. # We don't enable bridges by default.
  1896. matrix_bridge_mautrix_gmessages_enabled: false
  1897. matrix_bridge_mautrix_gmessages_systemd_required_services_list_auto: |
  1898. {{
  1899. matrix_addons_homeserver_systemd_services_list
  1900. +
  1901. ([postgres_identifier ~ '.service'] if (postgres_enabled and matrix_bridge_mautrix_gmessages_database_hostname == postgres_connection_hostname) else [])
  1902. }}
  1903. matrix_bridge_mautrix_gmessages_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_bridge_mautrix_gmessages_container_image_registry_prefix_upstream_default }}"
  1904. matrix_bridge_mautrix_gmessages_container_image_self_build: "{{ matrix_architecture not in ['arm64', 'amd64'] }}"
  1905. matrix_bridge_mautrix_gmessages_container_network: "{{ matrix_addons_container_network }}"
  1906. matrix_bridge_mautrix_gmessages_container_additional_networks_auto: |-
  1907. {{
  1908. (
  1909. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  1910. +
  1911. ([postgres_container_network] if (postgres_enabled and matrix_bridge_mautrix_gmessages_database_hostname == postgres_connection_hostname and matrix_bridge_mautrix_gmessages_container_network != postgres_container_network) else [])
  1912. +
  1913. ([matrix_playbook_reverse_proxyable_services_additional_network] if (matrix_playbook_reverse_proxyable_services_additional_network and matrix_bridge_mautrix_gmessages_container_labels_traefik_enabled) else [])
  1914. ) | unique
  1915. }}
  1916. matrix_bridge_mautrix_gmessages_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  1917. matrix_bridge_mautrix_gmessages_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  1918. matrix_bridge_mautrix_gmessages_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  1919. matrix_bridge_mautrix_gmessages_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  1920. matrix_bridge_mautrix_gmessages_appservice_token: "{{ (matrix_homeserver_generic_secret_key + ':gmessa.as.token') | hash('sha512') | to_uuid }}"
  1921. matrix_bridge_mautrix_gmessages_homeserver_address: "{{ matrix_addons_homeserver_client_api_url }}"
  1922. matrix_bridge_mautrix_gmessages_homeserver_token: "{{ (matrix_homeserver_generic_secret_key + ':gmessa.hs.token') | hash('sha512') | to_uuid }}"
  1923. matrix_bridge_mautrix_gmessages_provisioning_shared_secret: "{{ (matrix_homeserver_generic_secret_key + ':gmessa.prov') | hash('sha512') | to_uuid }}"
  1924. matrix_bridge_mautrix_gmessages_homeserver_async_media: "{{ matrix_homeserver_implementation in ['synapse'] }}"
  1925. matrix_bridge_mautrix_gmessages_double_puppet_secrets_auto: |-
  1926. {{
  1927. {
  1928. matrix_bridge_mautrix_gmessages_homeserver_domain: ("as_token:" + matrix_appservice_double_puppet_registration_as_token)
  1929. }
  1930. if matrix_appservice_double_puppet_enabled
  1931. else {}
  1932. }}
  1933. matrix_bridge_mautrix_gmessages_scheme: "{{ 'https' if matrix_playbook_ssl_enabled else 'http' }}"
  1934. matrix_bridge_mautrix_gmessages_exposure_enabled: "{{ matrix_bridges_exposure_enabled }}"
  1935. matrix_bridge_mautrix_gmessages_exposure_hostname: "{{ matrix_bridges_exposure_hostname }}"
  1936. matrix_bridge_mautrix_gmessages_exposure_path_prefix: "{{ matrix_bridges_exposure_path_prefix }}/gmessages"
  1937. # Postgres is the default, except if not using internal Postgres server
  1938. matrix_bridge_mautrix_gmessages_database_engine: "{{ 'postgres' if postgres_enabled else 'sqlite' }}"
  1939. matrix_bridge_mautrix_gmessages_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  1940. matrix_bridge_mautrix_gmessages_database_password: "{{ (matrix_homeserver_generic_secret_key + ':maugmessages.db') | hash('sha512') | to_uuid }}"
  1941. ######################################################################
  1942. #
  1943. # /matrix-bridge-mautrix-gmessages
  1944. #
  1945. ######################################################################
  1946. ######################################################################
  1947. #
  1948. # matrix-bridge-mautrix-gvoice
  1949. #
  1950. ######################################################################
  1951. # We don't enable bridges by default.
  1952. matrix_bridge_mautrix_gvoice_enabled: false
  1953. matrix_bridge_mautrix_gvoice_systemd_required_services_list_auto: |
  1954. {{
  1955. matrix_addons_homeserver_systemd_services_list
  1956. +
  1957. ([postgres_identifier ~ '.service'] if (postgres_enabled and matrix_bridge_mautrix_gvoice_database_hostname == postgres_connection_hostname) else [])
  1958. }}
  1959. matrix_bridge_mautrix_gvoice_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_bridge_mautrix_gvoice_container_image_registry_prefix_upstream_default }}"
  1960. matrix_bridge_mautrix_gvoice_container_image_self_build: "{{ matrix_architecture not in ['arm64', 'amd64'] }}"
  1961. matrix_bridge_mautrix_gvoice_container_network: "{{ matrix_addons_container_network }}"
  1962. matrix_bridge_mautrix_gvoice_container_additional_networks_auto: |-
  1963. {{
  1964. (
  1965. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  1966. +
  1967. ([postgres_container_network] if (postgres_enabled and matrix_bridge_mautrix_gvoice_database_hostname == postgres_connection_hostname and matrix_bridge_mautrix_gvoice_container_network != postgres_container_network) else [])
  1968. +
  1969. ([matrix_playbook_reverse_proxyable_services_additional_network] if (matrix_playbook_reverse_proxyable_services_additional_network and matrix_bridge_mautrix_gvoice_container_labels_traefik_enabled) else [])
  1970. ) | unique
  1971. }}
  1972. matrix_bridge_mautrix_gvoice_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  1973. matrix_bridge_mautrix_gvoice_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  1974. matrix_bridge_mautrix_gvoice_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  1975. matrix_bridge_mautrix_gvoice_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  1976. matrix_bridge_mautrix_gvoice_appservice_token: "{{ (matrix_homeserver_generic_secret_key + ':gvoice.as.token') | hash('sha512') | to_uuid }}"
  1977. matrix_bridge_mautrix_gvoice_homeserver_address: "{{ matrix_addons_homeserver_client_api_url }}"
  1978. matrix_bridge_mautrix_gvoice_homeserver_token: "{{ (matrix_homeserver_generic_secret_key + ':gvoice.hs.token') | hash('sha512') | to_uuid }}"
  1979. matrix_bridge_mautrix_gvoice_provisioning_shared_secret: "{{ (matrix_homeserver_generic_secret_key + ':gvoice.prov') | hash('sha512') | to_uuid }}"
  1980. matrix_bridge_mautrix_gvoice_homeserver_async_media: "{{ matrix_homeserver_implementation in ['synapse'] }}"
  1981. matrix_bridge_mautrix_gvoice_double_puppet_secrets_auto: |-
  1982. {{
  1983. {
  1984. matrix_bridge_mautrix_gvoice_homeserver_domain: ("as_token:" + matrix_appservice_double_puppet_registration_as_token)
  1985. }
  1986. if matrix_appservice_double_puppet_enabled
  1987. else {}
  1988. }}
  1989. matrix_bridge_mautrix_gvoice_scheme: "{{ 'https' if matrix_playbook_ssl_enabled else 'http' }}"
  1990. matrix_bridge_mautrix_gvoice_exposure_enabled: "{{ matrix_bridges_exposure_enabled }}"
  1991. matrix_bridge_mautrix_gvoice_exposure_hostname: "{{ matrix_bridges_exposure_hostname }}"
  1992. matrix_bridge_mautrix_gvoice_exposure_path_prefix: "{{ matrix_bridges_exposure_path_prefix }}/gvoice"
  1993. # Postgres is the default, except if not using internal Postgres server
  1994. matrix_bridge_mautrix_gvoice_database_engine: "{{ 'postgres' if postgres_enabled else 'sqlite' }}"
  1995. matrix_bridge_mautrix_gvoice_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  1996. matrix_bridge_mautrix_gvoice_database_password: "{{ (matrix_homeserver_generic_secret_key + ':maugvoice.db') | hash('sha512') | to_uuid }}"
  1997. ######################################################################
  1998. #
  1999. # /matrix-bridge-mautrix-gvoice
  2000. #
  2001. ######################################################################
  2002. ######################################################################
  2003. #
  2004. # matrix-bridge-mautrix-linkedin
  2005. #
  2006. ######################################################################
  2007. # We don't enable bridges by default.
  2008. matrix_bridge_mautrix_linkedin_enabled: false
  2009. matrix_bridge_mautrix_linkedin_systemd_required_services_list_auto: |
  2010. {{
  2011. matrix_addons_homeserver_systemd_services_list
  2012. +
  2013. ([postgres_identifier ~ '.service'] if (postgres_enabled and matrix_bridge_mautrix_linkedin_database_hostname == postgres_connection_hostname) else [])
  2014. }}
  2015. matrix_bridge_mautrix_linkedin_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_bridge_mautrix_linkedin_container_image_registry_prefix_upstream_default }}"
  2016. matrix_bridge_mautrix_linkedin_container_image_self_build: "{{ matrix_architecture not in ['arm64', 'amd64'] }}"
  2017. matrix_bridge_mautrix_linkedin_container_network: "{{ matrix_addons_container_network }}"
  2018. matrix_bridge_mautrix_linkedin_container_additional_networks_auto: |-
  2019. {{
  2020. (
  2021. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  2022. +
  2023. ([postgres_container_network] if (postgres_enabled and matrix_bridge_mautrix_linkedin_database_hostname == postgres_connection_hostname and matrix_bridge_mautrix_linkedin_container_network != postgres_container_network) else [])
  2024. +
  2025. ([matrix_playbook_reverse_proxyable_services_additional_network] if (matrix_playbook_reverse_proxyable_services_additional_network and matrix_bridge_mautrix_linkedin_container_labels_traefik_enabled) else [])
  2026. ) | unique
  2027. }}
  2028. matrix_bridge_mautrix_linkedin_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  2029. matrix_bridge_mautrix_linkedin_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  2030. matrix_bridge_mautrix_linkedin_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  2031. matrix_bridge_mautrix_linkedin_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  2032. matrix_bridge_mautrix_linkedin_appservice_token: "{{ (matrix_homeserver_generic_secret_key + ':linkedin.as.token') | hash('sha512') | to_uuid }}"
  2033. matrix_bridge_mautrix_linkedin_homeserver_address: "{{ matrix_addons_homeserver_client_api_url }}"
  2034. matrix_bridge_mautrix_linkedin_homeserver_token: "{{ (matrix_homeserver_generic_secret_key + ':linkedin.hs.token') | hash('sha512') | to_uuid }}"
  2035. matrix_bridge_mautrix_linkedin_provisioning_shared_secret: "{{ (matrix_homeserver_generic_secret_key + ':linkedin.prov') | hash('sha512') | to_uuid }}"
  2036. matrix_bridge_mautrix_linkedin_homeserver_async_media: "{{ matrix_homeserver_implementation in ['synapse'] }}"
  2037. matrix_bridge_mautrix_linkedin_double_puppet_secrets_auto: |-
  2038. {{
  2039. {
  2040. matrix_bridge_mautrix_linkedin_homeserver_domain: ("as_token:" + matrix_appservice_double_puppet_registration_as_token)
  2041. }
  2042. if matrix_appservice_double_puppet_enabled
  2043. else {}
  2044. }}
  2045. matrix_bridge_mautrix_linkedin_scheme: "{{ 'https' if matrix_playbook_ssl_enabled else 'http' }}"
  2046. matrix_bridge_mautrix_linkedin_exposure_enabled: "{{ matrix_bridges_exposure_enabled }}"
  2047. matrix_bridge_mautrix_linkedin_exposure_hostname: "{{ matrix_bridges_exposure_hostname }}"
  2048. matrix_bridge_mautrix_linkedin_exposure_path_prefix: "{{ matrix_bridges_exposure_path_prefix }}/linkedin"
  2049. # Postgres is the default, except if not using internal Postgres server
  2050. matrix_bridge_mautrix_linkedin_database_engine: "{{ 'postgres' if postgres_enabled else 'sqlite' }}"
  2051. matrix_bridge_mautrix_linkedin_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  2052. matrix_bridge_mautrix_linkedin_database_password: "{{ (matrix_homeserver_generic_secret_key + ':mau.linkedin.db') | hash('sha512') | to_uuid }}"
  2053. ######################################################################
  2054. #
  2055. # /matrix-bridge-mautrix-linkedin
  2056. #
  2057. ######################################################################
  2058. ######################################################################
  2059. #
  2060. # matrix-bridge-mautrix-wsproxy
  2061. #
  2062. ######################################################################
  2063. # We don't enable bridges by default.
  2064. matrix_bridge_mautrix_wsproxy_enabled: false
  2065. matrix_bridge_mautrix_wsproxy_systemd_required_services_list_default: |
  2066. {{
  2067. matrix_addons_homeserver_systemd_services_list
  2068. +
  2069. ([postgres_identifier ~ '.service'] if (postgres_enabled and matrix_bridge_mautrix_wsproxy_syncproxy_database_hostname == postgres_connection_hostname) else [])
  2070. }}
  2071. matrix_bridge_mautrix_wsproxy_homeserver_address: "{{ matrix_addons_homeserver_client_api_url }}"
  2072. matrix_bridge_mautrix_wsproxy_hostname: "wsproxy.{{ matrix_bridge_mautrix_wsproxy_homeserver_domain }}"
  2073. matrix_bridge_mautrix_wsproxy_syncproxy_homeserver_url: "{{ matrix_addons_homeserver_client_api_url }}"
  2074. matrix_bridge_mautrix_wsproxy_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_bridge_mautrix_wsproxy_container_image_registry_prefix_upstream_default }}"
  2075. matrix_bridge_mautrix_wsproxy_container_network: "{{ matrix_addons_container_network }}"
  2076. matrix_bridge_mautrix_wsproxy_container_additional_networks: |
  2077. {{
  2078. (
  2079. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  2080. +
  2081. ([matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network else [])
  2082. +
  2083. ([postgres_container_network] if (postgres_enabled and matrix_bridge_mautrix_wsproxy_syncproxy_database_hostname == postgres_connection_hostname and postgres_container_network != matrix_bridge_mautrix_wsproxy_container_network) else [])
  2084. ) | unique
  2085. }}
  2086. matrix_bridge_mautrix_wsproxy_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  2087. matrix_bridge_mautrix_wsproxy_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  2088. matrix_bridge_mautrix_wsproxy_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  2089. matrix_bridge_mautrix_wsproxy_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  2090. matrix_bridge_mautrix_wsproxy_syncproxy_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  2091. matrix_bridge_mautrix_wsproxy_syncproxy_database_password: "{{ (matrix_homeserver_generic_secret_key + ':wsproxy.db') | hash('sha512') | to_uuid }}"
  2092. ######################################################################
  2093. #
  2094. # /matrix-bridge-mautrix-wsproxy
  2095. #
  2096. ######################################################################
  2097. ######################################################################
  2098. #
  2099. # matrix-bridge-wechat
  2100. #
  2101. ######################################################################
  2102. # We don't enable bridges by default.
  2103. matrix_bridge_wechat_enabled: false
  2104. matrix_bridge_wechat_systemd_required_services_list_auto: |
  2105. {{
  2106. matrix_addons_homeserver_systemd_services_list
  2107. +
  2108. ([postgres_identifier ~ '.service'] if (postgres_enabled and matrix_bridge_wechat_database_hostname == postgres_connection_hostname) else [])
  2109. }}
  2110. matrix_bridge_wechat_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_bridge_wechat_container_image_registry_prefix_upstream_default }}"
  2111. matrix_bridge_wechat_agent_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_bridge_wechat_agent_container_image_registry_prefix_upstream_default }}"
  2112. matrix_bridge_wechat_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm64'] }}"
  2113. matrix_bridge_wechat_agent_container_image_self_build: "{{ matrix_architecture not in ['amd64'] }}"
  2114. matrix_bridge_wechat_container_network: "{{ matrix_addons_container_network }}"
  2115. matrix_bridge_wechat_container_additional_networks_auto: |-
  2116. {{
  2117. (
  2118. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  2119. +
  2120. ([postgres_container_network] if (postgres_enabled and matrix_bridge_wechat_database_hostname == postgres_connection_hostname and matrix_bridge_wechat_container_network != postgres_container_network) else [])
  2121. ) | unique
  2122. }}
  2123. matrix_bridge_wechat_appservice_token: "{{ (matrix_homeserver_generic_secret_key + ':wechat.as.token') | hash('sha512') | to_uuid }}"
  2124. matrix_bridge_wechat_homeserver_address: "{{ matrix_addons_homeserver_client_api_url }}"
  2125. matrix_bridge_wechat_homeserver_token: "{{ (matrix_homeserver_generic_secret_key + ':wechat.hs.token') | hash('sha512') | to_uuid }}"
  2126. matrix_bridge_wechat_homeserver_async_media: "{{ matrix_homeserver_implementation in ['synapse'] }}"
  2127. matrix_bridge_wechat_login_shared_secret: "{{ matrix_synapse_ext_password_provider_shared_secret_auth_shared_secret if matrix_synapse_ext_password_provider_shared_secret_auth_enabled else '' }}"
  2128. matrix_bridge_wechat_bridge_listen_secret: "{{ (matrix_homeserver_generic_secret_key + ':wechat.lstn') | hash('sha512') | to_uuid }}"
  2129. # Postgres is the default, except if not using internal Postgres server
  2130. matrix_bridge_wechat_database_engine: "{{ 'postgres' if postgres_enabled else 'sqlite' }}"
  2131. matrix_bridge_wechat_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  2132. matrix_bridge_wechat_database_password: "{{ (matrix_homeserver_generic_secret_key + ':gowechat.db') | hash('sha512') | to_uuid }}"
  2133. ######################################################################
  2134. #
  2135. # /matrix-bridge-wechat
  2136. #
  2137. ######################################################################
  2138. ######################################################################
  2139. #
  2140. # matrix-bridge-mautrix-whatsapp
  2141. #
  2142. ######################################################################
  2143. # We don't enable bridges by default.
  2144. matrix_bridge_mautrix_whatsapp_enabled: false
  2145. matrix_bridge_mautrix_whatsapp_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_bridge_mautrix_whatsapp_container_image_registry_prefix_upstream_default }}"
  2146. matrix_bridge_mautrix_whatsapp_container_image_self_build: "{{ matrix_architecture not in ['arm64', 'amd64'] }}"
  2147. matrix_bridge_mautrix_whatsapp_container_network: "{{ matrix_addons_container_network }}"
  2148. matrix_bridge_mautrix_whatsapp_container_additional_networks_auto: |-
  2149. {{
  2150. (
  2151. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  2152. +
  2153. ([postgres_container_network] if postgres_enabled and matrix_bridge_mautrix_whatsapp_database_hostname == postgres_connection_hostname else [])
  2154. +
  2155. ([matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network and matrix_bridge_mautrix_whatsapp_container_labels_traefik_enabled else [])
  2156. ) | unique
  2157. }}
  2158. matrix_bridge_mautrix_whatsapp_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  2159. matrix_bridge_mautrix_whatsapp_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  2160. matrix_bridge_mautrix_whatsapp_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  2161. matrix_bridge_mautrix_whatsapp_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  2162. matrix_bridge_mautrix_whatsapp_systemd_required_services_list_auto: |
  2163. {{
  2164. matrix_addons_homeserver_systemd_services_list
  2165. +
  2166. ([postgres_identifier ~ '.service'] if postgres_enabled and matrix_bridge_mautrix_whatsapp_database_hostname == postgres_connection_hostname else [])
  2167. }}
  2168. matrix_bridge_mautrix_whatsapp_appservice_token: "{{ (matrix_homeserver_generic_secret_key + ':wa.as.token') | hash('sha512') | to_uuid }}"
  2169. matrix_bridge_mautrix_whatsapp_homeserver_address: "{{ matrix_addons_homeserver_client_api_url }}"
  2170. matrix_bridge_mautrix_whatsapp_homeserver_token: "{{ (matrix_homeserver_generic_secret_key + ':wa.hs.token') | hash('sha512') | to_uuid }}"
  2171. matrix_bridge_mautrix_whatsapp_provisioning_shared_secret: "{{ (matrix_homeserver_generic_secret_key + ':wa.prov') | hash('sha512') | to_uuid }}"
  2172. matrix_bridge_mautrix_whatsapp_homeserver_async_media: "{{ matrix_homeserver_implementation in ['synapse'] }}"
  2173. matrix_bridge_mautrix_whatsapp_double_puppet_secrets_auto: |-
  2174. {{
  2175. {
  2176. matrix_bridge_mautrix_whatsapp_homeserver_domain: ("as_token:" + matrix_appservice_double_puppet_registration_as_token)
  2177. }
  2178. if matrix_appservice_double_puppet_enabled
  2179. else {}
  2180. }}
  2181. matrix_bridge_mautrix_whatsapp_scheme: "{{ 'https' if matrix_playbook_ssl_enabled else 'http' }}"
  2182. matrix_bridge_mautrix_whatsapp_exposure_enabled: "{{ matrix_bridges_exposure_enabled }}"
  2183. matrix_bridge_mautrix_whatsapp_exposure_hostname: "{{ matrix_bridges_exposure_hostname }}"
  2184. matrix_bridge_mautrix_whatsapp_exposure_path_prefix: "{{ matrix_bridges_exposure_path_prefix }}/whatsapp"
  2185. # Postgres is the default, except if not using internal Postgres server
  2186. matrix_bridge_mautrix_whatsapp_database_engine: "{{ 'postgres' if postgres_enabled else 'sqlite' }}"
  2187. matrix_bridge_mautrix_whatsapp_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  2188. matrix_bridge_mautrix_whatsapp_database_password: "{{ (matrix_homeserver_generic_secret_key + ':mauwhatsapp.db') | hash('sha512') | to_uuid }}"
  2189. ######################################################################
  2190. #
  2191. # /matrix-bridge-mautrix-whatsapp
  2192. #
  2193. ######################################################################
  2194. ######################################################################
  2195. #
  2196. # matrix-sms-bridge
  2197. #
  2198. ######################################################################
  2199. # We don't enable bridges by default.
  2200. matrix_bridge_sms_enabled: false
  2201. matrix_bridge_sms_systemd_required_services_list_auto: |
  2202. {{
  2203. matrix_addons_homeserver_systemd_services_list
  2204. }}
  2205. matrix_bridge_sms_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_bridge_sms_container_image_registry_prefix_upstream_default }}"
  2206. matrix_bridge_sms_container_network: "{{ matrix_addons_container_network }}"
  2207. matrix_bridge_sms_container_additional_networks_auto: |-
  2208. {{
  2209. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  2210. }}
  2211. matrix_bridge_sms_appservice_token: "{{ (matrix_homeserver_generic_secret_key + ':sms.as.token') | hash('sha512') | to_uuid }}"
  2212. matrix_bridge_sms_homeserver_hostname: "{{ (matrix_homeserver_container_client_api_endpoint | split(':'))[0] }}"
  2213. matrix_bridge_sms_homeserver_port: "{{ (matrix_homeserver_container_client_api_endpoint | split(':'))[1] }}"
  2214. matrix_bridge_sms_homeserver_token: "{{ (matrix_homeserver_generic_secret_key + ':sms.hs.token') | hash('sha512') | to_uuid }}"
  2215. ######################################################################
  2216. #
  2217. # /matrix-sms-bridge
  2218. #
  2219. ######################################################################
  2220. ######################################################################
  2221. #
  2222. # matrix-bridge-heisenbridge
  2223. #
  2224. ######################################################################
  2225. # We don't enable bridges by default.
  2226. matrix_bridge_heisenbridge_enabled: false
  2227. matrix_bridge_heisenbridge_scheme: "{{ 'https' if matrix_playbook_ssl_enabled else 'http' }}"
  2228. matrix_bridge_heisenbridge_systemd_required_services_list_auto: |
  2229. {{
  2230. matrix_addons_homeserver_systemd_services_list
  2231. }}
  2232. matrix_bridge_heisenbridge_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_bridge_heisenbridge_container_image_registry_prefix_upstream_default }}"
  2233. matrix_bridge_heisenbridge_container_network: "{{ matrix_addons_container_network }}"
  2234. matrix_bridge_heisenbridge_container_additional_networks_auto: |-
  2235. {{
  2236. (
  2237. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  2238. +
  2239. [matrix_playbook_reverse_proxyable_services_additional_network] if (matrix_bridge_heisenbridge_container_labels_traefik_enabled and matrix_playbook_reverse_proxyable_services_additional_network) else []
  2240. ) | unique
  2241. }}
  2242. matrix_bridge_heisenbridge_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  2243. matrix_bridge_heisenbridge_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  2244. matrix_bridge_heisenbridge_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  2245. matrix_bridge_heisenbridge_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  2246. matrix_bridge_heisenbridge_appservice_token: "{{ (matrix_homeserver_generic_secret_key + ':heisen.as.tok') | hash('sha512') | to_uuid }}"
  2247. matrix_bridge_heisenbridge_homeserver_token: "{{ (matrix_homeserver_generic_secret_key + ':heisen.hs.tok') | hash('sha512') | to_uuid }}"
  2248. matrix_bridge_heisenbridge_homeserver_url: "{{ matrix_addons_homeserver_client_api_url }}"
  2249. ######################################################################
  2250. #
  2251. # /matrix-bridge-heisenbridge
  2252. #
  2253. ######################################################################
  2254. ######################################################################
  2255. #
  2256. # matrix-bridge-hookshot
  2257. #
  2258. ######################################################################
  2259. # We don't enable bridges by default.
  2260. matrix_bridge_hookshot_enabled: false
  2261. matrix_bridge_hookshot_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_bridge_hookshot_container_image_registry_prefix_upstream_default }}"
  2262. matrix_bridge_hookshot_container_image_self_build: "{{ matrix_architecture not in ['arm64', 'amd64'] }}"
  2263. matrix_bridge_hookshot_appservice_token: "{{ (matrix_homeserver_generic_secret_key + ':hookshot.as.tok') | hash('sha512') | to_uuid }}"
  2264. matrix_bridge_hookshot_homeserver_token: "{{ (matrix_homeserver_generic_secret_key + ':hookshot.hs.tok') | hash('sha512') | to_uuid }}"
  2265. matrix_bridge_hookshot_homeserver_address: "{{ matrix_addons_homeserver_client_api_url }}"
  2266. matrix_bridge_hookshot_systemd_wanted_services_list: |
  2267. {{
  2268. matrix_addons_homeserver_systemd_services_list
  2269. +
  2270. ([(valkey_identifier + '.service')] if valkey_enabled and matrix_bridge_hookshot_cache_redis_host == valkey_identifier else [])
  2271. }}
  2272. # Hookshot's experimental encryption feature (and possibly others) may benefit from Redis, if available.
  2273. # We only connect to Redis if encryption is enabled (not for everyone who has Redis enabled),
  2274. # because connectivity is still potentially troublesome and is to be investigated.
  2275. matrix_bridge_hookshot_cache_redis_host: "{{ valkey_identifier if valkey_enabled else '' }}"
  2276. matrix_bridge_hookshot_container_network: "{{ matrix_addons_container_network }}"
  2277. matrix_bridge_hookshot_container_additional_networks_auto: |
  2278. {{
  2279. (
  2280. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  2281. +
  2282. ([valkey_container_network] if valkey_enabled and matrix_bridge_hookshot_cache_redis_host == valkey_identifier else [])
  2283. +
  2284. ([matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network and matrix_bridge_hookshot_container_labels_traefik_enabled else [])
  2285. ) | unique
  2286. }}
  2287. matrix_bridge_hookshot_container_http_host_bind_ports_defaultmapping:
  2288. - "{{ matrix_playbook_service_host_bind_interface_prefix }}{{ matrix_bridge_hookshot_appservice_port }}:{{ matrix_bridge_hookshot_appservice_port }}"
  2289. - "{{ matrix_playbook_service_host_bind_interface_prefix }}{{ matrix_bridge_hookshot_metrics_port }}:{{ matrix_bridge_hookshot_metrics_port }}"
  2290. - "{{ matrix_playbook_service_host_bind_interface_prefix }}{{ matrix_bridge_hookshot_webhook_port }}:{{ matrix_bridge_hookshot_webhook_port }}"
  2291. matrix_bridge_hookshot_container_http_host_bind_ports: "{{ matrix_bridge_hookshot_container_http_host_bind_ports_defaultmapping if matrix_playbook_service_host_bind_interface_prefix else [] }}"
  2292. matrix_bridge_hookshot_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  2293. matrix_bridge_hookshot_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  2294. matrix_bridge_hookshot_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  2295. matrix_bridge_hookshot_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  2296. matrix_bridge_hookshot_metrics_enabled: "{{ prometheus_enabled or matrix_metrics_exposure_enabled }}"
  2297. matrix_bridge_hookshot_metrics_proxying_enabled: "{{ matrix_bridge_hookshot_metrics_enabled and matrix_metrics_exposure_enabled }}"
  2298. matrix_bridge_hookshot_metrics_proxying_hostname: "{{ matrix_metrics_exposure_hostname }}"
  2299. matrix_bridge_hookshot_metrics_proxying_path_prefix: "{{ matrix_metrics_exposure_path_prefix }}/hookshot"
  2300. matrix_bridge_hookshot_container_labels_metrics_middleware_basic_auth_enabled: "{{ matrix_metrics_exposure_http_basic_auth_enabled }}"
  2301. matrix_bridge_hookshot_container_labels_metrics_middleware_basic_auth_users: "{{ matrix_metrics_exposure_http_basic_auth_users }}"
  2302. matrix_bridge_hookshot_public_scheme: "{{ 'https' if matrix_playbook_ssl_enabled else 'http' }}"
  2303. ######################################################################
  2304. #
  2305. # /matrix-bridge-hookshot
  2306. #
  2307. ######################################################################
  2308. ######################################################################
  2309. #
  2310. # matrix-bridge-meshtastic-relay
  2311. #
  2312. ######################################################################
  2313. # We don't enable bridges by default.
  2314. matrix_bridge_meshtastic_relay_enabled: false
  2315. matrix_bridge_meshtastic_relay_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_bridge_meshtastic_relay_container_image_registry_prefix_upstream_default }}"
  2316. matrix_bridge_meshtastic_relay_matrix_host: "{{ matrix_domain }}"
  2317. matrix_bridge_meshtastic_relay_matrix_homeserver_url: "{{ matrix_addons_homeserver_client_api_url }}"
  2318. matrix_bridge_meshtastic_relay_container_network: "{{ matrix_addons_container_network }}"
  2319. matrix_bridge_meshtastic_relay_systemd_required_services_list_auto: |
  2320. {{
  2321. matrix_addons_homeserver_systemd_services_list
  2322. }}
  2323. matrix_bridge_meshtastic_relay_container_additional_networks_auto: |
  2324. {{
  2325. ([] if matrix_addons_homeserver_container_network == '' or matrix_addons_homeserver_container_network == matrix_bridge_meshtastic_relay_container_network else [matrix_addons_homeserver_container_network])
  2326. }}
  2327. ######################################################################
  2328. #
  2329. # /matrix-bridge-meshtastic-relay
  2330. #
  2331. ######################################################################
  2332. ######################################################################
  2333. #
  2334. # matrix-bridge-mx-puppet-steam
  2335. #
  2336. ######################################################################
  2337. # We don't enable bridges by default.
  2338. matrix_bridge_mx_puppet_steam_enabled: false
  2339. matrix_bridge_mx_puppet_steam_systemd_required_services_list_auto: |
  2340. {{
  2341. matrix_addons_homeserver_systemd_services_list
  2342. +
  2343. ([postgres_identifier ~ '.service'] if (postgres_enabled and matrix_bridge_mx_puppet_steam_database_hostname == postgres_connection_hostname) else [])
  2344. }}
  2345. matrix_bridge_mx_puppet_steam_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_bridge_mx_puppet_steam_container_image_registry_prefix_upstream_default }}"
  2346. matrix_bridge_mx_puppet_steam_container_image_self_build: "{{ matrix_architecture not in ['arm64', 'amd64'] }}"
  2347. matrix_bridge_mx_puppet_steam_container_network: "{{ matrix_addons_container_network }}"
  2348. matrix_bridge_mx_puppet_steam_container_additional_networks_auto: |-
  2349. {{
  2350. (
  2351. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  2352. +
  2353. ([postgres_container_network] if (postgres_enabled and matrix_bridge_mx_puppet_steam_database_hostname == postgres_connection_hostname and matrix_bridge_mx_puppet_steam_container_network != postgres_container_network) else [])
  2354. ) | unique
  2355. }}
  2356. matrix_bridge_mx_puppet_steam_appservice_token: "{{ (matrix_homeserver_generic_secret_key + ':mxste.as.tok') | hash('sha512') | to_uuid }}"
  2357. matrix_bridge_mx_puppet_steam_homeserver_address: "{{ matrix_addons_homeserver_client_api_url }}"
  2358. matrix_bridge_mx_puppet_steam_homeserver_token: "{{ (matrix_homeserver_generic_secret_key + ':mxste.hs.tok') | hash('sha512') | to_uuid }}"
  2359. matrix_bridge_mx_puppet_steam_login_shared_secret: "{{ matrix_synapse_ext_password_provider_shared_secret_auth_shared_secret if matrix_synapse_ext_password_provider_shared_secret_auth_enabled else '' }}"
  2360. matrix_bridge_mx_puppet_steam_presence_enabled: "{{ matrix_homeserver_implementation != 'synapse' or matrix_synapse_presence_enabled }}"
  2361. # Postgres is the default, except if not using internal Postgres server
  2362. matrix_bridge_mx_puppet_steam_database_engine: "{{ 'postgres' if postgres_enabled else 'sqlite' }}"
  2363. matrix_bridge_mx_puppet_steam_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  2364. matrix_bridge_mx_puppet_steam_database_password: "{{ (matrix_homeserver_generic_secret_key + ':mxpup.steam.db') | hash('sha512') | to_uuid }}"
  2365. ######################################################################
  2366. #
  2367. # /matrix-bridge-mx-puppet-steam
  2368. #
  2369. ######################################################################
  2370. ######################################################################
  2371. #
  2372. # matrix-bridge-mx-puppet-groupme
  2373. #
  2374. ######################################################################
  2375. # We don't enable bridges by default.
  2376. matrix_bridge_mx_puppet_groupme_enabled: false
  2377. matrix_bridge_mx_puppet_groupme_systemd_required_services_list_auto: |
  2378. {{
  2379. matrix_addons_homeserver_systemd_services_list
  2380. +
  2381. ([postgres_identifier ~ '.service'] if (postgres_enabled and matrix_bridge_mx_puppet_groupme_database_hostname == postgres_connection_hostname) else [])
  2382. }}
  2383. matrix_bridge_mx_puppet_groupme_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_bridge_mx_puppet_groupme_container_image_registry_prefix_upstream_default }}"
  2384. matrix_bridge_mx_puppet_groupme_container_image_self_build: "{{ matrix_architecture != 'amd64' }}"
  2385. matrix_bridge_mx_puppet_groupme_container_network: "{{ matrix_addons_container_network }}"
  2386. matrix_bridge_mx_puppet_groupme_container_additional_networks_auto: |-
  2387. {{
  2388. (
  2389. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  2390. +
  2391. ([postgres_container_network] if (postgres_enabled and matrix_bridge_mx_puppet_groupme_database_hostname == postgres_connection_hostname and matrix_bridge_mx_puppet_groupme_container_network != postgres_container_network) else [])
  2392. ) | unique
  2393. }}
  2394. matrix_bridge_mx_puppet_groupme_appservice_token: "{{ (matrix_homeserver_generic_secret_key + ':mxgro.as.tok') | hash('sha512') | to_uuid }}"
  2395. matrix_bridge_mx_puppet_groupme_homeserver_address: "{{ matrix_addons_homeserver_client_api_url }}"
  2396. matrix_bridge_mx_puppet_groupme_homeserver_token: "{{ (matrix_homeserver_generic_secret_key + ':mxgro.hs.tok') | hash('sha512') | to_uuid }}"
  2397. matrix_bridge_mx_puppet_groupme_login_shared_secret: "{{ matrix_synapse_ext_password_provider_shared_secret_auth_shared_secret if matrix_synapse_ext_password_provider_shared_secret_auth_enabled else '' }}"
  2398. matrix_bridge_mx_puppet_groupme_presence_enabled: "{{ matrix_homeserver_implementation != 'synapse' or matrix_synapse_presence_enabled }}"
  2399. # Postgres is the default, except if not using internal Postgres server
  2400. matrix_bridge_mx_puppet_groupme_database_engine: "{{ 'postgres' if postgres_enabled else 'sqlite' }}"
  2401. matrix_bridge_mx_puppet_groupme_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  2402. matrix_bridge_mx_puppet_groupme_database_password: "{{ (matrix_homeserver_generic_secret_key + ':mxpup.groupme.db') | hash('sha512') | to_uuid }}"
  2403. ######################################################################
  2404. #
  2405. # /matrix-bridge-mx-puppet-groupme
  2406. #
  2407. ######################################################################
  2408. ######################################################################
  2409. #
  2410. # matrix-bridge-postmoogle
  2411. #
  2412. ######################################################################
  2413. # We don't enable bridges by default.
  2414. matrix_bridge_postmoogle_enabled: false
  2415. matrix_bridge_postmoogle_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_bridge_postmoogle_container_image_registry_prefix_upstream_default }}"
  2416. matrix_bridge_postmoogle_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm64'] }}"
  2417. matrix_bridge_postmoogle_ssl_path: |-
  2418. {{
  2419. {
  2420. 'playbook-managed-traefik': (traefik_certs_dumper_dumped_certificates_path if traefik_certs_dumper_enabled else ''),
  2421. 'other-traefik-container': (traefik_certs_dumper_dumped_certificates_path if traefik_certs_dumper_enabled else ''),
  2422. 'none': '',
  2423. }[matrix_playbook_reverse_proxy_type]
  2424. }}
  2425. matrix_playbook_bridge_postmoogle_traefik_tls_cert: "{% for domain in matrix_bridge_postmoogle_domains %}/ssl/{{ domain }}/certificate.crt {% endfor %}"
  2426. matrix_playbook_bridge_postmoogle_traefik_key: "{% for domain in matrix_bridge_postmoogle_domains %}/ssl/{{ domain }}/privatekey.key {% endfor %}"
  2427. matrix_bridge_postmoogle_tls_cert: |-
  2428. {{
  2429. {
  2430. 'playbook-managed-traefik': (matrix_playbook_bridge_postmoogle_traefik_tls_cert if traefik_certs_dumper_enabled else ''),
  2431. 'other-traefik-container': (matrix_playbook_bridge_postmoogle_traefik_tls_cert if traefik_certs_dumper_enabled else ''),
  2432. 'none': '',
  2433. }[matrix_playbook_reverse_proxy_type]
  2434. }}
  2435. matrix_bridge_postmoogle_tls_key: |-
  2436. {{
  2437. {
  2438. 'playbook-managed-traefik': (matrix_playbook_bridge_postmoogle_traefik_key if traefik_certs_dumper_enabled else ''),
  2439. 'other-traefik-container': (matrix_playbook_bridge_postmoogle_traefik_key if traefik_certs_dumper_enabled else ''),
  2440. 'none': '',
  2441. }[matrix_playbook_reverse_proxy_type]
  2442. }}
  2443. matrix_playbook_bridge_postmoogle_traefik_certs_dumper_waiter_services: "{% for domain in matrix_bridge_postmoogle_domains %}{{ traefik_certs_dumper_identifier }}-wait-for-domain@{{ domain }}.service {% endfor %}"
  2444. matrix_bridge_postmoogle_systemd_required_services_list_auto: |
  2445. {{
  2446. matrix_addons_homeserver_systemd_services_list
  2447. +
  2448. ([postgres_identifier ~ '.service'] if postgres_enabled and matrix_bridge_postmoogle_database_hostname == matrix_bridge_postmoogle_database_hostname else [])
  2449. +
  2450. (matrix_playbook_bridge_postmoogle_traefik_certs_dumper_waiter_services | trim | split(' ') if matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] and traefik_certs_dumper_enabled else [])
  2451. }}
  2452. # Postgres is the default, except if not using internal Postgres server
  2453. matrix_bridge_postmoogle_database_engine: "{{ 'postgres' if postgres_enabled else 'sqlite' }}"
  2454. matrix_bridge_postmoogle_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  2455. matrix_bridge_postmoogle_database_password: "{{ (matrix_homeserver_generic_secret_key + ':postmoogle.db') | hash('sha512') | to_uuid }}"
  2456. matrix_bridge_postmoogle_homeserver: "{{ matrix_addons_homeserver_client_api_url }}"
  2457. matrix_bridge_postmoogle_container_network: "{{ matrix_addons_container_network }}"
  2458. matrix_bridge_postmoogle_container_additional_networks_auto: |-
  2459. {{
  2460. (
  2461. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  2462. +
  2463. ([postgres_container_network] if postgres_enabled and matrix_bot_matrix_reminder_bot_database_hostname == postgres_connection_hostname else [])
  2464. ) | unique
  2465. }}
  2466. ######################################################################
  2467. #
  2468. # /matrix-bridge-postmoogle
  2469. #
  2470. ######################################################################
  2471. ######################################################################
  2472. #
  2473. # matrix-bridge-steam
  2474. #
  2475. ######################################################################
  2476. # We don't enable bridges by default.
  2477. matrix_bridge_steam_enabled: false
  2478. matrix_bridge_steam_systemd_required_services_list_auto: |
  2479. {{
  2480. matrix_addons_homeserver_systemd_services_list
  2481. +
  2482. ([postgres_identifier ~ '.service'] if (postgres_enabled and matrix_bridge_steam_database_hostname == postgres_connection_hostname) else [])
  2483. }}
  2484. matrix_bridge_steam_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_bridge_steam_container_image_registry_prefix_upstream_default }}"
  2485. matrix_bridge_steam_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm64'] }}"
  2486. matrix_bridge_steam_container_network: "{{ matrix_addons_container_network }}"
  2487. matrix_bridge_steam_container_additional_networks_auto: |-
  2488. {{
  2489. (
  2490. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  2491. +
  2492. ([postgres_container_network] if (postgres_enabled and matrix_bridge_steam_database_hostname == postgres_connection_hostname and matrix_bridge_steam_container_network != postgres_container_network) else [])
  2493. +
  2494. ([matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network and matrix_bridge_steam_container_labels_traefik_enabled else [])
  2495. ) | unique
  2496. }}
  2497. matrix_bridge_steam_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  2498. matrix_bridge_steam_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  2499. matrix_bridge_steam_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  2500. matrix_bridge_steam_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  2501. matrix_bridge_steam_appservice_token: "{{ (matrix_homeserver_generic_secret_key + ':steam.as.token') | hash('sha512') | to_uuid }}"
  2502. matrix_bridge_steam_homeserver_address: "{{ matrix_addons_homeserver_client_api_url }}"
  2503. matrix_bridge_steam_homeserver_token: "{{ (matrix_homeserver_generic_secret_key + ':steam.hs.token') | hash('sha512') | to_uuid }}"
  2504. matrix_bridge_steam_homeserver_async_media: "{{ matrix_homeserver_implementation in ['synapse'] }}"
  2505. matrix_bridge_steam_public_media_signing_key: "{{ ((matrix_homeserver_generic_secret_key + ':steam.pub.key') | hash('sha512') | to_uuid) if matrix_bridge_steam_public_media_enabled else '' }}"
  2506. matrix_bridge_steam_provisioning_shared_secret: "{{ (matrix_homeserver_generic_secret_key + ':steam.prov') | hash('sha512') | to_uuid }}"
  2507. matrix_bridge_steam_exposure_enabled: "{{ matrix_bridges_exposure_enabled }}"
  2508. matrix_bridge_steam_exposure_hostname: "{{ matrix_bridges_exposure_hostname }}"
  2509. matrix_bridge_steam_exposure_path_prefix: "{{ matrix_bridges_exposure_path_prefix }}/steam"
  2510. matrix_bridge_steam_double_puppet_secrets_auto: |-
  2511. {{
  2512. ({
  2513. matrix_bridge_steam_homeserver_domain: ("as_token:" + matrix_appservice_double_puppet_registration_as_token)
  2514. })
  2515. if matrix_appservice_double_puppet_enabled
  2516. else {}
  2517. }}
  2518. matrix_bridge_steam_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  2519. matrix_bridge_steam_database_password: "{{ (matrix_homeserver_generic_secret_key + ':mau.twt.db') | hash('sha512') | to_uuid if postgres_enabled else '' }}"
  2520. ######################################################################
  2521. #
  2522. # /matrix-bridge-steam
  2523. #
  2524. ######################################################################
  2525. ######################################################################
  2526. #
  2527. # matrix-bot-matrix-reminder-bot
  2528. #
  2529. ######################################################################
  2530. # We don't enable bots by default.
  2531. matrix_bot_matrix_reminder_bot_enabled: false
  2532. matrix_bot_matrix_reminder_bot_systemd_required_services_list_auto: |
  2533. {{
  2534. matrix_addons_homeserver_systemd_services_list
  2535. +
  2536. ([postgres_identifier ~ '.service'] if postgres_enabled and matrix_bot_matrix_reminder_bot_database_hostname == postgres_connection_hostname else [])
  2537. }}
  2538. matrix_bot_matrix_reminder_bot_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_bot_matrix_reminder_bot_container_image_registry_prefix_upstream_default }}"
  2539. matrix_bot_matrix_reminder_bot_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm64'] }}"
  2540. matrix_bot_matrix_reminder_bot_container_network: "{{ matrix_addons_container_network }}"
  2541. matrix_bot_matrix_reminder_bot_container_additional_networks_auto: |-
  2542. {{
  2543. (
  2544. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  2545. +
  2546. ([postgres_container_network] if postgres_enabled and matrix_bot_matrix_reminder_bot_database_hostname == postgres_connection_hostname else [])
  2547. ) | unique
  2548. }}
  2549. matrix_bot_matrix_reminder_bot_matrix_homeserver_url: "{{ matrix_addons_homeserver_client_api_url }}"
  2550. # Postgres is the default, except if not using internal Postgres server
  2551. matrix_bot_matrix_reminder_bot_database_engine: "{{ 'postgres' if postgres_enabled else 'sqlite' }}"
  2552. matrix_bot_matrix_reminder_bot_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  2553. matrix_bot_matrix_reminder_bot_database_password: "{{ (matrix_homeserver_generic_secret_key + ':reminder.bot.db') | hash('sha512') | to_uuid }}"
  2554. matrix_bot_matrix_reminder_bot_allowlist_enabled: true
  2555. matrix_bot_matrix_reminder_bot_allowlist_regexes_auto:
  2556. - "@[a-z0-9-_.]+:{{ matrix_domain }}"
  2557. ######################################################################
  2558. #
  2559. # /matrix-bot-matrix-reminder-bot
  2560. #
  2561. ######################################################################
  2562. ######################################################################
  2563. #
  2564. # matrix-bot-maubot
  2565. #
  2566. ######################################################################
  2567. # We don't enable bots by default.
  2568. matrix_bot_maubot_enabled: false
  2569. matrix_bot_maubot_systemd_required_services_list_auto: |
  2570. {{
  2571. matrix_addons_homeserver_systemd_services_list
  2572. +
  2573. ([postgres_identifier ~ '.service'] if (postgres_enabled and matrix_bot_maubot_database_hostname == postgres_connection_hostname) else [])
  2574. }}
  2575. matrix_bot_maubot_hostname: "{{ matrix_server_fqn_matrix }}"
  2576. matrix_bot_maubot_homeserver_url: "{{ matrix_addons_homeserver_client_api_url }}"
  2577. matrix_bot_maubot_homeserver_secret: |-
  2578. {{
  2579. {
  2580. 'synapse': matrix_synapse_registration_shared_secret | default(''),
  2581. 'dendrite': matrix_dendrite_client_api_registration_shared_secret | default(''),
  2582. }[matrix_homeserver_implementation] | default('')
  2583. }}
  2584. matrix_bot_maubot_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_bot_maubot_container_image_registry_prefix_upstream_default }}"
  2585. matrix_bot_maubot_container_image_self_build: "{{ matrix_architecture not in ['amd64'] }}"
  2586. matrix_bot_maubot_container_management_interface_http_bind_port: "{{ (matrix_playbook_service_host_bind_interface_prefix ~ '' ~ matrix_bot_maubot_server_port | string) if matrix_playbook_service_host_bind_interface_prefix else '' }}"
  2587. matrix_bot_maubot_container_network: "{{ matrix_addons_container_network }}"
  2588. matrix_bot_maubot_container_additional_networks_auto: |-
  2589. {{
  2590. (
  2591. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  2592. +
  2593. ([postgres_container_network] if (postgres_enabled and matrix_bot_maubot_database_hostname == postgres_connection_hostname and matrix_bot_maubot_container_network != postgres_container_network) else [])
  2594. +
  2595. ([matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network and matrix_bot_maubot_container_labels_traefik_enabled else [])
  2596. ) | unique
  2597. }}
  2598. matrix_bot_maubot_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  2599. matrix_bot_maubot_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  2600. matrix_bot_maubot_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  2601. matrix_bot_maubot_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  2602. matrix_bot_maubot_container_labels_management_hostname: "{{ matrix_server_fqn_matrix }}"
  2603. # Postgres is the default, except if not using internal Postgres server
  2604. matrix_bot_maubot_database_engine: "{{ 'postgres' if postgres_enabled else 'sqlite' }}"
  2605. matrix_bot_maubot_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  2606. matrix_bot_maubot_database_password: "{{ (matrix_homeserver_generic_secret_key + ':mxpup.dsc.db') | hash('sha512') | to_uuid }}"
  2607. ######################################################################
  2608. #
  2609. # /matrix-bot-maubot
  2610. #
  2611. ######################################################################
  2612. ######################################################################
  2613. #
  2614. # matrix-bot-honoroit
  2615. #
  2616. ######################################################################
  2617. # We don't enable bots by default.
  2618. matrix_bot_honoroit_enabled: false
  2619. matrix_bot_honoroit_hostname: "{{ matrix_server_fqn_matrix }}"
  2620. matrix_bot_honoroit_path_prefix: /honoroit
  2621. matrix_bot_honoroit_systemd_required_services_list_auto: |
  2622. {{
  2623. matrix_addons_homeserver_systemd_services_list
  2624. +
  2625. ([postgres_identifier ~ '.service'] if postgres_enabled and matrix_bot_honoroit_database_hostname == postgres_connection_hostname else [])
  2626. }}
  2627. matrix_bot_honoroit_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_bot_honoroit_container_image_registry_prefix_upstream_default }}"
  2628. matrix_bot_honoroit_container_network: "{{ matrix_addons_container_network }}"
  2629. matrix_bot_honoroit_container_additional_networks: |
  2630. {{
  2631. (
  2632. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  2633. +
  2634. ([postgres_container_network] if (postgres_enabled and matrix_bot_honoroit_database_hostname == postgres_connection_hostname and matrix_bot_honoroit_container_network != postgres_container_network) else [])
  2635. +
  2636. ([matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network and matrix_bot_honoroit_container_labels_traefik_enabled else [])
  2637. ) | unique
  2638. }}
  2639. matrix_bot_honoroit_container_labels_traefik_enabled: "{{ matrix_playbook_traefik_labels_enabled }}"
  2640. matrix_bot_honoroit_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  2641. matrix_bot_honoroit_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  2642. matrix_bot_honoroit_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  2643. # For consistency with other things hosted at the Matrix FQN, we adjust the metrics endpoint
  2644. # so that metrics would be served at something like `/metrics/SERVICE_NAME`, and not at the default path for the role (`PREFIX/metrics`).
  2645. matrix_bot_honoroit_container_labels_traefik_metrics_path: "{{ matrix_metrics_exposure_path_prefix }}/honoroit"
  2646. matrix_bot_honoroit_homeserver: "{{ matrix_addons_homeserver_client_api_url }}"
  2647. # Postgres is the default, except if not using internal Postgres server
  2648. matrix_bot_honoroit_database_engine: "{{ 'postgres' if postgres_enabled else 'sqlite' }}"
  2649. matrix_bot_honoroit_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  2650. matrix_bot_honoroit_database_password: "{{ (matrix_homeserver_generic_secret_key + ':honoroit.bot.db') | hash('sha512') | to_uuid }}"
  2651. matrix_bot_honoroit_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm64'] }}"
  2652. ######################################################################
  2653. #
  2654. # /matrix-bot-honoroit
  2655. #
  2656. ######################################################################
  2657. ######################################################################
  2658. #
  2659. # matrix-bot-buscarron
  2660. #
  2661. ######################################################################
  2662. # We don't enable bots by default.
  2663. matrix_bot_buscarron_enabled: false
  2664. matrix_bot_buscarron_hostname: "{{ matrix_server_fqn_buscarron }}"
  2665. matrix_bot_buscarron_systemd_required_services_list_auto: |
  2666. {{
  2667. matrix_addons_homeserver_systemd_services_list
  2668. +
  2669. ([postgres_identifier ~ '.service'] if (postgres_enabled and matrix_bot_buscarron_database_hostname == postgres_connection_hostname) else [])
  2670. }}
  2671. matrix_bot_buscarron_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_bot_buscarron_container_image_registry_prefix_upstream_default }}"
  2672. matrix_bot_buscarron_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm64'] }}"
  2673. matrix_bot_buscarron_container_network: "{{ matrix_addons_container_network }}"
  2674. matrix_bot_buscarron_container_additional_networks_auto: |-
  2675. {{
  2676. (
  2677. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  2678. +
  2679. ([postgres_container_network] if (postgres_enabled and matrix_bot_buscarron_database_hostname == postgres_connection_hostname and matrix_bot_buscarron_container_network != postgres_container_network) else [])
  2680. +
  2681. ([matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network and matrix_bot_buscarron_container_labels_traefik_enabled else [])
  2682. ) | unique
  2683. }}
  2684. matrix_bot_buscarron_container_labels_traefik_enabled: "{{ matrix_playbook_traefik_labels_enabled }}"
  2685. matrix_bot_buscarron_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  2686. matrix_bot_buscarron_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  2687. matrix_bot_buscarron_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  2688. matrix_bot_buscarron_homeserver: "{{ matrix_addons_homeserver_client_api_url }}"
  2689. # Postgres is the default, except if not using internal Postgres server
  2690. matrix_bot_buscarron_database_engine: "{{ 'postgres' if postgres_enabled else 'sqlite' }}"
  2691. matrix_bot_buscarron_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  2692. matrix_bot_buscarron_database_password: "{{ (matrix_homeserver_generic_secret_key + ':buscarron.bot.db') | hash('sha512') | to_uuid }}"
  2693. ######################################################################
  2694. #
  2695. # /matrix-bot-buscarron
  2696. #
  2697. ######################################################################
  2698. ######################################################################
  2699. #
  2700. # matrix-bot-baibot
  2701. #
  2702. ######################################################################
  2703. # We don't enable bots by default.
  2704. matrix_bot_baibot_enabled: false
  2705. matrix_bot_baibot_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_bot_baibot_container_image_registry_prefix_upstream_default }}"
  2706. matrix_bot_baibot_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm64'] }}"
  2707. matrix_bot_baibot_systemd_required_services_list_auto: |
  2708. {{
  2709. matrix_addons_homeserver_systemd_services_list
  2710. }}
  2711. matrix_bot_baibot_config_homeserver_url: "{{ matrix_addons_homeserver_client_api_url }}"
  2712. matrix_bot_baibot_container_network: "{{ matrix_addons_container_network }}"
  2713. matrix_bot_baibot_container_additional_networks_auto: |-
  2714. {{
  2715. (
  2716. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  2717. ) | unique
  2718. }}
  2719. ######################################################################
  2720. #
  2721. # /matrix-bot-baibot
  2722. #
  2723. ######################################################################
  2724. ######################################################################
  2725. #
  2726. # matrix-bot-mjolnir
  2727. #
  2728. ######################################################################
  2729. # We don't enable bots by default.
  2730. matrix_bot_mjolnir_enabled: false
  2731. matrix_bot_mjolnir_systemd_required_services_list_auto: |
  2732. {{
  2733. matrix_addons_homeserver_systemd_services_list
  2734. +
  2735. (['matrix-pantalaimon.service'] if matrix_bot_mjolnir_pantalaimon_use else [])
  2736. }}
  2737. matrix_bot_mjolnir_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_bot_mjolnir_container_image_registry_prefix_upstream_default }}"
  2738. matrix_bot_mjolnir_container_image_self_build: "{{ matrix_architecture != 'amd64' }}"
  2739. matrix_bot_mjolnir_container_network: "{{ matrix_addons_container_network }}"
  2740. matrix_bot_mjolnir_container_additional_networks_auto: |-
  2741. {{
  2742. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  2743. }}
  2744. matrix_bot_mjolnir_homeserver_url: "{{ 'http://matrix-pantalaimon:8009' if matrix_bot_mjolnir_pantalaimon_use else matrix_addons_homeserver_client_api_url }}"
  2745. matrix_bot_mjolnir_raw_homeserver_url: "{{ matrix_addons_homeserver_client_api_url }}"
  2746. ######################################################################
  2747. #
  2748. # /matrix-bot-mjolnir
  2749. #
  2750. ######################################################################
  2751. ######################################################################
  2752. #
  2753. # matrix-bot-draupnir
  2754. #
  2755. ######################################################################
  2756. # We don't enable bots by default.
  2757. matrix_bot_draupnir_enabled: false
  2758. matrix_bot_draupnir_container_http_host_bind_port: "{{ (matrix_playbook_service_host_bind_interface_prefix ~ '8769') if matrix_playbook_service_host_bind_interface_prefix else '' }}"
  2759. matrix_bot_draupnir_systemd_required_services_list_auto: |
  2760. {{
  2761. matrix_addons_homeserver_systemd_services_list
  2762. +
  2763. (['matrix-pantalaimon.service'] if matrix_bot_draupnir_pantalaimon_use else [])
  2764. }}
  2765. matrix_bot_draupnir_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_bot_draupnir_container_image_registry_prefix_upstream_default }}"
  2766. matrix_bot_draupnir_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm64'] }}"
  2767. matrix_bot_draupnir_container_network: "{{ matrix_addons_container_network }}"
  2768. matrix_bot_draupnir_container_additional_networks_auto: |-
  2769. {{
  2770. (
  2771. ([] if matrix_addons_homeserver_container_network == '' else
  2772. [matrix_addons_homeserver_container_network])
  2773. +
  2774. ([matrix_playbook_reverse_proxyable_services_additional_network] if
  2775. (matrix_playbook_reverse_proxyable_services_additional_network and matrix_bot_draupnir_container_labels_traefik_enabled) else [])
  2776. +
  2777. ([matrix_pantalaimon_container_network] if (matrix_bot_draupnir_pantalaimon_use and matrix_pantalaimon_container_network != matrix_bot_draupnir_container_network) else [])
  2778. ) | unique
  2779. }}
  2780. matrix_bot_draupnir_config_homeserverUrl: "{{ 'http://matrix-pantalaimon:8009' if matrix_bot_draupnir_pantalaimon_use else matrix_addons_homeserver_client_api_url }}" # noqa var-naming
  2781. matrix_bot_draupnir_config_rawHomeserverUrl: "{{ matrix_addons_homeserver_client_api_url }}" # noqa var-naming
  2782. matrix_bot_draupnir_container_labels_traefik_enabled: "{{ matrix_bot_draupnir_config_web_enabled and matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  2783. matrix_bot_draupnir_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  2784. matrix_bot_draupnir_container_labels_web_abuseReporting_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  2785. matrix_bot_draupnir_container_labels_web_abuseReporting_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  2786. #The salt is size restricted here as a maximum salt size of 16 characters exists due to the functions used.
  2787. matrix_bot_draupnir_config_web_synapseHTTPAntispam_authorization: "{{ (matrix_homeserver_generic_secret_key + ':draupnir.httpmod') | hash('sha512') | to_uuid }}" # noqa var-naming
  2788. ######################################################################
  2789. #
  2790. # /matrix-bot-draupnir
  2791. #
  2792. ######################################################################
  2793. ######################################################################
  2794. #
  2795. # matrix-bot-meowlnir
  2796. #
  2797. ######################################################################
  2798. # We don't enable bots by default.
  2799. matrix_bot_meowlnir_enabled: false
  2800. matrix_bot_meowlnir_container_http_host_bind_port: "{{ (matrix_playbook_service_host_bind_interface_prefix ~ '8772') if matrix_playbook_service_host_bind_interface_prefix else '' }}"
  2801. matrix_bot_meowlnir_systemd_required_services_list_auto: |
  2802. {{
  2803. matrix_addons_homeserver_systemd_services_list
  2804. +
  2805. ([postgres_identifier ~ '.service'] if (postgres_enabled and matrix_bot_meowlnir_database_hostname == postgres_connection_hostname) else [])
  2806. }}
  2807. matrix_bot_meowlnir_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_bot_meowlnir_container_image_registry_prefix_upstream_default }}"
  2808. matrix_bot_meowlnir_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm64'] }}"
  2809. matrix_bot_meowlnir_container_network: "{{ matrix_addons_container_network }}"
  2810. matrix_bot_meowlnir_container_additional_networks_auto: |-
  2811. {{
  2812. (
  2813. ([] if matrix_addons_homeserver_container_network == '' else
  2814. [matrix_addons_homeserver_container_network])
  2815. +
  2816. ([matrix_playbook_reverse_proxyable_services_additional_network] if
  2817. (matrix_playbook_reverse_proxyable_services_additional_network and matrix_bot_meowlnir_container_labels_traefik_enabled) else [])
  2818. +
  2819. ([postgres_container_network] if (postgres_enabled and matrix_bot_meowlnir_database_hostname == postgres_connection_hostname and matrix_bot_meowlnir_container_network != postgres_container_network) else [])
  2820. ) | unique
  2821. }}
  2822. matrix_bot_meowlnir_config_homeserver_address: "{{ matrix_addons_homeserver_client_api_url }}"
  2823. matrix_bot_meowlnir_config_homeserver_domain: "{{ matrix_domain }}"
  2824. # Provisioning bots (`ensure-matrix-users-created`) requires the homeserver to accept Meowlnir's appservice registration, which it only reads on startup.
  2825. # On the run which first enables Meowlnir, the homeserver is still running without it, so the role restarts these services to load it.
  2826. # Restarting the main service suffices even with Synapse workers, because their units declare `Requires=matrix-synapse.service` and systemd propagates the restart to them.
  2827. # Left empty for homeserver implementations whose appservice registrations the playbook does not manage (Conduit and its forks), where registration is a manual step anyway.
  2828. matrix_bot_meowlnir_homeserver_restart_systemd_services_list: "{{ ['matrix-' ~ matrix_homeserver_implementation ~ '.service'] if matrix_homeserver_implementation in ['synapse', 'dendrite'] else [] }}"
  2829. # Only consulted by bots configured with `management_room_auto_create`, and only as the
  2830. # default for those which do not carry their own `initial_managers` list.
  2831. # May legitimately be empty, in which case such bots fail validation and ask to be told who
  2832. # their initial managers should be.
  2833. matrix_bot_meowlnir_initial_managers: "{{ [matrix_admin] if matrix_admin else [] }}"
  2834. matrix_bot_meowlnir_appservice_token: "{{ (matrix_homeserver_generic_secret_key + ':meowlnir.as.token') | hash('sha512') | to_uuid }}"
  2835. matrix_bot_meowlnir_homeserver_token: "{{ (matrix_homeserver_generic_secret_key + ':meowlnir.hs.token') | hash('sha512') | to_uuid }}"
  2836. matrix_bot_meowlnir_config_meowlnir_management_secret: "{{ (matrix_homeserver_generic_secret_key + ':meowlnir.management') | hash('sha512') | to_uuid }}"
  2837. matrix_bot_meowlnir_config_meowlnir_data_secret: "{{ (matrix_homeserver_generic_secret_key + ':meowlnir.data') | hash('sha512') | to_uuid }}"
  2838. matrix_bot_meowlnir_config_antispam_secret: "{{ (matrix_homeserver_generic_secret_key + ':meowlnir.antispam') | hash('sha512') | to_uuid }}"
  2839. # Meowlnir expects a Synapse-style ed25519 private key: `<algorithm> <key ID> <unpadded-base64 32-byte seed>`.
  2840. #
  2841. # Only the seed is stored in this format — Meowlnir derives the actual keypair from it
  2842. # via `ed25519.NewKeyFromSeed`, so no elliptic curve arithmetic happens here. The 32
  2843. # hexadecimal characters sliced out of the hash below serve as the seed's 32 bytes.
  2844. #
  2845. # The key ID is cosmetic: Meowlnir always signs with the hardcoded `ed25519:policy_server`
  2846. # (see `PolicyServerKeyID` upstream), so we use a matching name to avoid confusion.
  2847. #
  2848. # Note that slicing hex text gives the seed 128 bits of entropy, not a full 256.
  2849. # That matches ed25519's own security level, so it is not a practical weakness, but you can
  2850. # override this variable with an independently generated key if you would prefer one.
  2851. matrix_bot_meowlnir_config_policy_server_signing_key: "ed25519 policy_server {{ ((matrix_homeserver_generic_secret_key + ':meowlnir.policy_server.signing_key') | hash('sha512'))[:32] | b64encode | regex_replace('=+$', '') }}"
  2852. matrix_bot_meowlnir_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  2853. matrix_bot_meowlnir_database_password: "{{ (matrix_homeserver_generic_secret_key + ':bot.meowlnir.db') | hash('sha512') | to_uuid }}"
  2854. matrix_bot_meowlnir_synapse_database_uri: "{{ ('postgresql://' + matrix_synapse_database_user + ':' + matrix_synapse_database_password + '@' + matrix_synapse_database_host + ':' + (matrix_synapse_database_port | string) + '/' + matrix_synapse_database_database + '?sslmode=disable') if (matrix_bot_meowlnir_synapse_database_integration_enabled and matrix_synapse_enabled) else '' }}"
  2855. matrix_bot_meowlnir_container_labels_traefik_enabled: "{{ (matrix_bot_meowlnir_config_reporting_enabled or matrix_bot_meowlnir_policy_server_enabled) and matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  2856. matrix_bot_meowlnir_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  2857. matrix_bot_meowlnir_container_labels_reporting_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  2858. matrix_bot_meowlnir_container_labels_reporting_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}" # noqa var-naming
  2859. matrix_bot_meowlnir_container_labels_policy_server_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  2860. matrix_bot_meowlnir_container_labels_policy_server_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}" # noqa var-naming
  2861. ######################################################################
  2862. #
  2863. # /matrix-bot-meowlnir
  2864. #
  2865. ######################################################################
  2866. ######################################################################
  2867. #
  2868. # matrix-appservice-draupnir-for-all
  2869. #
  2870. ######################################################################
  2871. # We don't enable bots by default.
  2872. matrix_appservice_draupnir_for_all_enabled: false
  2873. matrix_appservice_draupnir_for_all_systemd_required_services_list_auto: |
  2874. {{
  2875. matrix_addons_homeserver_systemd_services_list
  2876. +
  2877. ([postgres_identifier ~ '.service'] if (postgres_enabled and matrix_appservice_draupnir_for_all_database_hostname == postgres_connection_hostname) else [])
  2878. }}
  2879. matrix_appservice_draupnir_for_all_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_appservice_draupnir_for_all_container_image_registry_prefix_upstream_default }}"
  2880. matrix_appservice_draupnir_for_all_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm64'] }}"
  2881. matrix_appservice_draupnir_for_all_container_network: "{{ matrix_addons_container_network }}"
  2882. matrix_appservice_draupnir_for_all_container_additional_networks_auto: |-
  2883. {{
  2884. (
  2885. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  2886. +
  2887. ([postgres_container_network] if (postgres_enabled and matrix_appservice_draupnir_for_all_database_hostname == postgres_connection_hostname and matrix_appservice_draupnir_for_all_container_network != postgres_container_network) else [])
  2888. ) | unique
  2889. }}
  2890. matrix_appservice_draupnir_for_all_appservice_token: "{{ (matrix_homeserver_generic_secret_key + ':d4a.as.token') | hash('sha512') | to_uuid }}"
  2891. matrix_appservice_draupnir_for_all_homeserver_token: "{{ (matrix_homeserver_generic_secret_key + ':d4a.hs.token') | hash('sha512') | to_uuid }}"
  2892. matrix_appservice_draupnir_for_all_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  2893. matrix_appservice_draupnir_for_all_database_password: "{{ (matrix_homeserver_generic_secret_key + ':as.d4a.db') | hash('sha512') | to_uuid }}"
  2894. ######################################################################
  2895. #
  2896. # /matrix-appservice-draupnir-for-all
  2897. #
  2898. ######################################################################
  2899. ######################################################################
  2900. #
  2901. # matrix-appservice-double-puppet
  2902. #
  2903. ######################################################################
  2904. matrix_appservice_double_puppet_enabled: false
  2905. matrix_appservice_double_puppet_registration_as_token: "{{ (matrix_homeserver_generic_secret_key + ':as.doub.pup') | hash('sha512') | to_uuid }}"
  2906. matrix_appservice_double_puppet_registration_hs_token: "{{ (matrix_homeserver_generic_secret_key + ':hs.doub.pup') | hash('sha512') | to_uuid }}"
  2907. ######################################################################
  2908. #
  2909. # /matrix-appservice-double-puppet
  2910. #
  2911. ######################################################################
  2912. ######################################################################
  2913. #
  2914. # matrix-pantalaimon
  2915. #
  2916. ######################################################################
  2917. matrix_pantalaimon_enabled: false
  2918. matrix_pantalaimon_systemd_required_services_list_auto: |
  2919. {{
  2920. matrix_addons_homeserver_systemd_services_list
  2921. }}
  2922. matrix_pantalaimon_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_pantalaimon_container_image_registry_prefix_upstream_default }}"
  2923. matrix_pantalaimon_container_network: "{{ matrix_homeserver_container_network }}"
  2924. matrix_pantalaimon_container_image_self_build: "{{ matrix_architecture not in ['amd64'] }}"
  2925. matrix_pantalaimon_homeserver_url: "{{ matrix_addons_homeserver_client_api_url }}"
  2926. ######################################################################
  2927. #
  2928. # /matrix-pantalaimon
  2929. #
  2930. ######################################################################
  2931. ######################################################################
  2932. #
  2933. # etke/backup_borg
  2934. #
  2935. ######################################################################
  2936. backup_borg_enabled: false
  2937. backup_borg_mariadb_enabled: false
  2938. backup_borg_mysql_enabled: false
  2939. backup_borg_mongodb_enabled: false
  2940. backup_borg_identifier: matrix-backup-borg
  2941. backup_borg_storage_archive_name_format: matrix-{now:%Y-%m-%d-%H%M%S}
  2942. backup_borg_base_path: "{{ matrix_base_data_path }}/backup-borg"
  2943. backup_borg_username: "{{ matrix_user_name }}"
  2944. backup_borg_uid: "{{ matrix_user_uid }}"
  2945. backup_borg_gid: "{{ matrix_user_gid }}"
  2946. backup_borg_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else backup_borg_container_image_registry_prefix_upstream_default }}"
  2947. backup_borg_container_network: "{{ postgres_container_network if postgres_enabled else backup_borg_identifier }}"
  2948. backup_borg_postgresql_version_detection_postgres_role_name: "{{ 'galaxy/postgres' if postgres_enabled else '' }}"
  2949. backup_borg_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm32', 'arm64'] }}"
  2950. backup_borg_postgresql_enabled: "{{ postgres_enabled }}"
  2951. backup_borg_postgresql_databases_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  2952. backup_borg_postgresql_databases_username: "{{ postgres_connection_username if postgres_enabled else '' }}"
  2953. backup_borg_postgresql_databases_password: "{{ postgres_connection_password if postgres_enabled else '' }}"
  2954. backup_borg_postgresql_databases_port: "{{ postgres_connection_port if postgres_enabled else 5432 }}"
  2955. backup_borg_postgresql_databases_auto: "{{ postgres_managed_databases | map(attribute='name') if postgres_enabled else [] }}"
  2956. backup_borg_location_source_directories_auto:
  2957. - "{{ matrix_base_data_path }}"
  2958. # local_thumbnails is deliberately NOT excluded: with dynamic_thumbnails disabled (Synapse's default),
  2959. # nothing regenerates lost thumbnails, so the official Synapse backup guide recommends backing them up.
  2960. backup_borg_location_exclude_patterns_auto: |
  2961. {{
  2962. ([matrix_synapse_media_store_path + '/remote_content', matrix_synapse_media_store_path + '/remote_thumbnail', matrix_synapse_media_store_path + '/url_cache', matrix_synapse_media_store_path + '/url_cache_thumbnails'] if matrix_homeserver_implementation == 'synapse' else [])
  2963. +
  2964. ([postgres_data_path] if postgres_enabled else [])
  2965. }}
  2966. backup_borg_systemd_required_services_list: |
  2967. {{
  2968. [devture_systemd_docker_base_docker_service_name]
  2969. +
  2970. ([postgres_identifier ~ '.service'] if postgres_enabled else [])
  2971. }}
  2972. ######################################################################
  2973. #
  2974. # /etke/backup_borg
  2975. #
  2976. ######################################################################
  2977. ######################################################################
  2978. #
  2979. # matrix-cactus-comments
  2980. #
  2981. ######################################################################
  2982. matrix_cactus_comments_enabled: false
  2983. matrix_cactus_comments_systemd_required_services_list_auto: |
  2984. {{
  2985. matrix_addons_homeserver_systemd_services_list
  2986. }}
  2987. matrix_cactus_comments_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_cactus_comments_container_image_registry_prefix_upstream_default }}"
  2988. matrix_cactus_comments_container_image_self_build: "{{ matrix_architecture not in ['amd64'] }}"
  2989. matrix_cactus_comments_container_network: "{{ matrix_addons_container_network }}"
  2990. matrix_cactus_comments_container_additional_networks_auto: |-
  2991. {{
  2992. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  2993. }}
  2994. matrix_cactus_comments_as_token: "{{ (matrix_homeserver_generic_secret_key + ':cactus.as.token') | hash('sha512') | to_uuid }}"
  2995. matrix_cactus_comments_hs_token: "{{ (matrix_homeserver_generic_secret_key + ':cactus.hs.token') | hash('sha512') | to_uuid }}"
  2996. matrix_cactus_comments_homeserver_url: "{{ matrix_addons_homeserver_client_api_url }}"
  2997. ######################################################################
  2998. #
  2999. # /matrix-cactus-comments
  3000. #
  3001. ######################################################################
  3002. ######################################################################
  3003. #
  3004. # matrix-cactus-comments-client
  3005. #
  3006. ######################################################################
  3007. matrix_cactus_comments_client_enabled: "{{ matrix_cactus_comments_enabled }}"
  3008. matrix_cactus_comments_client_hostname: "{{ matrix_server_fqn_matrix }}"
  3009. matrix_cactus_comments_client_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_cactus_comments_client_container_image_registry_prefix_upstream_default }}"
  3010. matrix_cactus_comments_client_container_network: "{{ matrix_addons_container_network }}"
  3011. matrix_cactus_comments_client_container_additional_networks_auto: |-
  3012. {{
  3013. (
  3014. ([matrix_playbook_reverse_proxyable_services_additional_network] if (matrix_playbook_reverse_proxyable_services_additional_network and matrix_cactus_comments_client_container_labels_traefik_enabled) else [])
  3015. ) | unique
  3016. }}
  3017. matrix_cactus_comments_client_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  3018. matrix_cactus_comments_client_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  3019. matrix_cactus_comments_client_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  3020. matrix_cactus_comments_client_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  3021. ######################################################################
  3022. #
  3023. # /matrix-cactus-comments-client
  3024. #
  3025. ######################################################################
  3026. ######################################################################
  3027. #
  3028. # matrix-corporal
  3029. #
  3030. ######################################################################
  3031. matrix_corporal_enabled: false
  3032. matrix_corporal_systemd_required_services_list_auto: |
  3033. {{
  3034. (['matrix-' + matrix_homeserver_implementation + '.service'])
  3035. }}
  3036. matrix_corporal_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_corporal_container_image_registry_prefix_upstream_default }}"
  3037. matrix_corporal_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm64'] }}"
  3038. matrix_corporal_container_http_gateway_host_bind_port: "{{ (matrix_playbook_service_host_bind_interface_prefix ~ '41080') if matrix_playbook_service_host_bind_interface_prefix else '' }}"
  3039. matrix_corporal_container_http_api_host_bind_port: "{{ (matrix_playbook_service_host_bind_interface_prefix ~ '41081') if matrix_playbook_service_host_bind_interface_prefix else '' }}"
  3040. matrix_corporal_container_network: matrix-corporal
  3041. matrix_corporal_container_additional_networks: |
  3042. {{
  3043. (
  3044. ([matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network else [])
  3045. +
  3046. ([matrix_homeserver_container_network] if matrix_corporal_container_network != matrix_homeserver_container_network else [])
  3047. ) | unique
  3048. }}
  3049. matrix_corporal_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  3050. matrix_corporal_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  3051. matrix_corporal_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  3052. matrix_corporal_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  3053. matrix_corporal_matrix_homeserver_scheme: "{{ 'https' if matrix_playbook_ssl_enabled else 'http' }}"
  3054. matrix_corporal_matrix_homeserver_api_endpoint: "{{ matrix_homeserver_container_url }}"
  3055. matrix_corporal_matrix_auth_shared_secret: "{{ matrix_synapse_ext_password_provider_shared_secret_auth_shared_secret }}"
  3056. # This is only useful if there's REST auth provider to make use of it.
  3057. matrix_corporal_http_gateway_internal_rest_auth_enabled: "{{ matrix_synapse_ext_password_provider_rest_auth_enabled }}"
  3058. matrix_corporal_matrix_registration_shared_secret: "{{ matrix_synapse_registration_shared_secret }}"
  3059. ######################################################################
  3060. #
  3061. # /matrix-corporal
  3062. #
  3063. ######################################################################
  3064. ######################################################################
  3065. #
  3066. # matrix-matrixto
  3067. #
  3068. ######################################################################
  3069. # We don't enable matrixto by default.
  3070. matrix_matrixto_enabled: false
  3071. matrix_matrixto_base_path: "{{ matrix_base_data_path }}/matrixto"
  3072. # The container image is not provided at https://github.com/matrix-org/matrix.to
  3073. matrix_matrixto_container_image_self_build: true
  3074. matrix_matrixto_hostname: "{{ matrix_server_fqn_matrixto }}"
  3075. matrix_matrixto_container_network: matrix-matrixto
  3076. matrix_matrixto_container_additional_networks: "{{ [matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network else [] }}"
  3077. matrix_matrixto_container_http_host_bind_port: "{{ (matrix_playbook_service_host_bind_interface_prefix ~ '5000') if matrix_playbook_service_host_bind_interface_prefix else '' }}"
  3078. matrix_matrixto_container_labels_traefik_enabled: "{{ matrix_playbook_traefik_labels_enabled }}"
  3079. matrix_matrixto_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  3080. matrix_matrixto_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  3081. matrix_matrixto_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  3082. ######################################################################
  3083. #
  3084. # /matrix-matrixto
  3085. #
  3086. ######################################################################
  3087. ######################################################################
  3088. #
  3089. # matrix-rageshake
  3090. #
  3091. ######################################################################
  3092. # We don't enable rageshake by default.
  3093. matrix_rageshake_enabled: false
  3094. matrix_rageshake_container_image_self_build: "{{ matrix_architecture not in ['amd64'] }}"
  3095. matrix_rageshake_hostname: "{{ matrix_server_fqn_rageshake }}"
  3096. matrix_rageshake_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_rageshake_container_image_registry_prefix_upstream_default }}"
  3097. matrix_rageshake_container_additional_networks: "{{ [matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network else [] }}"
  3098. matrix_rageshake_container_http_host_bind_port: "{{ (matrix_playbook_service_host_bind_interface_prefix ~ '9110') if matrix_playbook_service_host_bind_interface_prefix else '' }}"
  3099. matrix_rageshake_container_labels_traefik_enabled: "{{ matrix_playbook_traefik_labels_enabled }}"
  3100. matrix_rageshake_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  3101. matrix_rageshake_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  3102. matrix_rageshake_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  3103. ######################################################################
  3104. #
  3105. # /matrix-rageshake
  3106. #
  3107. ######################################################################
  3108. ######################################################################
  3109. #
  3110. # coturn
  3111. #
  3112. ######################################################################
  3113. # Coturn is enabled by default only when Jitsi is enabled because Jitsi still
  3114. # depends on legacy TURN integration for compatibility.
  3115. coturn_enabled: "{{ jitsi_enabled | bool }}"
  3116. coturn_identifier: matrix-coturn
  3117. coturn_base_path: "{{ matrix_base_data_path }}/coturn"
  3118. coturn_uid: "{{ matrix_user_uid }}"
  3119. coturn_gid: "{{ matrix_user_gid }}"
  3120. coturn_hostname: "{{ matrix_server_fqn_matrix }}"
  3121. coturn_container_image_registry_prefix: "{{ 'localhost/' if coturn_container_image_self_build else coturn_container_image_registry_prefix_upstream }}"
  3122. coturn_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else coturn_container_image_registry_prefix_upstream_default }}"
  3123. coturn_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm32', 'arm64'] }}"
  3124. # By default, we use the official public instance.
  3125. coturn_turn_external_ip_address_auto_detection_echoip_service_url: https://ifconfig.co/json
  3126. coturn_turn_static_auth_secret: "{{ ((matrix_homeserver_generic_secret_key + ':coturn.sas') | hash('sha512') | to_uuid) if coturn_authentication_method == 'auth-secret' else '' }}"
  3127. coturn_lt_cred_mech_username: "{{ ((matrix_homeserver_generic_secret_key + ':coturn.user') | hash('sha512') | to_uuid) if coturn_authentication_method == 'lt-cred-mech' else '' }}"
  3128. coturn_lt_cred_mech_password: "{{ ((matrix_homeserver_generic_secret_key + ':coturn.pass') | hash('sha512') | to_uuid) if coturn_authentication_method == 'lt-cred-mech' else '' }}"
  3129. coturn_tls_enabled: "{{ matrix_playbook_ssl_enabled }}"
  3130. coturn_tls_cert_path: |-
  3131. {{
  3132. {
  3133. 'playbook-managed-traefik': ('/certificate.crt' if traefik_certs_dumper_enabled else ''),
  3134. 'other-traefik-container': ('/certificate.crt' if traefik_certs_dumper_enabled else ''),
  3135. 'none': '',
  3136. }[matrix_playbook_reverse_proxy_type]
  3137. }}
  3138. coturn_tls_key_path: |-
  3139. {{
  3140. {
  3141. 'playbook-managed-traefik': ('/privatekey.key' if traefik_certs_dumper_enabled else ''),
  3142. 'other-traefik-container': ('/privatekey.key' if traefik_certs_dumper_enabled else ''),
  3143. 'none': '',
  3144. }[matrix_playbook_reverse_proxy_type]
  3145. }}
  3146. coturn_container_additional_volumes: |
  3147. {{
  3148. (
  3149. [
  3150. {
  3151. 'src': (traefik_certs_dumper_dumped_certificates_path + '/' + coturn_hostname + '/certificate.crt'),
  3152. 'dst': '/certificate.crt',
  3153. 'options': 'ro',
  3154. },
  3155. {
  3156. 'src': (traefik_certs_dumper_dumped_certificates_path + '/' + coturn_hostname + '/privatekey.key'),
  3157. 'dst': '/privatekey.key',
  3158. 'options': 'ro',
  3159. },
  3160. ] if (matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] and traefik_certs_dumper_enabled and coturn_tls_enabled and (coturn_tls_cert_path and coturn_tls_key_path)) else []
  3161. )
  3162. }}
  3163. coturn_systemd_required_services_list_auto: |
  3164. {{
  3165. ([traefik_certs_dumper_identifier + '-wait-for-domain@' + coturn_hostname + '.service'] if matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] and traefik_certs_dumper_enabled and coturn_tls_enabled else [])
  3166. }}
  3167. ######################################################################
  3168. #
  3169. # /coturn
  3170. #
  3171. ######################################################################
  3172. ######################################################################
  3173. #
  3174. # etherpad
  3175. #
  3176. ######################################################################
  3177. etherpad_enabled: false
  3178. etherpad_identifier: matrix-etherpad
  3179. etherpad_scheme: "{{ 'https' if matrix_playbook_ssl_enabled else 'http' }}"
  3180. etherpad_base_path: "{{ matrix_base_data_path }}/etherpad"
  3181. etherpad_uid: "{{ matrix_user_uid }}"
  3182. etherpad_gid: "{{ matrix_user_gid }}"
  3183. etherpad_framing_enabled: "{{ jitsi_enabled }}"
  3184. etherpad_hostname: "{{ matrix_server_fqn_etherpad }}"
  3185. etherpad_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else etherpad_container_image_registry_prefix_upstream_default }}"
  3186. etherpad_container_image_self_build: "{{ matrix_architecture not in ['amd64'] }}"
  3187. etherpad_container_http_host_bind_port: "{{ (matrix_playbook_service_host_bind_interface_prefix ~ '9001') if matrix_playbook_service_host_bind_interface_prefix else '' }}"
  3188. etherpad_container_network: "{{ matrix_addons_container_network }}"
  3189. etherpad_container_additional_networks_auto: |
  3190. {{
  3191. (
  3192. ([matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network else [])
  3193. +
  3194. ([postgres_container_network] if postgres_enabled and postgres_container_network != etherpad_container_network else [])
  3195. ) | unique
  3196. }}
  3197. etherpad_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  3198. etherpad_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  3199. etherpad_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  3200. etherpad_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  3201. etherpad_systemd_required_services_list_auto: |
  3202. {{
  3203. ([postgres_identifier ~ '.service'] if postgres_enabled else [])
  3204. }}
  3205. etherpad_database_postgres_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  3206. etherpad_database_name: matrix_etherpad
  3207. etherpad_database_postgres_username: matrix_etherpad
  3208. etherpad_database_postgres_password: "{{ (matrix_homeserver_generic_secret_key + ':etherpad.db') | hash('sha512') | to_uuid }}"
  3209. ######################################################################
  3210. #
  3211. # /etherpad
  3212. #
  3213. ######################################################################
  3214. ######################################################################
  3215. #
  3216. # ddclient
  3217. #
  3218. ######################################################################
  3219. ddclient_enabled: false
  3220. ddclient_identifier: matrix-dynamic-dns
  3221. ddclient_base_path: "{{ matrix_base_data_path }}/dynamic-dns"
  3222. ddclient_uid: "{{ matrix_user_uid }}"
  3223. ddclient_gid: "{{ matrix_user_gid }}"
  3224. ddclient_container_image_registry_prefix: "{{ 'localhost/' if ddclient_container_image_self_build else ddclient_container_image_registry_prefix_upstream }}"
  3225. ddclient_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else ddclient_container_image_registry_prefix_upstream_default }}"
  3226. ddclient_web: "https://cloudflare.com/cdn-cgi/trace"
  3227. ddclient_web_skip: "ip="
  3228. ######################################################################
  3229. #
  3230. # /ddclient
  3231. #
  3232. ######################################################################
  3233. ######################################################################
  3234. #
  3235. # jitsi
  3236. #
  3237. ######################################################################
  3238. jitsi_enabled: false
  3239. jitsi_architecture: "{{ matrix_architecture }}"
  3240. jitsi_hostname: "{{ matrix_server_fqn_jitsi }}"
  3241. jitsi_identifier: matrix-jitsi
  3242. jitsi_base_path: "{{ matrix_base_data_path }}/jitsi"
  3243. jitsi_uid: "{{ matrix_user_uid }}"
  3244. jitsi_gid: "{{ matrix_user_gid }}"
  3245. jitsi_user_username: "{{ matrix_user_name }}"
  3246. jitsi_web_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else jitsi_web_container_image_registry_prefix_upstream_default }}"
  3247. jitsi_web_container_http_host_bind_port: "{{ (matrix_playbook_service_host_bind_interface_prefix ~ '13080') if matrix_playbook_service_host_bind_interface_prefix else '' }}"
  3248. jitsi_web_container_additional_networks_auto: |
  3249. {{
  3250. ([matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network else [])
  3251. }}
  3252. jitsi_jvb_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else jitsi_jvb_container_image_registry_prefix_upstream_default }}"
  3253. jitsi_jvb_container_additional_networks_auto: |
  3254. {{
  3255. ([matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network else [])
  3256. }}
  3257. jitsi_prosody_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else jitsi_prosody_container_image_registry_prefix_upstream_default }}"
  3258. jitsi_prosody_container_http_host_bind_port: "{{ (matrix_playbook_service_host_bind_interface_prefix ~ '5280') if matrix_playbook_service_host_bind_interface_prefix else '' }}"
  3259. jitsi_prosody_container_additional_networks_auto: |
  3260. {{
  3261. ([matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network else [])
  3262. }}
  3263. jitsi_jicofo_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else jitsi_jicofo_container_image_registry_prefix_upstream_default }}"
  3264. jitsi_container_labels_traefik_enabled: "{{ matrix_playbook_traefik_labels_enabled }}"
  3265. jitsi_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  3266. jitsi_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  3267. jitsi_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  3268. jitsi_jibri_xmpp_password: "{{ (matrix_homeserver_generic_secret_key + ':jibri') | hash('sha512') | to_uuid }}"
  3269. jitsi_jicofo_auth_password: "{{ (matrix_homeserver_generic_secret_key + ':jicofo') | hash('sha512') | to_uuid }}"
  3270. jitsi_jvb_auth_password: "{{ (matrix_homeserver_generic_secret_key + ':jvb') | hash('sha512') | to_uuid }}"
  3271. jitsi_web_stun_servers: |
  3272. {{
  3273. [
  3274. 'stun:' + matrix_server_fqn_matrix + ':5349',
  3275. 'stun:' + matrix_server_fqn_matrix + ':3478',
  3276. ]
  3277. if coturn_enabled
  3278. else [ 'stun:meet-jit-si-turnrelay.jitsi.net:443']
  3279. }}
  3280. # The Jitsi instance installed by this playbook is meant for embedding into Matrix clients, so framing is allowed.
  3281. jitsi_web_framing_enabled: true
  3282. # Jitsi (Prosody) only seems to support authenticating with coturn using `auth-secret`, not `lt-cred-mech`.
  3283. # See: https://prosody.im/doc/coturn
  3284. jitsi_turn_credentials: "{{ coturn_turn_static_auth_secret if (coturn_enabled and coturn_authentication_method == 'auth-secret') else '' }}"
  3285. jitsi_turn_host: "{{ ('turn.' + matrix_server_fqn_matrix) if coturn_enabled else '' }}"
  3286. jitsi_turns_host: "{{ ('turn.' + matrix_server_fqn_matrix) if coturn_enabled else '' }}"
  3287. jitsi_turn_port: "{{ coturn_container_stun_plain_host_bind_port_tcp.split(':')[-1] if coturn_enabled else '' }}"
  3288. jitsi_turns_port: "{{ coturn_container_stun_tls_host_bind_port_tcp.split(':')[-1] if coturn_enabled else '' }}"
  3289. # If the self-hosted Etherpad instance is available, it will also show up in Jitsi conferences,
  3290. # unless explicitly disabled by setting `jitsi_etherpad_enabled` to false.
  3291. # Falls back to the scalar.vector.im etherpad in case someone sets `jitsi_etherpad_enabled` to true,
  3292. # while also setting `etherpad_enabled` to false.
  3293. jitsi_etherpad_enabled: "{{ etherpad_enabled }}"
  3294. # The trailing slash is stripped, because the Jitsi role appends path segments (e.g. `/p/`) itself
  3295. # and `etherpad_base_url` ends with a slash, which would otherwise produce double-slash URLs.
  3296. jitsi_etherpad_base: "{{ (etherpad_base_url | regex_replace('/+$', '')) if etherpad_enabled else 'https://scalar.vector.im/etherpad' }}"
  3297. # Allow verification using JWT and matrix-UVS
  3298. jitsi_prosody_auth_matrix_uvs_sync_power_levels: "{{ matrix_user_verification_service_enabled }}"
  3299. jitsi_prosody_auth_matrix_uvs_auth_token: "{{ matrix_user_verification_service_uvs_auth_token }}"
  3300. jitsi_prosody_auth_matrix_uvs_location: "{{ matrix_user_verification_service_container_url }}"
  3301. jitsi_self_check_validate_certificates: "{{ matrix_playbook_ssl_enabled }}"
  3302. # Gravatar is enabled by default upstream, but there's no need to leak data there needlessly
  3303. # when embedding Jitsi in Matrix rooms.
  3304. jitsi_disable_gravatar: true
  3305. ######################################################################
  3306. #
  3307. # /jitsi
  3308. #
  3309. ######################################################################
  3310. ########################################################################
  3311. # #
  3312. # exim-relay #
  3313. # #
  3314. ########################################################################
  3315. # We set up an Exim email relay by default.
  3316. # This is so that the homeserver and various other services can send emails through it.
  3317. # To completely disable this service, use: `exim_relay_enabled: false`
  3318. exim_relay_identifier: "matrix-exim-relay"
  3319. exim_relay_base_path: "{{ matrix_base_data_path }}/exim-relay"
  3320. exim_relay_uid: "{{ matrix_user_uid }}"
  3321. exim_relay_gid: "{{ matrix_user_gid }}"
  3322. exim_relay_hostname: "{{ matrix_server_fqn_matrix }}"
  3323. exim_relay_sender_address: "matrix@{{ exim_relay_hostname }}"
  3324. exim_relay_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else exim_relay_container_image_registry_prefix_upstream_default }}"
  3325. exim_relay_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm32', 'arm64'] }}"
  3326. ########################################################################
  3327. # #
  3328. # /exim-relay #
  3329. # #
  3330. ########################################################################
  3331. ######################################################################
  3332. #
  3333. # matrix-media-repo
  3334. #
  3335. ######################################################################
  3336. matrix_media_repo_enabled: false
  3337. matrix_media_repo_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_media_repo_container_image_registry_prefix_upstream_default }}"
  3338. matrix_media_repo_container_network: "{{ matrix_homeserver_container_network }}"
  3339. matrix_media_repo_container_additional_networks: |
  3340. {{
  3341. (
  3342. ([matrix_homeserver_container_network] if (matrix_media_repo_container_network != matrix_homeserver_container_network) else [])
  3343. +
  3344. ([postgres_container_network] if (postgres_enabled and matrix_media_repo_database_hostname == postgres_connection_hostname and postgres_container_network != matrix_media_repo_container_network) else [])
  3345. +
  3346. ([matrix_playbook_reverse_proxyable_services_additional_network] if (matrix_playbook_reverse_proxyable_services_additional_network and matrix_media_repo_container_labels_traefik_enabled) else [])
  3347. +
  3348. ([valkey_container_network] if valkey_enabled and matrix_media_repo_redis_enabled else [])
  3349. ) | unique
  3350. }}
  3351. matrix_media_repo_container_labels_traefik_enabled: "{{ matrix_playbook_traefik_labels_enabled }}"
  3352. matrix_media_repo_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  3353. matrix_media_repo_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  3354. matrix_media_repo_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  3355. matrix_media_repo_container_labels_traefik_internal_media_enabled: "{{ matrix_playbook_internal_matrix_client_api_traefik_entrypoint_enabled }}"
  3356. matrix_media_repo_container_labels_traefik_internal_media_entrypoints: "{{ matrix_playbook_internal_matrix_client_api_traefik_entrypoint_name }}"
  3357. matrix_media_repo_container_labels_traefik_internal_matrix_client_media_enabled: "{{ matrix_playbook_internal_matrix_client_api_traefik_entrypoint_enabled }}"
  3358. matrix_media_repo_container_labels_traefik_internal_matrix_client_media_entrypoints: "{{ matrix_playbook_internal_matrix_client_api_traefik_entrypoint_name }}"
  3359. matrix_media_repo_metrics_proxying_enabled: "{{ matrix_media_repo_metrics_enabled and matrix_metrics_exposure_enabled }}"
  3360. matrix_media_repo_metrics_proxying_hostname: "{{ matrix_metrics_exposure_hostname }}"
  3361. matrix_media_repo_metrics_proxying_path: "{{ matrix_metrics_exposure_path_prefix }}/matrix-media-repo"
  3362. matrix_media_repo_container_labels_traefik_metrics_middleware_basic_auth_enabled: "{{ matrix_metrics_exposure_http_basic_auth_enabled }}"
  3363. matrix_media_repo_container_labels_traefik_metrics_middleware_basic_auth_users: "{{ matrix_metrics_exposure_http_basic_auth_users }}"
  3364. matrix_media_repo_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  3365. matrix_media_repo_database_username: matrix_media_repo
  3366. matrix_media_repo_database_password: "{{ (matrix_homeserver_generic_secret_key + ':mediarepo.db') | hash('sha512') | to_uuid }}"
  3367. matrix_media_repo_database_name: matrix_media_repo
  3368. matrix_media_repo_systemd_required_services_list_auto: |
  3369. {{
  3370. matrix_addons_homeserver_systemd_services_list
  3371. +
  3372. ([postgres_identifier ~ '.service'] if postgres_enabled and matrix_media_repo_database_hostname == postgres_connection_hostname else [])
  3373. }}
  3374. matrix_media_repo_generate_signing_key: "{{ matrix_homeserver_implementation == 'synapse' or matrix_homeserver_implementation == 'dendrite'}}"
  3375. matrix_media_repo_homeserver_signing_key: "{{ matrix_media_repo_synapse_signing_key if matrix_homeserver_implementation == 'synapse' else (matrix_media_repo_dendrite_signing_key if matrix_homeserver_implementation == 'dendrite' else '') }}"
  3376. matrix_media_repo_synapse_signing_key: "{{ matrix_synapse_config_dir_path }}/{{ matrix_server_fqn_matrix }}.signing.key"
  3377. matrix_media_repo_dendrite_signing_key: "{{ matrix_dendrite_config_dir_path }}/{{ matrix_server_fqn_matrix }}.signing.pem"
  3378. # Auto configured server setup by the playbook
  3379. matrix_media_repo_homeservers_auto:
  3380. - # Keep the dash from this line.
  3381. # This should match the server_name of your homeserver, and the Host header
  3382. # provided to the media repo.
  3383. name: "{{ matrix_domain }}"
  3384. # The base URL to where the homeserver can actually be reached by MMR.
  3385. csApi: "{{ matrix_homeserver_container_url }}"
  3386. # The number of consecutive failures in calling this homeserver before the
  3387. # media repository will start backing off. This defaults to 10 if not given.
  3388. backoffAt: 10
  3389. # The admin API interface supported by the homeserver. MMR uses a subset of the admin API
  3390. # during certain operations, like attempting to purge media from a room or validating server
  3391. # admin status. This should be set to one of "synapse", "dendrite", or "matrix". When set
  3392. # to "matrix", most functionality requiring the admin API will not work.
  3393. adminApiKind: "{{ 'synapse' if matrix_homeserver_implementation == 'synapse' else ('dendrite' if matrix_homeserver_implementation == 'dendrite' else 'matrix') }}"
  3394. # The signing key to use for authorizing outbound federation requests. If not specified,
  3395. # requests will not be authorized. See https://docs.t2bot.io/matrix-media-repo/v1.3.5/installation/signing-key/
  3396. # for details.
  3397. signingKeyPath: "{{ '/config/' + matrix_media_repo_identifier + '.signing.key' if matrix_media_repo_generate_signing_key else '' }}"
  3398. matrix_media_repo_homeserver_federation_enabled: "{{ matrix_homeserver_federation_enabled }}"
  3399. matrix_media_repo_redis_enabled: "{{ valkey_enabled }}"
  3400. # Use next redis index since Synapse is on 0. You can chose between index 0 and 15.
  3401. matrix_media_repo_redis_database_number: 1
  3402. matrix_media_repo_redis_shards: |
  3403. {{
  3404. ([{
  3405. 'name': 'valkey',
  3406. 'addr': (valkey_identifier + ':' + valkey_container_tcp_port | string),
  3407. }])
  3408. if valkey_enabled and matrix_media_repo_redis_enabled
  3409. else []
  3410. }}
  3411. ######################################################################
  3412. #
  3413. # /matrix-media-repo
  3414. #
  3415. ######################################################################
  3416. ########################################################################
  3417. # #
  3418. # postgres #
  3419. # #
  3420. ########################################################################
  3421. # To completely disable installing Postgres, use `postgres_enabled: false`.
  3422. postgres_identifier: matrix-postgres
  3423. postgres_architecture: "{{ matrix_architecture }}"
  3424. postgres_base_path: "{{ matrix_base_data_path }}/postgres"
  3425. postgres_uid: "{{ matrix_user_uid }}"
  3426. postgres_gid: "{{ matrix_user_gid }}"
  3427. postgres_allowed_versions_auto: "{{ backup_borg_supported_postgres_versions | map('int') if backup_borg_enabled | default(false) and backup_borg_postgresql_enabled | default(false) else [] }}"
  3428. postgres_connection_username: matrix
  3429. postgres_db_name: matrix
  3430. postgres_systemd_services_to_stop_for_maintenance_list_auto: "{{ devture_systemd_service_manager_services_list_auto | map(attribute='name') | reject('equalto', (postgres_identifier + '.service')) }}"
  3431. # When Synapse workers are enabled, connection demand grows with the number of Synapse processes:
  3432. # each process (the main one and every worker) maintains its own connection pool of up to `matrix_synapse_database_cp_max` connections.
  3433. # The formula below reserves a 200-connection baseline for everything else talking to Postgres and adds `cp_max` per Synapse process.
  3434. # It never goes below 500, the fixed value used previously, so existing worker setups are not downsized.
  3435. # Note: the worker count reflects the `matrix_synapse_workers_*_count` variables.
  3436. # If you populate `matrix_synapse_workers_enabled_list` manually, consider overriding `postgres_max_connections` yourself.
  3437. postgres_max_connections: "{{ [200 + (matrix_synapse_database_cp_max | int) * ((matrix_synapse_workers_total_count | int) + 1), 500] | max if matrix_synapse_workers_enabled else 200 }}"
  3438. postgres_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else postgres_container_image_registry_prefix_upstream_default }}"
  3439. postgres_pgloader_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else postgres_pgloader_container_image_registry_prefix_upstream_default }}"
  3440. postgres_managed_databases_auto: |
  3441. {{
  3442. ([{
  3443. 'name': matrix_synapse_database_database,
  3444. 'username': matrix_synapse_database_user,
  3445. 'password': matrix_synapse_database_password,
  3446. }] if (matrix_synapse_enabled and matrix_playbook_synapse_uses_managed_postgres) else [])
  3447. +
  3448. ([{
  3449. 'name': matrix_dendrite_federation_api_database,
  3450. 'username': matrix_dendrite_database_user,
  3451. 'password': matrix_dendrite_database_password,
  3452. },{
  3453. 'name': matrix_dendrite_key_server_database,
  3454. 'username': matrix_dendrite_database_user,
  3455. 'password': matrix_dendrite_database_password,
  3456. },{
  3457. 'name': matrix_dendrite_media_api_database,
  3458. 'username': matrix_dendrite_database_user,
  3459. 'password': matrix_dendrite_database_password,
  3460. },{
  3461. 'name': matrix_dendrite_room_database,
  3462. 'username': matrix_dendrite_database_user,
  3463. 'password': matrix_dendrite_database_password,
  3464. },{
  3465. 'name': matrix_dendrite_sync_api_database,
  3466. 'username': matrix_dendrite_database_user,
  3467. 'password': matrix_dendrite_database_password,
  3468. },{
  3469. 'name': matrix_dendrite_user_api_database,
  3470. 'username': matrix_dendrite_database_user,
  3471. 'password': matrix_dendrite_database_password,
  3472. },{
  3473. 'name': matrix_dendrite_relay_api_database,
  3474. 'username': matrix_dendrite_database_user,
  3475. 'password': matrix_dendrite_database_password,
  3476. },{
  3477. 'name': matrix_dendrite_push_server_database,
  3478. 'username': matrix_dendrite_database_user,
  3479. 'password': matrix_dendrite_database_password,
  3480. },{
  3481. 'name': matrix_dendrite_mscs_database,
  3482. 'username': matrix_dendrite_database_user,
  3483. 'password': matrix_dendrite_database_password,
  3484. }] if (matrix_dendrite_enabled and matrix_dendrite_database_hostname == postgres_connection_hostname) else [])
  3485. +
  3486. ([{
  3487. 'name': matrix_authentication_service_config_database_database,
  3488. 'username': matrix_authentication_service_config_database_username,
  3489. 'password': matrix_authentication_service_config_database_password,
  3490. }] if (matrix_authentication_service_enabled and matrix_playbook_matrix_authentication_service_uses_managed_postgres) else [])
  3491. +
  3492. ([{
  3493. 'name': matrix_bot_matrix_reminder_bot_database_name,
  3494. 'username': matrix_bot_matrix_reminder_bot_database_username,
  3495. 'password': matrix_bot_matrix_reminder_bot_database_password,
  3496. }] if (matrix_bot_matrix_reminder_bot_enabled and matrix_bot_matrix_reminder_bot_database_engine == 'postgres' and matrix_bot_matrix_reminder_bot_database_hostname == postgres_connection_hostname) else [])
  3497. +
  3498. ([{
  3499. 'name': matrix_bot_honoroit_database_name,
  3500. 'username': matrix_bot_honoroit_database_username,
  3501. 'password': matrix_bot_honoroit_database_password,
  3502. }] if (matrix_bot_honoroit_enabled and matrix_bot_honoroit_database_engine == 'postgres' and matrix_bot_honoroit_database_hostname == postgres_connection_hostname) else [])
  3503. +
  3504. ([{
  3505. 'name': matrix_bridge_postmoogle_database_name,
  3506. 'username': matrix_bridge_postmoogle_database_username,
  3507. 'password': matrix_bridge_postmoogle_database_password,
  3508. }] if (matrix_bridge_postmoogle_enabled and matrix_bridge_postmoogle_database_engine == 'postgres' and matrix_bridge_postmoogle_database_hostname == postgres_connection_hostname) else [])
  3509. +
  3510. ([{
  3511. 'name': matrix_bot_maubot_database_name,
  3512. 'username': matrix_bot_maubot_database_username,
  3513. 'password': matrix_bot_maubot_database_password,
  3514. }] if (matrix_bot_maubot_enabled and matrix_bot_maubot_database_engine == 'postgres' and matrix_bot_maubot_database_hostname == postgres_connection_hostname) else [])
  3515. +
  3516. ([{
  3517. 'name': matrix_bot_buscarron_database_name,
  3518. 'username': matrix_bot_buscarron_database_username,
  3519. 'password': matrix_bot_buscarron_database_password,
  3520. }] if (matrix_bot_buscarron_enabled and matrix_bot_buscarron_database_engine == 'postgres' and matrix_bot_buscarron_database_hostname == postgres_connection_hostname) else [])
  3521. +
  3522. ([{
  3523. 'name': matrix_bridge_appservice_discord_database_name,
  3524. 'username': matrix_bridge_appservice_discord_database_username,
  3525. 'password': matrix_bridge_appservice_discord_database_password,
  3526. }] if (matrix_bridge_appservice_discord_enabled and matrix_bridge_appservice_discord_database_engine == 'postgres' and matrix_bridge_appservice_discord_database_hostname == postgres_connection_hostname) else [])
  3527. +
  3528. ([{
  3529. 'name': matrix_appservice_draupnir_for_all_database_name,
  3530. 'username': matrix_appservice_draupnir_for_all_database_username,
  3531. 'password': matrix_appservice_draupnir_for_all_database_password,
  3532. }] if (matrix_appservice_draupnir_for_all_enabled and matrix_appservice_draupnir_for_all_database_hostname == postgres_connection_hostname) else [])
  3533. +
  3534. ([{
  3535. 'name': matrix_bot_meowlnir_database_name,
  3536. 'username': matrix_bot_meowlnir_database_username,
  3537. 'password': matrix_bot_meowlnir_database_password,
  3538. }] if (matrix_bot_meowlnir_enabled and matrix_bot_meowlnir_database_engine == 'postgres' and matrix_bot_meowlnir_database_hostname == postgres_connection_hostname) else [])
  3539. +
  3540. ([{
  3541. 'name': matrix_bridge_appservice_irc_database_name,
  3542. 'username': matrix_bridge_appservice_irc_database_username,
  3543. 'password': matrix_bridge_appservice_irc_database_password,
  3544. }] if (matrix_bridge_appservice_irc_enabled and matrix_bridge_appservice_irc_database_engine == 'postgres' and matrix_bridge_appservice_irc_database_hostname == postgres_connection_hostname) else [])
  3545. +
  3546. ([{
  3547. 'name': matrix_bridge_beeper_linkedin_database_name,
  3548. 'username': matrix_bridge_beeper_linkedin_database_username,
  3549. 'password': matrix_bridge_beeper_linkedin_database_password,
  3550. }] if (matrix_bridge_beeper_linkedin_enabled and matrix_bridge_beeper_linkedin_database_engine == 'postgres' and matrix_bridge_beeper_linkedin_database_hostname == postgres_connection_hostname) else [])
  3551. +
  3552. ([{
  3553. 'name': matrix_bridge_beeper_line_database_name,
  3554. 'username': matrix_bridge_beeper_line_database_username,
  3555. 'password': matrix_bridge_beeper_line_database_password,
  3556. }] if (matrix_bridge_beeper_line_enabled and matrix_bridge_beeper_line_database_engine == 'postgres' and matrix_bridge_beeper_line_database_hostname == postgres_connection_hostname) else [])
  3557. +
  3558. ([{
  3559. 'name': matrix_bridge_wechat_database_name,
  3560. 'username': matrix_bridge_wechat_database_username,
  3561. 'password': matrix_bridge_wechat_database_password,
  3562. }] if (matrix_bridge_wechat_enabled and matrix_bridge_wechat_database_engine == 'postgres' and matrix_bridge_wechat_database_hostname == postgres_connection_hostname) else [])
  3563. +
  3564. ([{
  3565. 'name': matrix_bridge_mautrix_bluesky_database_name,
  3566. 'username': matrix_bridge_mautrix_bluesky_database_username,
  3567. 'password': matrix_bridge_mautrix_bluesky_database_password,
  3568. }] if (matrix_bridge_mautrix_bluesky_enabled and matrix_bridge_mautrix_bluesky_database_engine == 'postgres' and matrix_bridge_mautrix_bluesky_database_hostname == postgres_connection_hostname) else [])
  3569. +
  3570. ([{
  3571. 'name': matrix_bridge_rustpush_database_name,
  3572. 'username': matrix_bridge_rustpush_database_username,
  3573. 'password': matrix_bridge_rustpush_database_password,
  3574. }] if (matrix_bridge_rustpush_enabled and matrix_bridge_rustpush_database_engine == 'postgres' and matrix_bridge_rustpush_database_hostname == postgres_connection_hostname) else [])
  3575. +
  3576. ([{
  3577. 'name': matrix_bridge_mautrix_googlechat_database_name,
  3578. 'username': matrix_bridge_mautrix_googlechat_database_username,
  3579. 'password': matrix_bridge_mautrix_googlechat_database_password,
  3580. }] if (matrix_bridge_mautrix_googlechat_enabled and matrix_bridge_mautrix_googlechat_database_engine == 'postgres' and matrix_bridge_mautrix_googlechat_database_hostname == postgres_connection_hostname) else [])
  3581. +
  3582. ([{
  3583. 'name': matrix_bridge_mautrix_signal_database_name,
  3584. 'username': matrix_bridge_mautrix_signal_database_username,
  3585. 'password': matrix_bridge_mautrix_signal_database_password,
  3586. }] if (matrix_bridge_mautrix_signal_enabled and matrix_bridge_mautrix_signal_database_engine == 'postgres' and matrix_bridge_mautrix_signal_database_hostname == postgres_connection_hostname) else [])
  3587. +
  3588. ([{
  3589. 'name': matrix_bridge_mautrix_meta_messenger_database_name,
  3590. 'username': matrix_bridge_mautrix_meta_messenger_database_username,
  3591. 'password': matrix_bridge_mautrix_meta_messenger_database_password,
  3592. }] if (matrix_bridge_mautrix_meta_messenger_enabled and matrix_bridge_mautrix_meta_messenger_database_engine == 'postgres' and matrix_bridge_mautrix_meta_messenger_database_hostname == postgres_connection_hostname) else [])
  3593. +
  3594. ([{
  3595. 'name': matrix_bridge_mautrix_meta_instagram_database_name,
  3596. 'username': matrix_bridge_mautrix_meta_instagram_database_username,
  3597. 'password': matrix_bridge_mautrix_meta_instagram_database_password,
  3598. }] if (matrix_bridge_mautrix_meta_instagram_enabled and matrix_bridge_mautrix_meta_instagram_database_engine == 'postgres' and matrix_bridge_mautrix_meta_instagram_database_hostname == postgres_connection_hostname) else [])
  3599. +
  3600. ([{
  3601. 'name': matrix_bridge_mautrix_wsproxy_syncproxy_database_name,
  3602. 'username': matrix_bridge_mautrix_wsproxy_syncproxy_database_username,
  3603. 'password': matrix_bridge_mautrix_wsproxy_syncproxy_database_password,
  3604. }] if (matrix_bridge_mautrix_wsproxy_enabled and matrix_bridge_mautrix_wsproxy_syncproxy_database_engine == 'postgres' and matrix_bridge_mautrix_wsproxy_syncproxy_database_hostname == 'matrix-postgres') else [])
  3605. +
  3606. ([{
  3607. 'name': matrix_bridge_mautrix_telegram_database_name,
  3608. 'username': matrix_bridge_mautrix_telegram_database_username,
  3609. 'password': matrix_bridge_mautrix_telegram_database_password,
  3610. }] if (matrix_bridge_mautrix_telegram_enabled and matrix_bridge_mautrix_telegram_database_engine == 'postgres' and matrix_bridge_mautrix_telegram_database_hostname == postgres_connection_hostname) else [])
  3611. +
  3612. ([{
  3613. 'name': matrix_bridge_mautrix_twitter_database_name,
  3614. 'username': matrix_bridge_mautrix_twitter_database_username,
  3615. 'password': matrix_bridge_mautrix_twitter_database_password,
  3616. }] if (matrix_bridge_mautrix_twitter_enabled and matrix_bridge_mautrix_twitter_database_engine == 'postgres' and matrix_bridge_mautrix_twitter_database_hostname == postgres_connection_hostname) else [])
  3617. +
  3618. ([{
  3619. 'name': matrix_bridge_mautrix_gmessages_database_name,
  3620. 'username': matrix_bridge_mautrix_gmessages_database_username,
  3621. 'password': matrix_bridge_mautrix_gmessages_database_password,
  3622. }] if (matrix_bridge_mautrix_gmessages_enabled and matrix_bridge_mautrix_gmessages_database_engine == 'postgres' and matrix_bridge_mautrix_gmessages_database_hostname == postgres_connection_hostname) else [])
  3623. +
  3624. ([{
  3625. 'name': matrix_bridge_mautrix_gvoice_database_name,
  3626. 'username': matrix_bridge_mautrix_gvoice_database_username,
  3627. 'password': matrix_bridge_mautrix_gvoice_database_password,
  3628. }] if (matrix_bridge_mautrix_gvoice_enabled and matrix_bridge_mautrix_gvoice_database_engine == 'postgres' and matrix_bridge_mautrix_gvoice_database_hostname == postgres_connection_hostname) else [])
  3629. +
  3630. ([{
  3631. 'name': matrix_bridge_mautrix_linkedin_database_name,
  3632. 'username': matrix_bridge_mautrix_linkedin_database_username,
  3633. 'password': matrix_bridge_mautrix_linkedin_database_password,
  3634. }] if (matrix_bridge_mautrix_linkedin_enabled and matrix_bridge_mautrix_linkedin_database_engine == 'postgres' and matrix_bridge_mautrix_linkedin_database_hostname == postgres_connection_hostname) else [])
  3635. +
  3636. ([{
  3637. 'name': matrix_bridge_mautrix_whatsapp_database_name,
  3638. 'username': matrix_bridge_mautrix_whatsapp_database_username,
  3639. 'password': matrix_bridge_mautrix_whatsapp_database_password,
  3640. }] if (matrix_bridge_mautrix_whatsapp_enabled and matrix_bridge_mautrix_whatsapp_database_engine == 'postgres' and matrix_bridge_mautrix_whatsapp_database_hostname == postgres_connection_hostname) else [])
  3641. +
  3642. ([{
  3643. 'name': matrix_bridge_mautrix_discord_database_name,
  3644. 'username': matrix_bridge_mautrix_discord_database_username,
  3645. 'password': matrix_bridge_mautrix_discord_database_password,
  3646. }] if (matrix_bridge_mautrix_discord_enabled and matrix_bridge_mautrix_discord_database_engine == 'postgres' and matrix_bridge_mautrix_discord_database_hostname == postgres_connection_hostname) else [])
  3647. +
  3648. ([{
  3649. 'name': matrix_bridge_mautrix_slack_database_name,
  3650. 'username': matrix_bridge_mautrix_slack_database_username,
  3651. 'password': matrix_bridge_mautrix_slack_database_password,
  3652. }] if (matrix_bridge_mautrix_slack_enabled and matrix_bridge_mautrix_slack_database_engine == 'postgres' and matrix_bridge_mautrix_slack_database_hostname == postgres_connection_hostname) else [])
  3653. +
  3654. ([{
  3655. 'name': matrix_bridge_mx_puppet_steam_database_name,
  3656. 'username': matrix_bridge_mx_puppet_steam_database_username,
  3657. 'password': matrix_bridge_mx_puppet_steam_database_password,
  3658. }] if (matrix_bridge_mx_puppet_steam_enabled and matrix_bridge_mx_puppet_steam_database_engine == 'postgres' and matrix_bridge_mx_puppet_steam_database_hostname == postgres_connection_hostname) else [])
  3659. +
  3660. ([{
  3661. 'name': matrix_bridge_mx_puppet_groupme_database_name,
  3662. 'username': matrix_bridge_mx_puppet_groupme_database_username,
  3663. 'password': matrix_bridge_mx_puppet_groupme_database_password,
  3664. }] if (matrix_bridge_mx_puppet_groupme_enabled and matrix_bridge_mx_puppet_groupme_database_engine == 'postgres' and matrix_bridge_mx_puppet_groupme_database_hostname == postgres_connection_hostname) else [])
  3665. +
  3666. ([{
  3667. 'name': matrix_bridge_steam_database_name,
  3668. 'username': matrix_bridge_steam_database_username,
  3669. 'password': matrix_bridge_steam_database_password,
  3670. }] if (matrix_bridge_steam_enabled and matrix_bridge_steam_database_engine == 'postgres' and matrix_bridge_steam_database_hostname == postgres_connection_hostname) else [])
  3671. +
  3672. ([{
  3673. 'name': etherpad_database_name,
  3674. 'username': etherpad_database_postgres_username,
  3675. 'password': etherpad_database_postgres_password,
  3676. }] if (etherpad_enabled and etherpad_database_type == 'postgres' and etherpad_database_postgres_hostname == postgres_connection_hostname) else [])
  3677. +
  3678. ([{
  3679. 'name': prometheus_postgres_exporter_database_name,
  3680. 'username': prometheus_postgres_exporter_database_username,
  3681. 'password': prometheus_postgres_exporter_database_password,
  3682. 'additional_sql_queries': ['GRANT pg_monitor TO "' + prometheus_postgres_exporter_database_username + '";'],
  3683. }] if (prometheus_postgres_exporter_enabled and prometheus_postgres_exporter_database_hostname == postgres_connection_hostname) else [])
  3684. +
  3685. ([{
  3686. 'name': matrix_media_repo_database_name,
  3687. 'username': matrix_media_repo_database_username,
  3688. 'password': matrix_media_repo_database_password,
  3689. }] if (matrix_media_repo_enabled and matrix_media_repo_database_hostname == postgres_connection_hostname) else [])
  3690. }}
  3691. ########################################################################
  3692. # #
  3693. # /postgres #
  3694. # #
  3695. ########################################################################
  3696. ########################################################################
  3697. # #
  3698. # postgres_backup #
  3699. # #
  3700. ########################################################################
  3701. postgres_backup_enabled: false
  3702. postgres_backup_identifier: matrix-postgres-backup
  3703. postgres_backup_architecture: "{{ matrix_architecture }}"
  3704. postgres_backup_base_path: "{{ matrix_base_data_path }}/postgres-backup"
  3705. postgres_backup_systemd_required_services_list_auto: |
  3706. {{
  3707. ([(postgres_identifier + '.service')] if (postgres_enabled and postgres_backup_connection_hostname == postgres_connection_hostname) else [])
  3708. }}
  3709. postgres_backup_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else postgres_backup_container_image_registry_prefix_upstream_default }}"
  3710. postgres_backup_container_network: "{{ (postgres_container_network if (postgres_enabled and postgres_backup_connection_hostname == postgres_connection_hostname) else postgres_backup_identifier) }}"
  3711. postgres_backup_container_additional_networks_auto: |-
  3712. {{
  3713. ([postgres_container_network] if (postgres_enabled and postgres_backup_connection_hostname == postgres_connection_hostname and postgres_backup_container_network != postgres_container_network) else [])
  3714. }}
  3715. postgres_backup_uid: "{{ matrix_user_uid }}"
  3716. postgres_backup_gid: "{{ matrix_user_gid }}"
  3717. postgres_backup_connection_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  3718. postgres_backup_connection_port: "{{ postgres_connection_port if postgres_enabled else 5432 }}"
  3719. postgres_backup_connection_username: "{{ postgres_connection_username if postgres_enabled else '' }}"
  3720. postgres_backup_connection_password: "{{ postgres_connection_password if postgres_enabled else '' }}"
  3721. postgres_backup_postgres_data_path: "{{ postgres_data_path if postgres_enabled else '' }}"
  3722. postgres_backup_postgres_role_include_name: galaxy/postgres
  3723. postgres_backup_databases_auto: "{{ postgres_managed_databases | map(attribute='name') if postgres_enabled else [] }}"
  3724. ########################################################################
  3725. # #
  3726. # /postgres_backup #
  3727. # #
  3728. ########################################################################
  3729. ######################################################################
  3730. #
  3731. # matrix-sygnal
  3732. #
  3733. ######################################################################
  3734. # Most people don't need their own push-server, because they also need their own app to utilize it from.
  3735. matrix_sygnal_enabled: false
  3736. matrix_sygnal_metrics_prometheus_enabled: "{{ prometheus_enabled or matrix_metrics_exposure_enabled }}"
  3737. matrix_sygnal_hostname: "{{ matrix_server_fqn_sygnal }}"
  3738. matrix_sygnal_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_sygnal_container_image_registry_prefix_upstream_default }}"
  3739. matrix_sygnal_container_network: "{{ matrix_homeserver_container_network }}"
  3740. matrix_sygnal_container_additional_networks: "{{ [matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network else [] }}"
  3741. matrix_sygnal_container_http_host_bind_port: "{{ (matrix_playbook_service_host_bind_interface_prefix ~ '6000') if matrix_playbook_service_host_bind_interface_prefix else '' }}"
  3742. matrix_sygnal_container_labels_traefik_enabled: "{{ matrix_playbook_traefik_labels_enabled }}"
  3743. matrix_sygnal_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  3744. matrix_sygnal_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  3745. matrix_sygnal_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  3746. ######################################################################
  3747. #
  3748. # /matrix-sygnal
  3749. #
  3750. ######################################################################
  3751. ######################################################################
  3752. #
  3753. # ntfy
  3754. #
  3755. ######################################################################
  3756. ntfy_enabled: false
  3757. ntfy_identifier: matrix-ntfy
  3758. ntfy_base_path: "{{ matrix_base_data_path }}/ntfy"
  3759. ntfy_uid: "{{ matrix_user_uid }}"
  3760. ntfy_gid: "{{ matrix_user_gid }}"
  3761. ntfy_hostname: "{{ matrix_server_fqn_ntfy }}"
  3762. ntfy_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else ntfy_container_image_registry_prefix_upstream_default }}"
  3763. ntfy_container_additional_networks_auto: "{{ [matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network else [] }}"
  3764. ntfy_container_http_host_bind_port: "{{ (matrix_playbook_service_host_bind_interface_prefix ~ '2586') if matrix_playbook_service_host_bind_interface_prefix else '' }}"
  3765. ntfy_container_labels_traefik_enabled: "{{ matrix_playbook_traefik_labels_enabled }}"
  3766. ntfy_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  3767. ntfy_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  3768. ntfy_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  3769. # We have ntfy serve its metrics endpoint on a dedicated port, instead of on the regular HTTP port.
  3770. # Were it served on the regular HTTP port, the endpoint would also become reachable at `https://ntfy.example.com/metrics`.
  3771. # Nothing protects it there, because ntfy does not apply its own access-control rules to the metrics endpoint.
  3772. ntfy_metrics_listen_http_port: "{{ 9090 if (prometheus_enabled or matrix_metrics_exposure_enabled) else '' }}"
  3773. ntfy_container_labels_traefik_metrics_enabled: "{{ matrix_metrics_exposure_enabled }}"
  3774. # For consistency with other things hosted at the Matrix FQN, we adjust the metrics endpoint
  3775. # so that metrics would be served at something like `/metrics/SERVICE_NAME`, and not at the default path for the role (`/metrics`).
  3776. ntfy_container_labels_traefik_metrics_hostname: "{{ matrix_server_fqn_matrix }}"
  3777. ntfy_container_labels_traefik_metrics_path_prefix: "{{ matrix_metrics_exposure_path_prefix }}/ntfy"
  3778. ntfy_container_labels_traefik_metrics_middleware_basic_auth_enabled: "{{ matrix_metrics_exposure_http_basic_auth_enabled }}"
  3779. ntfy_container_labels_traefik_metrics_middleware_basic_auth_users: "{{ matrix_metrics_exposure_http_basic_auth_users }}"
  3780. ntfy_visitor_request_limit_exempt_hosts_hostnames_auto: |
  3781. {{
  3782. [matrix_server_fqn_matrix]
  3783. }}
  3784. ######################################################################
  3785. #
  3786. # /ntfy
  3787. #
  3788. ######################################################################
  3789. ######################################################################
  3790. #
  3791. # valkey
  3792. #
  3793. ######################################################################
  3794. valkey_enabled: "{{ matrix_synapse_workers_enabled or (matrix_bridge_hookshot_enabled and matrix_bridge_hookshot_encryption_enabled) }}"
  3795. valkey_identifier: matrix-valkey
  3796. valkey_uid: "{{ matrix_user_uid }}"
  3797. valkey_gid: "{{ matrix_user_gid }}"
  3798. valkey_base_path: "{{ matrix_base_data_path }}/valkey"
  3799. valkey_arch: "{{ matrix_architecture }}"
  3800. valkey_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else valkey_container_image_registry_prefix_upstream_default }}"
  3801. ######################################################################
  3802. #
  3803. # valkey
  3804. #
  3805. ######################################################################
  3806. ######################################################################
  3807. #
  3808. # matrix-client-element
  3809. #
  3810. ######################################################################
  3811. # By default, this playbook installs the Element Web on the `matrix_server_fqn_element` domain.
  3812. # If you wish to connect to your Matrix server by other means, you may wish to disable this.
  3813. matrix_client_element_enabled: true
  3814. matrix_client_element_scheme: "{{ 'https' if matrix_playbook_ssl_enabled else 'http' }}"
  3815. matrix_client_element_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_client_element_container_image_registry_prefix_upstream_default }}"
  3816. matrix_client_element_container_image_self_build: "{{ matrix_architecture not in ['arm64', 'amd64'] }}"
  3817. matrix_client_element_container_http_host_bind_port: "{{ (matrix_playbook_service_host_bind_interface_prefix ~ '8765') if matrix_playbook_service_host_bind_interface_prefix else '' }}"
  3818. matrix_client_element_container_network: "{{ matrix_addons_container_network }}"
  3819. matrix_client_element_container_additional_networks: "{{ [matrix_playbook_reverse_proxyable_services_additional_network] if (matrix_client_element_container_labels_traefik_enabled and matrix_playbook_reverse_proxyable_services_additional_network) else [] }}"
  3820. matrix_client_element_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  3821. matrix_client_element_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  3822. matrix_client_element_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  3823. matrix_client_element_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  3824. matrix_client_element_container_labels_traefik_compression_middleware_enabled: "{{ matrix_playbook_reverse_proxy_traefik_middleware_compression_enabled }}"
  3825. matrix_client_element_container_labels_traefik_compression_middleware_name: "{{ matrix_playbook_reverse_proxy_traefik_middleware_compression_name if matrix_playbook_reverse_proxy_traefik_middleware_compression_enabled else '' }}"
  3826. matrix_client_element_default_hs_url: "{{ matrix_homeserver_url }}"
  3827. matrix_client_element_default_is_url: "{{ matrix_identity_server_url }}"
  3828. matrix_client_element_self_check_validate_certificates: "{{ matrix_playbook_ssl_enabled }}"
  3829. matrix_client_element_registration_enabled: "{{ matrix_synapse_enable_registration }}"
  3830. matrix_client_element_enable_presence_by_hs_url: |-
  3831. {{
  3832. none
  3833. if matrix_synapse_presence_enabled
  3834. else {matrix_client_element_default_hs_url: false}
  3835. }}
  3836. matrix_client_element_jitsi_preferred_domain: "{{ matrix_server_fqn_jitsi if jitsi_enabled else '' }}"
  3837. matrix_client_element_features_feature_video_rooms: "{{ matrix_rtc_enabled }}"
  3838. matrix_client_element_features_feature_group_calls: "{{ matrix_rtc_enabled }}"
  3839. matrix_client_element_features_feature_element_call_video_rooms: "{{ matrix_rtc_enabled }}"
  3840. matrix_client_element_features_feature_oidc_native_flow: "{{ matrix_authentication_service_enabled }}"
  3841. matrix_client_element_element_call_enabled: "{{ matrix_element_call_enabled }}"
  3842. matrix_client_element_element_call_url: "{{ matrix_element_call_public_url if matrix_element_call_enabled else '' }}"
  3843. ######################################################################
  3844. #
  3845. # /matrix-client-element
  3846. #
  3847. ######################################################################
  3848. ######################################################################
  3849. #
  3850. # matrix-client-commet
  3851. #
  3852. ######################################################################
  3853. matrix_client_commet_enabled: false
  3854. matrix_client_commet_scheme: "{{ 'https' if matrix_playbook_ssl_enabled else 'http' }}"
  3855. matrix_client_commet_hostname: "commet.{{ matrix_domain }}"
  3856. matrix_client_commet_container_http_host_bind_port: "{{ (matrix_playbook_service_host_bind_interface_prefix ~ '8766') if matrix_playbook_service_host_bind_interface_prefix else '' }}"
  3857. matrix_client_commet_container_network: "{{ matrix_addons_container_network }}"
  3858. matrix_client_commet_container_additional_networks: "{{ [matrix_playbook_reverse_proxyable_services_additional_network] if (matrix_client_commet_container_labels_traefik_enabled and matrix_playbook_reverse_proxyable_services_additional_network) else [] }}"
  3859. matrix_client_commet_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  3860. matrix_client_commet_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  3861. matrix_client_commet_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  3862. matrix_client_commet_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  3863. matrix_client_commet_container_labels_traefik_compression_middleware_enabled: "{{ matrix_playbook_reverse_proxy_traefik_middleware_compression_enabled }}"
  3864. matrix_client_commet_container_labels_traefik_compression_middleware_name: "{{ matrix_playbook_reverse_proxy_traefik_middleware_compression_name if matrix_playbook_reverse_proxy_traefik_middleware_compression_enabled else '' }}"
  3865. ######################################################################
  3866. #
  3867. # /matrix-client-commet
  3868. #
  3869. ######################################################################
  3870. ######################################################################
  3871. #
  3872. # matrix-client-gomuks
  3873. #
  3874. ######################################################################
  3875. matrix_client_gomuks_enabled: false
  3876. matrix_client_gomuks_scheme: "{{ 'https' if matrix_playbook_ssl_enabled else 'http' }}"
  3877. matrix_client_gomuks_hostname: "{{ matrix_server_fqn_gomuks }}"
  3878. matrix_client_gomuks_container_http_host_bind_port: "{{ (matrix_playbook_service_host_bind_interface_prefix ~ '29325') if matrix_playbook_service_host_bind_interface_prefix else '' }}"
  3879. matrix_client_gomuks_container_network: "{{ matrix_addons_container_network }}"
  3880. matrix_client_gomuks_container_additional_networks_auto: "{{ [matrix_playbook_reverse_proxyable_services_additional_network] if (matrix_client_gomuks_container_labels_traefik_enabled and matrix_playbook_reverse_proxyable_services_additional_network) else [] }}"
  3881. matrix_client_gomuks_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  3882. matrix_client_gomuks_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  3883. matrix_client_gomuks_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  3884. matrix_client_gomuks_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  3885. matrix_client_gomuks_container_labels_traefik_compression_middleware_enabled: "{{ matrix_playbook_reverse_proxy_traefik_middleware_compression_enabled }}"
  3886. matrix_client_gomuks_container_labels_traefik_compression_middleware_name: "{{ matrix_playbook_reverse_proxy_traefik_middleware_compression_name if matrix_playbook_reverse_proxy_traefik_middleware_compression_enabled else '' }}"
  3887. matrix_client_gomuks_self_check_validate_certificates: "{{ matrix_playbook_ssl_enabled }}"
  3888. ######################################################################
  3889. #
  3890. # /matrix-client-gomuks
  3891. #
  3892. ######################################################################
  3893. ######################################################################
  3894. #
  3895. # hydrogen
  3896. #
  3897. ######################################################################
  3898. hydrogen_enabled: false
  3899. hydrogen_identifier: matrix-client-hydrogen
  3900. hydrogen_uid: "{{ matrix_user_uid }}"
  3901. hydrogen_gid: "{{ matrix_user_gid }}"
  3902. hydrogen_container_image_registry_prefix: "{{ 'localhost/' if hydrogen_container_image_self_build else hydrogen_container_image_registry_prefix_upstream }}"
  3903. hydrogen_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else hydrogen_container_image_registry_prefix_upstream_default }}"
  3904. hydrogen_container_image_self_build: "{{ matrix_architecture not in ['arm64', 'amd64'] }}"
  3905. hydrogen_container_http_host_bind_port: "{{ (matrix_playbook_service_host_bind_interface_prefix ~ '8768') if matrix_playbook_service_host_bind_interface_prefix else '' }}"
  3906. hydrogen_container_network: "{{ matrix_addons_container_network }}"
  3907. hydrogen_container_additional_networks: "{{ [matrix_playbook_reverse_proxyable_services_additional_network] if (hydrogen_container_labels_traefik_enabled and matrix_playbook_reverse_proxyable_services_additional_network) else [] }}"
  3908. hydrogen_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  3909. hydrogen_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  3910. hydrogen_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  3911. hydrogen_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  3912. hydrogen_container_labels_traefik_compression_middleware_enabled: "{{ matrix_playbook_reverse_proxy_traefik_middleware_compression_enabled }}"
  3913. hydrogen_container_labels_traefik_compression_middleware_name: "{{ matrix_playbook_reverse_proxy_traefik_middleware_compression_name if matrix_playbook_reverse_proxy_traefik_middleware_compression_enabled else '' }}"
  3914. hydrogen_scheme: "{{ 'https' if matrix_playbook_ssl_enabled else 'http' }}"
  3915. hydrogen_default_hs_url: "{{ matrix_homeserver_url }}"
  3916. hydrogen_self_check_validate_certificates: "{{ matrix_playbook_ssl_enabled }}"
  3917. hydrogen_base_path: "{{ matrix_base_data_path }}/client-hydrogen"
  3918. hydrogen_hostname: "{{ matrix_server_fqn_hydrogen }}"
  3919. ######################################################################
  3920. #
  3921. # /hydrogen
  3922. #
  3923. ######################################################################
  3924. ######################################################################
  3925. #
  3926. # cinny
  3927. #
  3928. ######################################################################
  3929. cinny_enabled: false
  3930. cinny_identifier: matrix-client-cinny
  3931. cinny_uid: "{{ matrix_user_uid }}"
  3932. cinny_gid: "{{ matrix_user_gid }}"
  3933. cinny_container_image_registry_prefix: "{{ 'localhost/' if cinny_container_image_self_build else cinny_container_image_registry_prefix_upstream }}"
  3934. cinny_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else cinny_container_image_registry_prefix_upstream_default }}"
  3935. cinny_container_image_self_build: "{{ matrix_architecture not in ['arm64', 'amd64'] }}"
  3936. cinny_container_http_host_bind_port: "{{ (matrix_playbook_service_host_bind_interface_prefix ~ '8080') if matrix_playbook_service_host_bind_interface_prefix else '' }}"
  3937. cinny_container_network: "{{ matrix_addons_container_network }}"
  3938. cinny_container_additional_networks: "{{ [matrix_playbook_reverse_proxyable_services_additional_network] if (cinny_container_labels_traefik_enabled and matrix_playbook_reverse_proxyable_services_additional_network) else [] }}"
  3939. cinny_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  3940. cinny_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  3941. cinny_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  3942. cinny_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  3943. cinny_container_labels_traefik_compression_middleware_enabled: "{{ matrix_playbook_reverse_proxy_traefik_middleware_compression_enabled }}"
  3944. cinny_container_labels_traefik_compression_middleware_name: "{{ matrix_playbook_reverse_proxy_traefik_middleware_compression_name if matrix_playbook_reverse_proxy_traefik_middleware_compression_enabled else '' }}"
  3945. cinny_scheme: "{{ 'https' if matrix_playbook_ssl_enabled else 'http' }}"
  3946. cinny_default_hs_url: "{{ matrix_homeserver_url }}"
  3947. cinny_self_check_validate_certificates: "{{ matrix_playbook_ssl_enabled }}"
  3948. cinny_base_path: "{{ matrix_base_data_path }}/client-cinny"
  3949. cinny_hostname: "{{ matrix_server_fqn_cinny }}"
  3950. ######################################################################
  3951. #
  3952. # /cinny
  3953. #
  3954. ######################################################################
  3955. ######################################################################
  3956. #
  3957. # sable
  3958. #
  3959. ######################################################################
  3960. sable_enabled: false
  3961. sable_identifier: matrix-client-sable
  3962. sable_uid: "{{ matrix_user_uid }}"
  3963. sable_gid: "{{ matrix_user_gid }}"
  3964. sable_container_image_registry_prefix: "{{ 'localhost/' if sable_container_image_self_build else sable_container_image_registry_prefix_upstream }}"
  3965. sable_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else sable_container_image_registry_prefix_upstream_default }}"
  3966. sable_container_image_self_build: "{{ matrix_architecture not in ['arm64', 'amd64'] }}"
  3967. sable_container_http_host_bind_port: "{{ (matrix_playbook_service_host_bind_interface_prefix ~ '8771') if matrix_playbook_service_host_bind_interface_prefix else '' }}"
  3968. sable_container_network: "{{ matrix_addons_container_network }}"
  3969. sable_container_additional_networks: "{{ [matrix_playbook_reverse_proxyable_services_additional_network] if (sable_container_labels_traefik_enabled and matrix_playbook_reverse_proxyable_services_additional_network) else [] }}"
  3970. sable_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  3971. sable_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  3972. sable_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  3973. sable_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  3974. sable_container_labels_traefik_compression_middleware_enabled: "{{ matrix_playbook_reverse_proxy_traefik_middleware_compression_enabled }}"
  3975. sable_container_labels_traefik_compression_middleware_name: "{{ matrix_playbook_reverse_proxy_traefik_middleware_compression_name if matrix_playbook_reverse_proxy_traefik_middleware_compression_enabled else '' }}"
  3976. sable_scheme: "{{ 'https' if matrix_playbook_ssl_enabled else 'http' }}"
  3977. sable_default_hs_url: "{{ matrix_homeserver_url }}"
  3978. sable_self_check_validate_certificates: "{{ matrix_playbook_ssl_enabled }}"
  3979. sable_base_path: "{{ matrix_base_data_path }}/client-sable"
  3980. sable_hostname: "{{ matrix_server_fqn_sable }}"
  3981. ######################################################################
  3982. #
  3983. # /sable
  3984. #
  3985. ######################################################################
  3986. ######################################################################
  3987. #
  3988. # matrix-client-schildichat
  3989. #
  3990. ######################################################################
  3991. matrix_client_schildichat_enabled: false
  3992. matrix_client_schildichat_scheme: "{{ 'https' if matrix_playbook_ssl_enabled else 'http' }}"
  3993. matrix_client_schildichat_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_client_schildichat_container_image_registry_prefix_upstream_default }}"
  3994. matrix_client_schildichat_container_image_self_build: "{{ matrix_architecture not in ['arm64', 'amd64'] }}"
  3995. matrix_client_schildichat_container_http_host_bind_port: "{{ (matrix_playbook_service_host_bind_interface_prefix ~ '8765') if matrix_playbook_service_host_bind_interface_prefix else '' }}"
  3996. matrix_client_schildichat_container_network: "{{ matrix_addons_container_network }}"
  3997. matrix_client_schildichat_container_additional_networks: "{{ [matrix_playbook_reverse_proxyable_services_additional_network] if (matrix_client_schildichat_container_labels_traefik_enabled and matrix_playbook_reverse_proxyable_services_additional_network) else [] }}"
  3998. matrix_client_schildichat_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  3999. matrix_client_schildichat_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  4000. matrix_client_schildichat_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  4001. matrix_client_schildichat_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  4002. matrix_client_schildichat_default_hs_url: "{{ matrix_homeserver_url }}"
  4003. matrix_client_schildichat_default_is_url: "{{ matrix_identity_server_url }}"
  4004. matrix_client_schildichat_self_check_validate_certificates: "{{ matrix_playbook_ssl_enabled }}"
  4005. matrix_client_schildichat_registration_enabled: "{{ matrix_synapse_enable_registration }}"
  4006. matrix_client_schildichat_enable_presence_by_hs_url: |-
  4007. {{
  4008. none
  4009. if matrix_synapse_presence_enabled
  4010. else {matrix_client_schildichat_default_hs_url: false}
  4011. }}
  4012. matrix_client_schildichat_jitsi_preferred_domain: "{{ matrix_server_fqn_jitsi if jitsi_enabled else '' }}"
  4013. ######################################################################
  4014. #
  4015. # /matrix-client-schildichat
  4016. #
  4017. ######################################################################
  4018. ######################################################################
  4019. #
  4020. # matrix-client-fluffychat
  4021. #
  4022. ######################################################################
  4023. matrix_client_fluffychat_enabled: false
  4024. matrix_client_fluffychat_scheme: "{{ 'https' if matrix_playbook_ssl_enabled else 'http' }}"
  4025. matrix_client_fluffychat_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_client_fluffychat_container_image_registry_prefix_upstream_default }}"
  4026. matrix_client_fluffychat_container_image_self_build: "{{ matrix_architecture not in ['arm64', 'amd64'] }}"
  4027. matrix_client_fluffychat_container_http_host_bind_port: "{{ (matrix_playbook_service_host_bind_interface_prefix ~ '8770') if matrix_playbook_service_host_bind_interface_prefix else '' }}"
  4028. matrix_client_fluffychat_container_network: "{{ matrix_addons_container_network }}"
  4029. matrix_client_fluffychat_container_additional_networks_auto: "{{ [matrix_playbook_reverse_proxyable_services_additional_network] if (matrix_client_fluffychat_container_labels_traefik_enabled and matrix_playbook_reverse_proxyable_services_additional_network) else [] }}"
  4030. matrix_client_fluffychat_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  4031. matrix_client_fluffychat_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  4032. matrix_client_fluffychat_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  4033. matrix_client_fluffychat_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  4034. matrix_client_fluffychat_self_check_validate_certificates: "{{ matrix_playbook_ssl_enabled }}"
  4035. matrix_client_fluffychat_config_defaultHomeserver: "{{ matrix_domain }}"
  4036. ######################################################################
  4037. #
  4038. # /matrix-client-fluffychat
  4039. #
  4040. ######################################################################
  4041. ######################################################################
  4042. #
  4043. # matrix-synapse
  4044. #
  4045. ######################################################################
  4046. matrix_synapse_enabled: "{{ matrix_homeserver_implementation == 'synapse' }}"
  4047. matrix_synapse_username: "{{ matrix_user_name }}"
  4048. matrix_synapse_uid: "{{ matrix_user_uid }}"
  4049. matrix_synapse_gid: "{{ matrix_user_gid }}"
  4050. matrix_synapse_federation_enabled: "{{ matrix_homeserver_federation_enabled }}"
  4051. matrix_synapse_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_synapse_container_image_registry_prefix_upstream_default }}"
  4052. matrix_s3_goofys_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_s3_goofys_container_image_registry_prefix_upstream_default }}"
  4053. matrix_synapse_rust_synapse_compress_state_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_synapse_rust_synapse_compress_state_container_image_registry_prefix_upstream_default }}"
  4054. matrix_synapse_container_image_self_build: "{{ matrix_architecture not in ['arm64', 'amd64'] }}"
  4055. # For exposing the Matrix Federation API's TLS port (HTTPS) to the internet on all network interfaces.
  4056. matrix_synapse_container_federation_api_tls_host_bind_port: "{{ matrix_federation_public_port if (matrix_synapse_federation_enabled and matrix_synapse_tls_federation_listener_enabled) else '' }}"
  4057. #
  4058. # For exposing the Synapse Metrics API's port (plain HTTP) to the local host.
  4059. matrix_synapse_container_metrics_api_host_bind_port: "{{ (matrix_playbook_service_host_bind_interface_prefix ~ '9100') if matrix_synapse_metrics_enabled and matrix_playbook_service_host_bind_interface_prefix else '' }}"
  4060. #
  4061. # For exposing the Synapse Manhole port (plain HTTP) to the local host.
  4062. matrix_synapse_container_manhole_api_host_bind_port: "{{ (matrix_playbook_service_host_bind_interface_prefix ~ '9000') if matrix_synapse_metrics_enabled and matrix_playbook_service_host_bind_interface_prefix else '' }}"
  4063. matrix_synapse_container_network: "{{ matrix_homeserver_container_network }}"
  4064. matrix_synapse_container_additional_networks_auto: |
  4065. {{
  4066. (
  4067. ([matrix_playbook_reverse_proxyable_services_additional_network] if matrix_synapse_container_labels_traefik_enabled and matrix_playbook_reverse_proxyable_services_additional_network else [])
  4068. +
  4069. ([postgres_container_network] if (matrix_playbook_synapse_uses_managed_postgres and (not matrix_synapse_database_socket_enabled) and postgres_container_network != matrix_synapse_container_network) else [])
  4070. +
  4071. ([valkey_container_network] if (matrix_playbook_synapse_uses_managed_valkey and (not matrix_synapse_redis_path_enabled) and valkey_container_network != matrix_synapse_container_network) else [])
  4072. +
  4073. ([exim_relay_container_network] if (exim_relay_enabled and matrix_synapse_email_enabled and matrix_synapse_email_smtp_host == exim_relay_identifier and matrix_synapse_container_network != exim_relay_container_network) else [])
  4074. +
  4075. ([matrix_bot_draupnir_container_network] if (matrix_synapse_ext_synapse_http_antispam_enabled and matrix_synapse_ext_synapse_http_antispam_config_base_url == matrix_bot_draupnir_synapse_http_antispam_config_base_url and matrix_bot_draupnir_container_network != matrix_synapse_container_network) else [])
  4076. ) | unique
  4077. }}
  4078. matrix_synapse_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  4079. matrix_synapse_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  4080. matrix_synapse_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  4081. matrix_synapse_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  4082. matrix_synapse_container_labels_traefik_hostname: "{{ matrix_server_fqn_matrix }}"
  4083. matrix_synapse_container_labels_traefik_compression_middleware_enabled: "{{ matrix_playbook_reverse_proxy_traefik_middleware_compression_enabled }}"
  4084. matrix_synapse_container_labels_traefik_compression_middleware_name: "{{ matrix_playbook_reverse_proxy_traefik_middleware_compression_name if matrix_playbook_reverse_proxy_traefik_middleware_compression_enabled else '' }}"
  4085. matrix_synapse_container_labels_matrix_labels_enabled: "{{ not matrix_synapse_workers_enabled }}"
  4086. matrix_synapse_container_labels_public_client_root_redirection_enabled: "{{ matrix_synapse_container_labels_public_client_root_redirection_url != '' }}"
  4087. matrix_synapse_container_labels_public_client_root_redirection_url: "{{ matrix_playbook_public_client_root_redirection_url }}"
  4088. matrix_synapse_container_labels_public_client_synapse_admin_api_enabled: "{{ matrix_ketesa_enabled or matrix_element_admin_enabled }}"
  4089. matrix_synapse_container_labels_internal_client_synapse_admin_api_enabled: "{{ (matrix_bot_draupnir_enabled and matrix_bot_draupnir_admin_api_enabled) }}"
  4090. matrix_synapse_container_labels_internal_client_synapse_admin_api_traefik_entrypoints: "{{ matrix_playbook_internal_matrix_client_api_traefik_entrypoint_name }}"
  4091. matrix_synapse_container_labels_public_federation_api_traefik_hostname: "{{ matrix_server_fqn_matrix_federation }}"
  4092. matrix_synapse_container_labels_public_federation_api_traefik_entrypoints: "{{ matrix_federation_traefik_entrypoint_name }}"
  4093. matrix_synapse_container_labels_public_federation_api_traefik_tls: "{{ matrix_federation_traefik_entrypoint_tls }}"
  4094. matrix_synapse_container_labels_public_metrics_middleware_basic_auth_enabled: "{{ matrix_metrics_exposure_http_basic_auth_enabled }}"
  4095. matrix_synapse_container_labels_public_metrics_middleware_basic_auth_users: "{{ matrix_metrics_exposure_http_basic_auth_users }}"
  4096. matrix_synapse_container_labels_internal_client_api_enabled: "{{ matrix_playbook_internal_matrix_client_api_traefik_entrypoint_enabled }}"
  4097. matrix_synapse_container_labels_internal_client_api_traefik_entrypoints: "{{ matrix_playbook_internal_matrix_client_api_traefik_entrypoint_name }}"
  4098. # Playbook-level Synapse topology wiring helpers.
  4099. matrix_playbook_synapse_uses_managed_postgres: "{{ postgres_enabled }}"
  4100. matrix_playbook_synapse_uses_managed_valkey: "{{ matrix_synapse_redis_enabled and valkey_enabled }}"
  4101. matrix_playbook_synapse_auto_compressor_uses_managed_postgres: "{{ matrix_playbook_synapse_uses_managed_postgres and matrix_synapse_auto_compressor_database_hostname == matrix_synapse_database_host }}"
  4102. # For exposing the Synapse worker (and metrics) ports to the local host.
  4103. matrix_synapse_workers_container_host_bind_address: "{{ matrix_playbook_service_host_bind_interface_prefix[0:-1] if (matrix_synapse_workers_enabled and matrix_playbook_service_host_bind_interface_prefix) else '' }}"
  4104. matrix_synapse_database_host: "{{ postgres_connection_hostname if matrix_playbook_synapse_uses_managed_postgres else '' }}"
  4105. matrix_synapse_database_password: "{{ (matrix_homeserver_generic_secret_key + ':synapse.db') | hash('sha512') | to_uuid }}"
  4106. # unix socket connection
  4107. matrix_synapse_database_socket_enabled: "{{ matrix_playbook_synapse_uses_managed_postgres and postgres_container_unix_socket_enabled }}"
  4108. # path to the Postgres socket's parent dir inside the Synapse container
  4109. matrix_synapse_database_socket_path: "{{ '/run-postgres' if matrix_playbook_synapse_uses_managed_postgres else '' }}"
  4110. # path to the Postgres socket on the host, using Postgres
  4111. matrix_synapse_database_socket_path_host: "{{ postgres_run_path if matrix_playbook_synapse_uses_managed_postgres else '' }}"
  4112. matrix_synapse_macaroon_secret_key: "{{ (matrix_homeserver_generic_secret_key + ':synapse.mac') | hash('sha512') | to_uuid }}"
  4113. # We do not enable TLS in Synapse by default, since it's handled by Traefik.
  4114. matrix_synapse_tls_federation_listener_enabled: false
  4115. matrix_synapse_tls_certificate_path: ~
  4116. matrix_synapse_tls_private_key_path: ~
  4117. matrix_synapse_federation_port_openid_resource_required: "{{ not matrix_synapse_federation_enabled and (matrix_user_verification_service_enabled or matrix_livekit_jwt_service_enabled) }}"
  4118. matrix_synapse_metrics_enabled: "{{ prometheus_enabled or matrix_metrics_exposure_enabled }}"
  4119. matrix_synapse_metrics_proxying_enabled: "{{ matrix_synapse_metrics_enabled and matrix_metrics_exposure_enabled }}"
  4120. matrix_synapse_metrics_proxying_hostname: "{{ matrix_metrics_exposure_hostname }}"
  4121. matrix_synapse_metrics_proxying_path_prefix: "{{ matrix_metrics_exposure_path_prefix }}/synapse"
  4122. matrix_synapse_email_enabled: "{{ exim_relay_enabled }}"
  4123. matrix_synapse_email_smtp_host: "{{ exim_relay_identifier }}"
  4124. matrix_synapse_email_smtp_port: 8025
  4125. matrix_synapse_email_notif_from: "Matrix <{{ exim_relay_sender_address }}>"
  4126. matrix_synapse_turn_uris: "{{ coturn_turn_uris if coturn_enabled else [] }}"
  4127. matrix_synapse_turn_shared_secret: "{{ coturn_turn_static_auth_secret if (coturn_enabled and coturn_authentication_method == 'auth-secret') else '' }}"
  4128. matrix_synapse_turn_username: "{{ coturn_lt_cred_mech_username if (coturn_enabled and coturn_authentication_method == 'lt-cred-mech') else '' }}"
  4129. matrix_synapse_turn_password: "{{ coturn_lt_cred_mech_password if (coturn_enabled and coturn_authentication_method == 'lt-cred-mech') else '' }}"
  4130. matrix_synapse_self_check_validate_certificates: "{{ matrix_playbook_ssl_enabled }}"
  4131. matrix_synapse_systemd_required_services_list_auto: |
  4132. {{
  4133. ([postgres_identifier ~ '.service'] if (matrix_playbook_synapse_uses_managed_postgres and postgres_container_network != matrix_synapse_container_network) else [])
  4134. +
  4135. ([valkey_identifier ~ '.service'] if matrix_playbook_synapse_uses_managed_valkey else [])
  4136. +
  4137. (['matrix-goofys.service'] if matrix_s3_media_store_enabled else [])
  4138. +
  4139. (['matrix-authentication-service.service'] if (matrix_synapse_matrix_authentication_service_enabled and matrix_synapse_matrix_authentication_service_endpoint == matrix_authentication_service_http_base_container_url) else [])
  4140. }}
  4141. matrix_synapse_systemd_wanted_services_list_auto: |
  4142. {{
  4143. ([coturn_identifier ~ '.service'] if coturn_enabled else [])
  4144. +
  4145. ([exim_relay_identifier ~ '.service'] if exim_relay_enabled else [])
  4146. }}
  4147. # Synapse workers (used for parallel load-scaling) need Redis for IPC.
  4148. matrix_synapse_redis_enabled: "{{ valkey_enabled }}"
  4149. matrix_synapse_redis_host: "{{ valkey_identifier if matrix_playbook_synapse_uses_managed_valkey else '' }}"
  4150. matrix_synapse_redis_password: "{{ valkey_connection_password if matrix_playbook_synapse_uses_managed_valkey else '' }}"
  4151. # unix socket connection
  4152. matrix_synapse_redis_path_enabled: "{{ matrix_playbook_synapse_uses_managed_valkey }}"
  4153. # path to the Redis socket's parent dir inside the Synapse container
  4154. matrix_synapse_redis_path: "{{ '/run-valkey' if matrix_playbook_synapse_uses_managed_valkey else '' }}"
  4155. # redis socket filename
  4156. matrix_synapse_redis_path_socket: "{{ '/valkey.sock' if matrix_playbook_synapse_uses_managed_valkey else '' }}"
  4157. # path to the Redis socket on the host, using Valkey
  4158. matrix_synapse_redis_path_host: "{{ valkey_run_path if matrix_playbook_synapse_uses_managed_valkey else '' }}"
  4159. matrix_synapse_container_extra_arguments_auto: "{{ matrix_homeserver_container_extra_arguments_auto }}"
  4160. matrix_synapse_app_service_config_files_auto: "{{ matrix_homeserver_app_service_config_files_auto }}"
  4161. # Disable creation of media repository Synapse worker when using media-repo
  4162. matrix_synapse_ext_media_repo_enabled: "{{ matrix_media_repo_enabled }}"
  4163. # The synapse-http-antispam module reports to a single consumer, so at most one of
  4164. # Draupnir and Meowlnir may claim it. Each role's validation fails the run if both do.
  4165. matrix_synapse_ext_synapse_http_antispam_enabled: "{{ matrix_bot_draupnir_config_web_synapseHTTPAntispam_enabled or matrix_bot_meowlnir_synapse_http_antispam_enabled }}"
  4166. matrix_synapse_ext_synapse_http_antispam_config_base_url: "{{ matrix_bot_draupnir_synapse_http_antispam_config_base_url if matrix_bot_draupnir_config_web_synapseHTTPAntispam_enabled else (matrix_bot_meowlnir_synapse_http_antispam_config_base_url if matrix_bot_meowlnir_synapse_http_antispam_enabled else '') }}"
  4167. matrix_synapse_ext_synapse_http_antispam_config_authorization: "{{ matrix_bot_draupnir_config_web_synapseHTTPAntispam_authorization if matrix_bot_draupnir_config_web_synapseHTTPAntispam_enabled else (matrix_bot_meowlnir_config_antispam_secret if matrix_bot_meowlnir_synapse_http_antispam_enabled else '') }}"
  4168. matrix_synapse_ext_synapse_http_antispam_config_enabled_callbacks: "{{ matrix_bot_draupnir_synapse_http_antispam_config_enabled_callbacks if matrix_bot_draupnir_config_web_synapseHTTPAntispam_enabled else (matrix_bot_meowlnir_synapse_http_antispam_config_enabled_callbacks if matrix_bot_meowlnir_synapse_http_antispam_enabled else []) }}"
  4169. matrix_synapse_ext_synapse_http_antispam_config_fail_open: "{{ matrix_bot_draupnir_synapse_http_antispam_config_fail_open if matrix_bot_draupnir_config_web_synapseHTTPAntispam_enabled else (matrix_bot_meowlnir_synapse_http_antispam_config_fail_open if matrix_bot_meowlnir_synapse_http_antispam_enabled else {}) }}"
  4170. matrix_synapse_ext_synapse_http_antispam_config_async: "{{ matrix_bot_draupnir_synapse_http_antispam_config_async if matrix_bot_draupnir_config_web_synapseHTTPAntispam_enabled else (matrix_bot_meowlnir_synapse_http_antispam_config_async if matrix_bot_meowlnir_synapse_http_antispam_enabled else {}) }}"
  4171. # Meowlnir's bots and Hookshot need these to support end-to-end encryption.
  4172. # Synapse only sends the extra data to appservices which ask for it in their registration file,
  4173. # so enabling these affects no other component.
  4174. matrix_synapse_experimental_features_msc2409_to_device_messages_enabled: |-
  4175. {{
  4176. (matrix_bot_meowlnir_enabled and matrix_bot_meowlnir_config_encryption_enable)
  4177. or
  4178. (matrix_bridge_hookshot_enabled and matrix_bridge_hookshot_encryption_enabled)
  4179. }}
  4180. matrix_synapse_experimental_features_msc3202_transaction_extensions_enabled: |-
  4181. {{
  4182. (matrix_bot_meowlnir_enabled and matrix_bot_meowlnir_config_encryption_enable)
  4183. or
  4184. (matrix_bridge_hookshot_enabled and matrix_bridge_hookshot_encryption_enabled)
  4185. }}
  4186. # Enable Synapse statistics reporting when using synapse-usage-exporter
  4187. matrix_synapse_report_stats: "{{ matrix_synapse_usage_exporter_enabled }}"
  4188. matrix_synapse_report_stats_endpoint: "{{ (('http://' + matrix_synapse_usage_exporter_identifier + ':' + matrix_synapse_usage_exporter_container_port | string + '/report-usage-stats/push') if matrix_synapse_usage_exporter_enabled else matrix_synapse_report_stats_endpoint_default) }}"
  4189. matrix_synapse_matrix_authentication_service_enabled: "{{ matrix_authentication_service_enabled }}"
  4190. matrix_synapse_matrix_authentication_service_endpoint: "{{ matrix_authentication_service_http_base_container_url if matrix_authentication_service_enabled else '' }}"
  4191. matrix_synapse_matrix_authentication_service_secret: "{{ matrix_authentication_service_config_matrix_secret if matrix_authentication_service_enabled else '' }}"
  4192. matrix_synapse_experimental_features_msc4108_enabled: "{{ matrix_authentication_service_enabled and not matrix_authentication_service_migration_in_progress }}"
  4193. matrix_synapse_delayed_events_enabled: "{{ matrix_rtc_enabled }}"
  4194. matrix_synapse_matrix_rtc_transports_livekit_url: "{{ matrix_livekit_jwt_service_public_url if matrix_livekit_jwt_service_enabled else '' }}"
  4195. matrix_synapse_experimental_features_msc4222_enabled: "{{ matrix_rtc_enabled }}"
  4196. matrix_synapse_experimental_features_msc4354_enabled: "{{ matrix_rtc_enabled }}"
  4197. # Disable password authentication when delegating authentication to Matrix Authentication Service.
  4198. # Unless this is done, Synapse fails on startup with:
  4199. # > Error in configuration at 'password_config.enabled':
  4200. # > Password auth cannot be enabled when OAuth delegation is enabled
  4201. matrix_synapse_password_config_enabled: "{{ not matrix_synapse_matrix_authentication_service_enabled }}"
  4202. matrix_synapse_register_user_script_matrix_authentication_service_path: "{{ matrix_authentication_service_bin_path }}/register-user"
  4203. # After Synapse's systemd health check passes, the reverse proxy still needs time to
  4204. # discover the container and register its routes. We derive this delay from Traefik's
  4205. # providers.providersThrottleDuration setting (+1s grace for our healthcheck polling interval),
  4206. # so it stays in sync automatically.
  4207. matrix_synapse_systemd_service_post_start_delay_seconds: "{{ (traefik_config_providers_providersThrottleDuration_seconds | int + 1) if matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] else 0 }}"
  4208. matrix_synapse_reverse_proxy_companion_systemd_required_services_list_default: "{{ [devture_systemd_docker_base_docker_service_name] if devture_systemd_docker_base_docker_service_name else [] }}"
  4209. matrix_synapse_reverse_proxy_companion_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_synapse_reverse_proxy_companion_container_image_registry_prefix_upstream_default }}"
  4210. matrix_synapse_reverse_proxy_companion_container_client_api_host_bind_port: "{{ (matrix_playbook_service_host_bind_interface_prefix ~ '8008') if matrix_playbook_service_host_bind_interface_prefix else '' }}"
  4211. matrix_synapse_reverse_proxy_companion_container_federation_api_host_bind_port: "{{ (matrix_playbook_service_host_bind_interface_prefix ~ '8048') if matrix_playbook_service_host_bind_interface_prefix else '' }}"
  4212. matrix_synapse_reverse_proxy_companion_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  4213. matrix_synapse_reverse_proxy_companion_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  4214. matrix_synapse_reverse_proxy_companion_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  4215. matrix_synapse_reverse_proxy_companion_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  4216. matrix_synapse_reverse_proxy_companion_container_labels_traefik_hostname: "{{ matrix_server_fqn_matrix }}"
  4217. matrix_synapse_reverse_proxy_companion_container_labels_traefik_compression_middleware_enabled: "{{ matrix_playbook_reverse_proxy_traefik_middleware_compression_enabled }}"
  4218. matrix_synapse_reverse_proxy_companion_container_labels_traefik_compression_middleware_name: "{{ matrix_playbook_reverse_proxy_traefik_middleware_compression_name if matrix_playbook_reverse_proxy_traefik_middleware_compression_enabled else '' }}"
  4219. matrix_synapse_reverse_proxy_companion_container_labels_internal_client_synapse_admin_api_traefik_entrypoints: "{{ matrix_playbook_internal_matrix_client_api_traefik_entrypoint_name }}"
  4220. matrix_synapse_reverse_proxy_companion_access_log_syslog_integration_enabled: "{{ prometheus_nginxlog_exporter_enabled }}"
  4221. matrix_synapse_reverse_proxy_companion_access_log_syslog_integration_server_port: "{{ (prometheus_nginxlog_exporter_identifier | string +':'+ prometheus_nginxlog_exporter_container_syslog_port | string) | default('') }}"
  4222. matrix_synapse_reverse_proxy_companion_container_additional_networks_auto: |
  4223. {{
  4224. (
  4225. ([matrix_playbook_reverse_proxyable_services_additional_network] if matrix_synapse_reverse_proxy_companion_container_labels_traefik_enabled and matrix_playbook_reverse_proxyable_services_additional_network else [])
  4226. +
  4227. ([prometheus_nginxlog_exporter_container_network] if (prometheus_nginxlog_exporter_enabled and prometheus_nginxlog_exporter_container_network != matrix_synapse_reverse_proxy_companion_container_network) else [])
  4228. +
  4229. ([] if matrix_homeserver_container_network in ['', matrix_synapse_reverse_proxy_companion_container_network] else [matrix_homeserver_container_network])
  4230. ) | unique
  4231. }}
  4232. ######################################################################
  4233. #
  4234. # /matrix-synapse
  4235. #
  4236. ######################################################################
  4237. ######################################################################
  4238. #
  4239. # matrix-synapse-auto-compressor
  4240. #
  4241. ######################################################################
  4242. # Not enabled by default, for now
  4243. matrix_synapse_auto_compressor_enabled: false
  4244. matrix_synapse_auto_compressor_uid: "{{ matrix_user_uid }}"
  4245. matrix_synapse_auto_compressor_gid: "{{ matrix_user_gid }}"
  4246. matrix_synapse_auto_compressor_postgres_image: "{{ postgres_container_image_to_use }}"
  4247. matrix_synapse_auto_compressor_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_synapse_auto_compressor_container_image_registry_prefix_upstream_default }}"
  4248. matrix_synapse_auto_compressor_container_image_self_build: "{{ matrix_architecture not in ['arm64', 'amd64'] }}"
  4249. matrix_synapse_auto_compressor_container_network: "{{ (postgres_container_network if matrix_playbook_synapse_auto_compressor_uses_managed_postgres else 'matrix-synapse-auto-compressor') }}"
  4250. matrix_synapse_auto_compressor_database_username: "{{ matrix_synapse_database_user if matrix_synapse_enabled else '' }}"
  4251. matrix_synapse_auto_compressor_database_password: "{{ matrix_synapse_database_password if matrix_synapse_enabled else '' }}"
  4252. matrix_synapse_auto_compressor_database_hostname: "{{ matrix_synapse_database_host if matrix_synapse_enabled else '' }}"
  4253. matrix_synapse_auto_compressor_database_port: "{{ matrix_synapse_database_port if matrix_synapse_enabled else '5432' }}"
  4254. matrix_synapse_auto_compressor_database_name: "{{ matrix_synapse_database_database if matrix_synapse_enabled else '' }}"
  4255. matrix_synapse_auto_compressor_systemd_required_services_list_auto: |
  4256. {{
  4257. ([postgres_identifier ~ '.service'] if matrix_playbook_synapse_auto_compressor_uses_managed_postgres else [])
  4258. }}
  4259. ######################################################################
  4260. #
  4261. # /matrix-synapse-auto-compressor
  4262. #
  4263. ######################################################################
  4264. ######################################################################
  4265. #
  4266. # matrix-ketesa
  4267. #
  4268. ######################################################################
  4269. matrix_ketesa_enabled: false
  4270. matrix_ketesa_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_ketesa_container_image_registry_prefix_upstream_default }}"
  4271. matrix_ketesa_container_uid: "{{ matrix_user_uid }}"
  4272. matrix_ketesa_container_gid: "{{ matrix_user_gid }}"
  4273. matrix_ketesa_container_http_host_bind_port: "{{ (matrix_playbook_service_host_bind_interface_prefix ~ '8766') if matrix_playbook_service_host_bind_interface_prefix else '' }}"
  4274. matrix_ketesa_container_image_self_build: "{{ matrix_architecture not in ['arm64', 'amd64'] }}"
  4275. matrix_ketesa_container_network: "{{ matrix_addons_container_network }}"
  4276. matrix_ketesa_container_additional_networks: "{{ [matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network else [] }}"
  4277. matrix_ketesa_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  4278. matrix_ketesa_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  4279. matrix_ketesa_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  4280. matrix_ketesa_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  4281. matrix_ketesa_config_externalAuthProvider: "{{ matrix_authentication_service_enabled | default(false) or matrix_synapse_ext_password_provider_ldap_enabled | default(false) }}"
  4282. matrix_ketesa_config_asManagedUsers_auto: |
  4283. {{
  4284. ([
  4285. '^@'+(matrix_alertmanager_receiver_config_matrix_user_id_localpart | default('') | regex_escape) +':'+(matrix_domain | regex_escape)+'$',
  4286. ] if matrix_alertmanager_receiver_enabled else [])
  4287. +
  4288. ([
  4289. '^@'+(matrix_appservice_draupnir_for_all_user_prefix | default('') | regex_escape) +'_[a-zA-Z0-9]+:'+(matrix_domain | regex_escape)+'$',
  4290. ] if matrix_appservice_draupnir_for_all_enabled else [])
  4291. +
  4292. ([
  4293. matrix_bot_meowlnir_user_regex,
  4294. matrix_bot_meowlnir_appservice_sender_regex,
  4295. ] if matrix_bot_meowlnir_enabled else [])
  4296. +
  4297. ([
  4298. '^@'+(matrix_bot_baibot_config_user_mxid_localpart | default('') | regex_escape) +':'+(matrix_domain | regex_escape)+'$',
  4299. ] if matrix_bot_baibot_enabled else [])
  4300. +
  4301. ([
  4302. '^@'+(matrix_bot_buscarron_login | default('') | regex_escape) +':'+(matrix_domain | regex_escape)+'$',
  4303. ] if matrix_bot_buscarron_enabled else [])
  4304. +
  4305. ([
  4306. '^@'+(matrix_bot_draupnir_login | default('') | regex_escape) +':'+(matrix_domain | regex_escape)+'$',
  4307. ] if matrix_bot_draupnir_enabled else [])
  4308. +
  4309. ([
  4310. '^@'+(matrix_bot_honoroit_login | default('') | regex_escape) +':'+(matrix_domain | regex_escape)+'$',
  4311. ] if matrix_bot_honoroit_enabled else [])
  4312. +
  4313. ([
  4314. '^@'+(matrix_bot_matrix_reminder_bot_matrix_user_id_localpart | default('') | regex_escape) +':'+(matrix_domain | regex_escape)+'$',
  4315. ] if matrix_bot_matrix_reminder_bot_enabled else [])
  4316. +
  4317. ([
  4318. '^@'+(matrix_bot_maubot_login | default('') | regex_escape) +':'+(matrix_domain | regex_escape)+'$',
  4319. ] if matrix_bot_maubot_enabled else [])
  4320. +
  4321. ([
  4322. '^@'+(matrix_bridge_postmoogle_login | default('') | regex_escape) +':'+(matrix_domain | regex_escape)+'$',
  4323. ] if matrix_bridge_postmoogle_enabled else [])
  4324. +
  4325. ([
  4326. '^@_discord_[a-zA-Z0-9]+:'+(matrix_domain | regex_escape)+'$',
  4327. ] if matrix_bridge_appservice_discord_enabled else [])
  4328. +
  4329. ([
  4330. '^@'+(matrix_bridge_beeper_linkedin_appservice_bot_username | default('') | regex_escape)+':'+(matrix_domain | regex_escape)+'$',
  4331. '^@linkedin_[a-zA-Z0-9]+:'+(matrix_domain | regex_escape)+'$',
  4332. ] if matrix_bridge_beeper_linkedin_enabled else [])
  4333. +
  4334. ([
  4335. '^@'+(matrix_bridge_beeper_line_appservice_bot_username | default('') | regex_escape)+':'+(matrix_domain | regex_escape)+'$',
  4336. '^@line_[a-zA-Z0-9]+:'+(matrix_domain | regex_escape)+'$',
  4337. ] if matrix_bridge_beeper_line_enabled else [])
  4338. +
  4339. ([
  4340. '^@heisenbridge:'+(matrix_domain | regex_escape)+'$',
  4341. '^@hbirc_[a-zA-Z0-9]+:'+(matrix_domain | regex_escape)+'$',
  4342. ] if matrix_bridge_heisenbridge_enabled else [])
  4343. +
  4344. ([
  4345. '^@hookshot:'+(matrix_domain | regex_escape)+'$',
  4346. '^@_github_[a-zA-Z0-9]+:'+(matrix_domain | regex_escape)+'$',
  4347. '^@_gitlab_[a-zA-Z0-9]+:'+(matrix_domain | regex_escape)+'$',
  4348. '^@_jira_[a-zA-Z0-9]+:'+(matrix_domain | regex_escape)+'$',
  4349. '^@'+(matrix_bridge_hookshot_generic_userIdPrefix | default('') | regex_escape)+'[a-zA-Z0-9]+:'+(matrix_domain | regex_escape)+'$',
  4350. ] if matrix_bridge_hookshot_enabled else [])
  4351. +
  4352. ([
  4353. '^@'+(matrix_bridge_mautrix_bluesky_appservice_bot_username | default('') | regex_escape)+':'+(matrix_domain | regex_escape)+'$',
  4354. '^@bluesky_[a-zA-Z0-9]+:'+(matrix_domain | regex_escape)+'$',
  4355. ] if matrix_bridge_mautrix_bluesky_enabled else [])
  4356. +
  4357. ([
  4358. '^@'+(matrix_bridge_rustpush_appservice_bot_username | default('') | regex_escape)+':'+(matrix_domain | regex_escape)+'$',
  4359. '^@rustpush_[a-zA-Z0-9_.+-]+:'+(matrix_domain | regex_escape)+'$',
  4360. ] if matrix_bridge_rustpush_enabled else [])
  4361. +
  4362. ([
  4363. '^@'+(matrix_bridge_mautrix_discord_appservice_bot_username | default('') | regex_escape)+':'+(matrix_domain | regex_escape)+'$',
  4364. '^@discord_[0-9]+:'+(matrix_domain | regex_escape)+'$',
  4365. ] if matrix_bridge_mautrix_discord_enabled else [])
  4366. +
  4367. ([
  4368. '^@'+(matrix_bridge_mautrix_gmessages_appservice_bot_username | default('') | regex_escape)+':'+(matrix_domain | regex_escape)+'$',
  4369. '^@gmessages_[a-zA-Z0-9]+:'+(matrix_domain | regex_escape)+'$',
  4370. ] if matrix_bridge_mautrix_gmessages_enabled else [])
  4371. +
  4372. ([
  4373. '^@'+(matrix_bridge_mautrix_gvoice_appservice_bot_username | default('') | regex_escape)+':'+(matrix_domain | regex_escape)+'$',
  4374. '^@gvoice_[a-zA-Z0-9]+:'+(matrix_domain | regex_escape)+'$',
  4375. ] if matrix_bridge_mautrix_gvoice_enabled else [])
  4376. +
  4377. ([
  4378. '^@'+(matrix_bridge_mautrix_linkedin_appservice_bot_username | default('') | regex_escape)+':'+(matrix_domain | regex_escape)+'$',
  4379. '^@linkedin_[a-zA-Z0-9]+:'+(matrix_domain | regex_escape)+'$',
  4380. ] if matrix_bridge_mautrix_linkedin_enabled else [])
  4381. +
  4382. ([
  4383. '^@'+(matrix_bridge_mautrix_googlechat_appservice_bot_username | default('') | regex_escape)+':'+(matrix_domain | regex_escape)+'$',
  4384. '^@googlechat_[a-zA-Z0-9]+:'+(matrix_domain | regex_escape)+'$',
  4385. ] if matrix_bridge_mautrix_googlechat_enabled else [])
  4386. +
  4387. ([
  4388. '^@'+(matrix_bridge_mautrix_meta_instagram_appservice_username | default('') | regex_escape)+':'+(matrix_domain | regex_escape)+'$',
  4389. '^@'+(matrix_bridge_mautrix_meta_instagram_bridge_username_prefix | default('') | regex_escape)+'[a-zA-Z0-9]+:'+(matrix_domain | regex_escape)+'$',
  4390. ] if matrix_bridge_mautrix_meta_instagram_enabled else [])
  4391. +
  4392. ([
  4393. '^@'+(matrix_bridge_mautrix_meta_messenger_appservice_username | default('') | regex_escape)+':'+(matrix_domain | regex_escape)+'$',
  4394. '^@'+(matrix_bridge_mautrix_meta_messenger_bridge_username_prefix | default('') | regex_escape)+'[a-zA-Z0-9]+:'+(matrix_domain | regex_escape)+'$',
  4395. ] if matrix_bridge_mautrix_meta_messenger_enabled else [])
  4396. +
  4397. ([
  4398. '^@'+(matrix_bridge_mautrix_signal_appservice_bot_username | default('') | regex_escape)+':'+(matrix_domain | regex_escape)+'$',
  4399. '^@signal_[a-zA-Z0-9]+:'+(matrix_domain | regex_escape)+'$',
  4400. ] if matrix_bridge_mautrix_signal_enabled else [])
  4401. +
  4402. ([
  4403. '^@'+(matrix_bridge_mautrix_slack_appservice_bot_username | default('') | regex_escape)+':'+(matrix_domain | regex_escape)+'$',
  4404. '^@slack_[a-zA-Z0-9\-]+:'+(matrix_domain | regex_escape)+'$',
  4405. ] if matrix_bridge_mautrix_slack_enabled else [])
  4406. +
  4407. ([
  4408. '^@'+(matrix_bridge_mautrix_telegram_appservice_bot_username | default('') | regex_escape)+':'+(matrix_domain | regex_escape)+'$',
  4409. '^@telegram_(channel-)?[0-9]+:'+(matrix_domain | regex_escape)+'$',
  4410. ] if matrix_bridge_mautrix_telegram_enabled else [])
  4411. +
  4412. ([
  4413. '^@'+(matrix_bridge_mautrix_twitter_appservice_bot_username | default('') | regex_escape)+':'+(matrix_domain | regex_escape)+'$',
  4414. '^@twitter_[a-zA-Z0-9]+:'+(matrix_domain | regex_escape)+'$',
  4415. ] if matrix_bridge_mautrix_twitter_enabled else [])
  4416. +
  4417. ([
  4418. '^@'+(matrix_bridge_mautrix_whatsapp_appservice_bot_username | default('') | regex_escape)+':'+(matrix_domain | regex_escape)+'$',
  4419. '^@whatsapp_[0-9]+:'+(matrix_domain | regex_escape)+'$',
  4420. ] if matrix_bridge_mautrix_whatsapp_enabled else [])
  4421. +
  4422. ([
  4423. '^@'+(matrix_bridge_mautrix_wsproxy_imessage_appservice_bot_username | default('') | regex_escape)+':'+(matrix_domain | regex_escape)+'$',
  4424. '^@imessage_[a-zA-Z0-9]+:'+(matrix_domain | regex_escape)+'$',
  4425. ] if matrix_bridge_mautrix_wsproxy_enabled else [])
  4426. +
  4427. ([
  4428. '^@_groupmepuppet_[a-zA-Z0-9]+:'+(matrix_domain | regex_escape)+'$',
  4429. ] if matrix_bridge_mx_puppet_groupme_enabled else [])
  4430. +
  4431. ([
  4432. '^@_steampuppet_[a-zA-Z0-9]+:'+(matrix_domain | regex_escape)+'$',
  4433. ] if matrix_bridge_mx_puppet_steam_enabled else [])
  4434. +
  4435. ([
  4436. '^@smsbot:'+(matrix_domain | regex_escape)+'$',
  4437. '^@sms_[a-zA-Z0-9]+:'+(matrix_domain | regex_escape)+'$',
  4438. ] if matrix_bridge_sms_enabled else [])
  4439. +
  4440. ([
  4441. '^@'+(matrix_bridge_wechat_appservice_bot_username | default('') | regex_escape)+':'+(matrix_domain | regex_escape)+'$',
  4442. '^@_wechat_[a-zA-Z0-9]+:'+(matrix_domain | regex_escape)+'$',
  4443. ] if matrix_bridge_wechat_enabled else [])
  4444. +
  4445. ([
  4446. '^@'+(matrix_bridge_steam_appservice_bot_username | default('') | regex_escape)+':'+(matrix_domain | regex_escape)+'$',
  4447. '^@steam_[a-zA-Z0-9]+:'+(matrix_domain | regex_escape)+'$',
  4448. ] if matrix_bridge_steam_enabled else [])
  4449. }}
  4450. ######################################################################
  4451. #
  4452. # /matrix-ketesa
  4453. #
  4454. ######################################################################
  4455. ######################################################################
  4456. #
  4457. # matrix-synapse-usage-exporter
  4458. #
  4459. ######################################################################
  4460. matrix_synapse_usage_exporter_enabled: false
  4461. matrix_synapse_usage_exporter_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_synapse_usage_exporter_container_image_registry_prefix_upstream_default }}"
  4462. matrix_synapse_usage_exporter_container_network: "{{ matrix_monitoring_container_network }}"
  4463. matrix_synapse_usage_exporter_container_additional_networks: "{{ [matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network else [] }}"
  4464. matrix_synapse_usage_exporter_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  4465. matrix_synapse_usage_exporter_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  4466. matrix_synapse_usage_exporter_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  4467. matrix_synapse_usage_exporter_metrics_proxying_enabled: "{{ matrix_metrics_exposure_enabled }}"
  4468. matrix_synapse_usage_exporter_metrics_proxying_hostname: "{{ matrix_metrics_exposure_hostname }}"
  4469. matrix_synapse_usage_exporter_metrics_proxying_path: "{{ matrix_metrics_exposure_path_prefix }}/synapse-usage-exporter"
  4470. matrix_synapse_usage_exporter_container_labels_traefik_metrics_middleware_basic_auth_enabled: "{{ matrix_metrics_exposure_http_basic_auth_enabled }}"
  4471. matrix_synapse_usage_exporter_container_labels_traefik_metrics_middleware_basic_auth_users: "{{ matrix_metrics_exposure_http_basic_auth_users }}"
  4472. ######################################################################
  4473. #
  4474. # /matrix-synapse-usage-exporter
  4475. #
  4476. ######################################################################
  4477. ######################################################################
  4478. #
  4479. # prometheus_node_exporter
  4480. #
  4481. ######################################################################
  4482. prometheus_node_exporter_enabled: false
  4483. prometheus_node_exporter_identifier: matrix-prometheus-node-exporter
  4484. prometheus_node_exporter_base_path: "{{ matrix_base_data_path }}/prometheus-node-exporter"
  4485. prometheus_node_exporter_uid: "{{ matrix_user_uid }}"
  4486. prometheus_node_exporter_gid: "{{ matrix_user_gid }}"
  4487. prometheus_node_exporter_hostname: "{{ matrix_server_fqn_matrix }}"
  4488. prometheus_node_exporter_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else prometheus_node_exporter_container_image_registry_prefix_upstream_default }}"
  4489. prometheus_node_exporter_container_network: "{{ matrix_monitoring_container_network }}"
  4490. prometheus_node_exporter_container_additional_networks_auto: "{{ [matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network else [] }}"
  4491. prometheus_node_exporter_container_labels_metrics_enabled: "{{ matrix_metrics_exposure_enabled }}"
  4492. prometheus_node_exporter_container_labels_metrics_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  4493. prometheus_node_exporter_container_labels_metrics_entrypoints: "{{ traefik_entrypoint_primary }}"
  4494. prometheus_node_exporter_container_labels_metrics_tls_certResolver: "{{ traefik_certResolver_primary }}"
  4495. prometheus_node_exporter_container_labels_metrics_middleware_basic_auth_enabled: "{{ matrix_metrics_exposure_http_basic_auth_enabled }}"
  4496. prometheus_node_exporter_container_labels_metrics_middleware_basic_auth_users: "{{ matrix_metrics_exposure_http_basic_auth_users }}"
  4497. ######################################################################
  4498. #
  4499. # /prometheus_node_exporter
  4500. #
  4501. ######################################################################
  4502. ######################################################################
  4503. #
  4504. # prometheus_postgres_exporter
  4505. #
  4506. ######################################################################
  4507. prometheus_postgres_exporter_enabled: false
  4508. prometheus_postgres_exporter_identifier: matrix-prometheus-postgres-exporter
  4509. prometheus_postgres_exporter_base_path: "{{ matrix_base_data_path }}/prometheus-postgres-exporter"
  4510. prometheus_postgres_exporter_uid: "{{ matrix_user_uid }}"
  4511. prometheus_postgres_exporter_gid: "{{ matrix_user_gid }}"
  4512. prometheus_postgres_exporter_hostname: "{{ matrix_server_fqn_matrix }}"
  4513. prometheus_postgres_exporter_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else prometheus_postgres_exporter_container_image_registry_prefix_upstream_default }}"
  4514. prometheus_postgres_exporter_container_network: "{{ matrix_monitoring_container_network }}"
  4515. prometheus_postgres_exporter_container_additional_networks: |
  4516. {{
  4517. ([postgres_container_network] if (postgres_enabled and prometheus_postgres_exporter_database_hostname == postgres_connection_hostname and prometheus_postgres_exporter_container_network != postgres_container_network) else [])
  4518. +
  4519. ([matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network and prometheus_postgres_exporter_container_labels_metrics_enabled else [])
  4520. }}
  4521. prometheus_postgres_exporter_container_labels_metrics_enabled: "{{ matrix_metrics_exposure_enabled }}"
  4522. prometheus_postgres_exporter_container_labels_metrics_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  4523. prometheus_postgres_exporter_container_labels_metrics_entrypoints: "{{ traefik_entrypoint_primary }}"
  4524. prometheus_postgres_exporter_container_labels_metrics_tls_certResolver: "{{ traefik_certResolver_primary }}"
  4525. prometheus_postgres_exporter_container_labels_metrics_middleware_basic_auth_enabled: "{{ matrix_metrics_exposure_http_basic_auth_enabled }}"
  4526. prometheus_postgres_exporter_container_labels_metrics_middleware_basic_auth_users: "{{ matrix_metrics_exposure_http_basic_auth_users }}"
  4527. prometheus_postgres_exporter_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  4528. prometheus_postgres_exporter_database_username: matrix_prometheus_postgres_exporter
  4529. prometheus_postgres_exporter_database_password: "{{ (matrix_homeserver_generic_secret_key + ':prometheus.pg.db') | hash('sha512') | to_uuid }}"
  4530. prometheus_postgres_exporter_database_name: matrix_prometheus_postgres_exporter
  4531. prometheus_postgres_exporter_systemd_required_services_list_auto: |
  4532. {{
  4533. ([postgres_identifier ~ '.service'] if (postgres_enabled and prometheus_postgres_exporter_database_hostname == postgres_connection_hostname) else [])
  4534. }}
  4535. ######################################################################
  4536. #
  4537. # /prometheus_postgres_exporter
  4538. #
  4539. ######################################################################
  4540. ######################################################################
  4541. #
  4542. # prometheus_nginxlog_exporter
  4543. #
  4544. ######################################################################
  4545. prometheus_nginxlog_exporter_enabled: false
  4546. prometheus_nginxlog_exporter_identifier: matrix-prometheus-nginxlog-exporter
  4547. prometheus_nginxlog_exporter_base_path: "{{ matrix_base_data_path }}/prometheus-nginxlog-exporter"
  4548. prometheus_nginxlog_exporter_uid: "{{ matrix_user_uid }}"
  4549. prometheus_nginxlog_exporter_gid: "{{ matrix_user_gid }}"
  4550. prometheus_nginxlog_exporter_hostname: "{{ matrix_server_fqn_matrix }}"
  4551. prometheus_nginxlog_exporter_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else prometheus_nginxlog_exporter_container_image_registry_prefix_upstream_default }}"
  4552. prometheus_nginxlog_exporter_container_network: "{{ matrix_monitoring_container_network }}"
  4553. prometheus_nginxlog_exporter_container_network_deletion_enabled: false
  4554. prometheus_nginxlog_exporter_container_additional_networks_auto: |-
  4555. {{
  4556. ([matrix_playbook_reverse_proxyable_services_additional_network] if (matrix_playbook_reverse_proxyable_services_additional_network and prometheus_nginxlog_exporter_container_labels_metrics_enabled) else [])
  4557. }}
  4558. prometheus_nginxlog_exporter_container_labels_metrics_enabled: "{{ matrix_metrics_exposure_enabled }}"
  4559. prometheus_nginxlog_exporter_container_labels_metrics_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  4560. prometheus_nginxlog_exporter_container_labels_metrics_entrypoints: "{{ traefik_entrypoint_primary }}"
  4561. prometheus_nginxlog_exporter_container_labels_metrics_tls_certResolver: "{{ traefik_certResolver_primary }}"
  4562. prometheus_nginxlog_exporter_container_labels_metrics_middleware_basic_auth_enabled: "{{ matrix_metrics_exposure_http_basic_auth_enabled }}"
  4563. prometheus_nginxlog_exporter_container_labels_metrics_middleware_basic_auth_users: "{{ matrix_metrics_exposure_http_basic_auth_users }}"
  4564. prometheus_nginxlog_exporter_config_namespaces_source_tags_auto: |
  4565. {{
  4566. ([matrix_synapse_reverse_proxy_companion_access_log_syslog_integration_tag] if matrix_synapse_reverse_proxy_companion_access_log_syslog_integration_enabled else [])
  4567. }}
  4568. prometheus_nginxlog_exporter_architecture: "{{ matrix_architecture }}"
  4569. ######################################################################
  4570. #
  4571. # /prometheus_nginxlog_exporter
  4572. #
  4573. ######################################################################
  4574. ######################################################################
  4575. #
  4576. # prometheus
  4577. #
  4578. ######################################################################
  4579. prometheus_enabled: false
  4580. prometheus_identifier: matrix-prometheus
  4581. prometheus_base_path: "{{ matrix_base_data_path }}/prometheus"
  4582. prometheus_uid: "{{ matrix_user_uid }}"
  4583. prometheus_gid: "{{ matrix_user_gid }}"
  4584. prometheus_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else prometheus_container_image_registry_prefix_upstream_default }}"
  4585. prometheus_container_network: "{{ matrix_monitoring_container_network }}"
  4586. prometheus_container_additional_networks_auto: |
  4587. {{
  4588. (
  4589. ([prometheus_nginxlog_exporter_container_network] if matrix_prometheus_services_connect_scraper_nginxlog_enabled and prometheus_nginxlog_exporter_container_network != prometheus_container_network else [])
  4590. +
  4591. ([prometheus_node_exporter_container_network] if prometheus_self_node_scraper_enabled and prometheus_node_exporter_container_network != prometheus_container_network else [])
  4592. +
  4593. ([matrix_synapse_container_network] if matrix_prometheus_services_connect_scraper_synapse_enabled and matrix_synapse_container_network != prometheus_container_network else [])
  4594. +
  4595. ([prometheus_postgres_exporter_container_network] if matrix_prometheus_services_connect_scraper_postgres_enabled and prometheus_postgres_exporter_container_network != prometheus_container_network else [])
  4596. +
  4597. ([matrix_bridge_hookshot_container_network] if matrix_prometheus_services_connect_scraper_hookshot_enabled and matrix_bridge_hookshot_container_network != prometheus_container_network else [])
  4598. +
  4599. ([matrix_media_repo_container_network] if matrix_prometheus_services_connect_scraper_media_repo_enabled and matrix_media_repo_container_network != prometheus_container_network else [])
  4600. +
  4601. ([matrix_synapse_usage_exporter_container_network] if matrix_prometheus_services_connect_scraper_synapse_usage_exporter_enabled and matrix_synapse_usage_exporter_container_network != prometheus_container_network else [])
  4602. +
  4603. ([ntfy_container_network] if matrix_prometheus_services_connect_scraper_ntfy_enabled and ntfy_container_network != prometheus_container_network else [])
  4604. ) | unique
  4605. }}
  4606. prometheus_container_http_host_bind_port: "{{ (matrix_playbook_service_host_bind_interface_prefix ~ '9090') if matrix_playbook_service_host_bind_interface_prefix else '' }}"
  4607. prometheus_config_rule_files_auto: |
  4608. {{
  4609. (['synapse-v2.rules'] if matrix_prometheus_services_connect_synapse_rules_enabled else [])
  4610. }}
  4611. prometheus_self_node_scraper_enabled: "{{ prometheus_node_exporter_enabled }}"
  4612. prometheus_self_node_scraper_static_configs_target: "{{ (prometheus_node_exporter_identifier + ':9100') if prometheus_node_exporter_enabled else '' }}"
  4613. prometheus_config_scrape_configs_auto: |
  4614. {{
  4615. (matrix_prometheus_services_connect_scraper_synapse_configs if matrix_prometheus_services_connect_scraper_synapse_enabled else [])
  4616. +
  4617. (matrix_prometheus_services_connect_scraper_postgres_scrape_configs if matrix_prometheus_services_connect_scraper_postgres_enabled else [])
  4618. +
  4619. (matrix_prometheus_services_connect_scraper_hookshot_scrape_configs if matrix_prometheus_services_connect_scraper_hookshot_enabled else [])
  4620. +
  4621. (matrix_prometheus_services_connect_scraper_nginxlog_scrape_configs if matrix_prometheus_services_connect_scraper_nginxlog_enabled else [])
  4622. +
  4623. (matrix_prometheus_services_connect_scraper_media_repo_scrape_configs if matrix_prometheus_services_connect_scraper_media_repo_enabled else [])
  4624. +
  4625. (matrix_prometheus_services_connect_scraper_synapse_usage_exporter_scrape_configs if matrix_prometheus_services_connect_scraper_synapse_usage_exporter_enabled else [])
  4626. +
  4627. (matrix_prometheus_services_connect_scraper_ntfy_scrape_configs if matrix_prometheus_services_connect_scraper_ntfy_enabled else [])
  4628. }}
  4629. ######################################################################
  4630. #
  4631. # /prometheus
  4632. #
  4633. ######################################################################
  4634. ######################################################################
  4635. #
  4636. # matrix-prometheus-services-connect
  4637. #
  4638. ######################################################################
  4639. matrix_prometheus_services_connect_synapse_enabled: "{{ prometheus_enabled and matrix_synapse_enabled }}"
  4640. matrix_prometheus_services_connect_synapse_rules_download_synapse_tag: "{{ matrix_synapse_container_image_tag }}"
  4641. matrix_prometheus_services_connect_synapse_rules_download_dir_path: "{{ prometheus_config_path }}"
  4642. matrix_prometheus_services_connect_synapse_rules_download_owner: "{{ prometheus_uid }}"
  4643. matrix_prometheus_services_connect_synapse_rules_download_group: "{{ prometheus_gid }}"
  4644. matrix_prometheus_services_connect_scraper_synapse_enabled: "{{ matrix_synapse_enabled and matrix_synapse_metrics_enabled }}"
  4645. matrix_prometheus_services_connect_scraper_synapse_main_process_static_configs_target: "matrix-synapse:{{ matrix_synapse_metrics_port }}"
  4646. matrix_prometheus_services_connect_scraper_synapse_workers_enabled_list: "{{ matrix_synapse_workers_enabled_list }}"
  4647. matrix_prometheus_services_connect_scraper_postgres_enabled: "{{ prometheus_postgres_exporter_enabled }}"
  4648. matrix_prometheus_services_connect_scraper_postgres_static_configs_target: "{{ prometheus_postgres_exporter_identifier }}:{{ prometheus_postgres_exporter_container_http_port | string }}"
  4649. matrix_prometheus_services_connect_scraper_hookshot_enabled: "{{ matrix_bridge_hookshot_enabled and matrix_bridge_hookshot_metrics_enabled }}"
  4650. matrix_prometheus_services_connect_scraper_hookshot_static_configs_target: "{{ matrix_bridge_hookshot_container_url }}:{{ matrix_bridge_hookshot_metrics_port | string }}"
  4651. matrix_prometheus_services_connect_scraper_nginxlog_enabled: "{{ prometheus_nginxlog_exporter_enabled }}"
  4652. matrix_prometheus_services_connect_scraper_nginxlog_static_configs_target: "{{ prometheus_nginxlog_exporter_identifier }}:{{ prometheus_nginxlog_exporter_container_metrics_port | string }}"
  4653. matrix_prometheus_services_connect_scraper_media_repo_enabled: "{{ matrix_media_repo_enabled and matrix_media_repo_metrics_enabled }}"
  4654. matrix_prometheus_services_connect_scraper_media_repo_static_configs_target: "{{ matrix_media_repo_identifier }}:{{ matrix_media_repo_metrics_port }}"
  4655. matrix_prometheus_services_connect_scraper_synapse_usage_exporter_enabled: "{{ matrix_synapse_usage_exporter_enabled }}"
  4656. matrix_prometheus_services_connect_scraper_synapse_usage_exporter_static_configs_target: "{{ matrix_synapse_usage_exporter_identifier }}:{{ matrix_synapse_usage_exporter_container_port | string }}"
  4657. matrix_prometheus_services_connect_scraper_ntfy_enabled: "{{ ntfy_enabled and ntfy_metrics_listen_http_port | string | length > 0 }}"
  4658. matrix_prometheus_services_connect_scraper_ntfy_static_configs_target: "{{ ntfy_identifier }}:{{ ntfy_metrics_listen_http_port | string }}"
  4659. ######################################################################
  4660. #
  4661. # /matrix-prometheus-services-connect
  4662. #
  4663. ######################################################################
  4664. ######################################################################
  4665. #
  4666. # grafana
  4667. #
  4668. ######################################################################
  4669. grafana_enabled: false
  4670. grafana_identifier: matrix-grafana
  4671. grafana_uid: "{{ matrix_user_uid }}"
  4672. grafana_gid: "{{ matrix_user_gid }}"
  4673. grafana_hostname: "{{ matrix_server_fqn_grafana }}"
  4674. grafana_base_path: "{{ matrix_base_data_path }}/grafana"
  4675. grafana_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else grafana_container_image_registry_prefix_upstream_default }}"
  4676. grafana_container_network: "{{ matrix_monitoring_container_network }}"
  4677. grafana_container_additional_networks_auto: |
  4678. {{
  4679. (
  4680. ([matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network and grafana_container_labels_traefik_enabled else [])
  4681. +
  4682. ([prometheus_container_network] if prometheus_enabled and prometheus_container_network != grafana_container_network else [])
  4683. ) | unique
  4684. }}
  4685. grafana_container_labels_traefik_enabled: "{{ matrix_playbook_traefik_labels_enabled }}"
  4686. grafana_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  4687. grafana_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  4688. grafana_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  4689. grafana_container_http_host_bind_port: "{{ (matrix_playbook_service_host_bind_interface_prefix ~ '3000') if matrix_playbook_service_host_bind_interface_prefix else '' }}"
  4690. grafana_provisioning_datasources_datasources: |
  4691. {{
  4692. ([{
  4693. 'name': (matrix_server_fqn_matrix + ' - Prometheus'),
  4694. 'type': 'prometheus',
  4695. 'access': 'proxy',
  4696. 'url': ('http://' + prometheus_identifier + ':9090'),
  4697. 'jsonData': {
  4698. 'timeInterval': prometheus_config_global_scrape_interval,
  4699. }
  4700. }] if prometheus_enabled else [])
  4701. }}
  4702. grafana_dashboard_download_urls_auto: |
  4703. {{
  4704. (matrix_synapse_grafana_dashboard_urls if matrix_homeserver_implementation == 'synapse' and matrix_synapse_metrics_enabled else [])
  4705. +
  4706. (prometheus_node_exporter_dashboard_urls if prometheus_node_exporter_enabled else [])
  4707. +
  4708. (prometheus_postgres_exporter_dashboard_urls if prometheus_postgres_exporter_enabled else [])
  4709. +
  4710. (prometheus_nginxlog_exporter_dashboard_urls if prometheus_nginxlog_exporter_enabled else [])
  4711. +
  4712. (matrix_media_repo_dashboard_urls if matrix_media_repo_metrics_enabled else [])
  4713. +
  4714. (matrix_synapse_usage_exporter_dashboard_urls if matrix_synapse_usage_exporter_enabled else [])
  4715. }}
  4716. grafana_provisioning_dashboard_template_files: |
  4717. {{
  4718. ([{
  4719. 'path': 'roles/galaxy/prometheus_nginxlog_exporter/templates/grafana/nginx-proxy.json',
  4720. 'name': 'nginx-proxy.json',
  4721. }] if prometheus_nginxlog_exporter_enabled else [])
  4722. }}
  4723. grafana_default_home_dashboard_path: |-
  4724. {{
  4725. {
  4726. 'synapse': ('/etc/grafana/dashboards/synapse.json' if matrix_synapse_metrics_enabled and matrix_synapse_metrics_enabled else ('/etc/grafana/dashboards/node-exporter-full.json' if prometheus_node_exporter_enabled else '')),
  4727. 'dendrite': ('/etc/grafana/dashboards/node-exporter-full.json' if prometheus_node_exporter_enabled else ''),
  4728. 'conduit': ('/etc/grafana/dashboards/node-exporter-full.json' if prometheus_node_exporter_enabled else ''),
  4729. 'continuwuity': ('/etc/grafana/dashboards/node-exporter-full.json' if prometheus_node_exporter_enabled else ''),
  4730. 'tuwunel': ('/etc/grafana/dashboards/node-exporter-full.json' if prometheus_node_exporter_enabled else ''),
  4731. }[matrix_homeserver_implementation]
  4732. }}
  4733. ######################################################################
  4734. #
  4735. # /grafana
  4736. #
  4737. ######################################################################
  4738. ######################################################################
  4739. #
  4740. # matrix-dendrite
  4741. #
  4742. ######################################################################
  4743. matrix_dendrite_enabled: "{{ matrix_homeserver_implementation == 'dendrite' }}"
  4744. matrix_dendrite_hostname: "{{ matrix_server_fqn_matrix }}"
  4745. matrix_dendrite_federation_enabled: "{{ matrix_homeserver_federation_enabled }}"
  4746. matrix_dendrite_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_dendrite_container_image_registry_prefix_upstream_default }}"
  4747. matrix_dendrite_container_network: "{{ matrix_homeserver_container_network }}"
  4748. matrix_dendrite_container_additional_networks_auto: |
  4749. {{
  4750. (
  4751. ([matrix_playbook_reverse_proxyable_services_additional_network] if matrix_dendrite_container_labels_traefik_enabled and matrix_playbook_reverse_proxyable_services_additional_network else [])
  4752. +
  4753. ([postgres_container_network] if (postgres_enabled and matrix_dendrite_database_hostname == postgres_connection_hostname and postgres_container_network != matrix_dendrite_container_network) else [])
  4754. ) | unique
  4755. }}
  4756. matrix_dendrite_container_http_host_bind_address: "{{ (matrix_playbook_service_host_bind_interface_prefix ~ matrix_dendrite_http_bind_port | string) if matrix_playbook_service_host_bind_interface_prefix else '' }}"
  4757. matrix_dendrite_container_https_host_bind_address: "{{ '' if not matrix_dendrite_https_bind_port or not matrix_playbook_service_host_bind_interface_prefix else (matrix_playbook_service_host_bind_interface_prefix + matrix_dendrite_https_bind_port | string) }}"
  4758. matrix_dendrite_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] and not matrix_synapse_workers_enabled }}"
  4759. matrix_dendrite_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  4760. matrix_dendrite_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  4761. matrix_dendrite_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  4762. matrix_dendrite_container_labels_public_client_synapse_admin_api_enabled: "{{ matrix_ketesa_enabled }}"
  4763. matrix_dendrite_container_labels_public_client_root_redirection_enabled: "{{ matrix_dendrite_container_labels_public_client_root_redirection_url != '' }}"
  4764. matrix_dendrite_container_labels_public_client_root_redirection_url: "{{ matrix_playbook_public_client_root_redirection_url }}"
  4765. matrix_dendrite_container_labels_public_federation_api_traefik_hostname: "{{ matrix_server_fqn_matrix_federation }}"
  4766. matrix_dendrite_container_labels_public_federation_api_traefik_entrypoints: "{{ matrix_federation_traefik_entrypoint_name }}"
  4767. matrix_dendrite_container_labels_public_federation_api_traefik_tls: "{{ matrix_federation_traefik_entrypoint_tls }}"
  4768. matrix_dendrite_container_labels_public_metrics_middleware_basic_auth_enabled: "{{ matrix_metrics_exposure_http_basic_auth_enabled }}"
  4769. matrix_dendrite_container_labels_public_metrics_middleware_basic_auth_users: "{{ matrix_metrics_exposure_http_basic_auth_users }}"
  4770. matrix_dendrite_metrics_enabled: "{{ prometheus_enabled or matrix_metrics_exposure_enabled }}"
  4771. matrix_dendrite_metrics_proxying_enabled: "{{ matrix_dendrite_metrics_enabled and matrix_metrics_exposure_enabled }}"
  4772. matrix_dendrite_metrics_proxying_hostname: "{{ matrix_metrics_exposure_hostname }}"
  4773. matrix_dendrite_metrics_proxying_path_prefix: "{{ matrix_metrics_exposure_path_prefix }}/dendrite"
  4774. matrix_dendrite_client_api_registration_shared_secret: "{{ (matrix_homeserver_generic_secret_key + ':dendrite.rss') | hash('sha512') | to_uuid }}"
  4775. matrix_dendrite_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  4776. matrix_dendrite_database_password: "{{ (matrix_homeserver_generic_secret_key + ':dendrite.db') | hash('sha512') | to_uuid }}"
  4777. matrix_dendrite_client_api_turn_uris: "{{ coturn_turn_uris if coturn_enabled else [] }}"
  4778. matrix_dendrite_client_api_turn_shared_secret: "{{ coturn_turn_static_auth_secret if (coturn_enabled and coturn_authentication_method == 'auth-secret') else '' }}"
  4779. matrix_dendrite_client_api_turn_username: "{{ coturn_lt_cred_mech_username if (coturn_enabled and coturn_authentication_method == 'lt-cred-mech') else '' }}"
  4780. matrix_dendrite_client_api_turn_password: "{{ coturn_lt_cred_mech_password if (coturn_enabled and coturn_authentication_method == 'lt-cred-mech') else '' }}"
  4781. matrix_dendrite_disable_tls_validation: "{{ not matrix_playbook_ssl_enabled }}"
  4782. matrix_dendrite_self_check_validate_certificates: "{{ matrix_playbook_ssl_enabled }}"
  4783. matrix_dendrite_trusted_id_servers: "{{ ['matrix.org', 'vector.im'] }}"
  4784. matrix_dendrite_systemd_required_services_list_auto: |
  4785. {{
  4786. ([postgres_identifier ~ '.service'] if (postgres_enabled and matrix_dendrite_database_hostname == postgres_connection_hostname) else [])
  4787. +
  4788. (['matrix-goofys.service'] if matrix_s3_media_store_enabled else [])
  4789. }}
  4790. matrix_dendrite_systemd_wanted_services_list_auto: |
  4791. {{
  4792. ([coturn_identifier ~ '.service'] if coturn_enabled else [])
  4793. }}
  4794. matrix_dendrite_container_extra_arguments_auto: "{{ matrix_homeserver_container_extra_arguments_auto }}"
  4795. matrix_dendrite_app_service_config_files_auto: "{{ matrix_homeserver_app_service_config_files_auto }}"
  4796. ######################################################################
  4797. #
  4798. # /matrix-dendrite
  4799. #
  4800. ######################################################################
  4801. ######################################################################
  4802. #
  4803. # matrix-conduit
  4804. #
  4805. ######################################################################
  4806. matrix_conduit_enabled: "{{ matrix_homeserver_implementation == 'conduit' }}"
  4807. matrix_conduit_hostname: "{{ matrix_server_fqn_matrix }}"
  4808. matrix_conduit_allow_federation: "{{ matrix_homeserver_federation_enabled }}"
  4809. matrix_conduit_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_conduit_container_image_registry_prefix_upstream_default }}"
  4810. matrix_conduit_container_network: "{{ matrix_homeserver_container_network }}"
  4811. matrix_conduit_container_additional_networks_auto: |
  4812. {{
  4813. (
  4814. ([matrix_playbook_reverse_proxyable_services_additional_network] if matrix_conduit_container_labels_traefik_enabled and matrix_playbook_reverse_proxyable_services_additional_network else [])
  4815. ) | unique
  4816. }}
  4817. matrix_conduit_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] and not matrix_synapse_workers_enabled }}"
  4818. matrix_conduit_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  4819. matrix_conduit_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  4820. matrix_conduit_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  4821. matrix_conduit_container_labels_public_client_root_redirection_enabled: "{{ matrix_conduit_container_labels_public_client_root_redirection_url != '' }}"
  4822. matrix_conduit_container_labels_public_client_root_redirection_url: "{{ matrix_playbook_public_client_root_redirection_url }}"
  4823. matrix_conduit_container_labels_public_federation_api_traefik_hostname: "{{ matrix_server_fqn_matrix_federation }}"
  4824. matrix_conduit_container_labels_public_federation_api_traefik_entrypoints: "{{ matrix_federation_traefik_entrypoint_name }}"
  4825. matrix_conduit_container_labels_public_federation_api_traefik_tls: "{{ matrix_federation_traefik_entrypoint_tls }}"
  4826. matrix_conduit_container_labels_internal_client_api_enabled: "{{ matrix_playbook_internal_matrix_client_api_traefik_entrypoint_enabled }}"
  4827. matrix_conduit_container_labels_internal_client_api_traefik_entrypoints: "{{ matrix_playbook_internal_matrix_client_api_traefik_entrypoint_name }}"
  4828. matrix_conduit_turn_uris: "{{ coturn_turn_uris if coturn_enabled else [] }}"
  4829. matrix_conduit_turn_secret: "{{ coturn_turn_static_auth_secret if (coturn_enabled and coturn_authentication_method == 'auth-secret') else '' }}"
  4830. matrix_conduit_turn_username: "{{ coturn_lt_cred_mech_username if (coturn_enabled and coturn_authentication_method == 'lt-cred-mech') else '' }}"
  4831. matrix_conduit_turn_password: "{{ coturn_lt_cred_mech_password if (coturn_enabled and coturn_authentication_method == 'lt-cred-mech') else '' }}"
  4832. ######################################################################
  4833. #
  4834. # /matrix-conduit
  4835. #
  4836. ######################################################################
  4837. ######################################################################
  4838. #
  4839. # matrix-continuwuity
  4840. #
  4841. ######################################################################
  4842. matrix_continuwuity_enabled: "{{ matrix_homeserver_implementation == 'continuwuity' }}"
  4843. matrix_continuwuity_hostname: "{{ matrix_server_fqn_matrix }}"
  4844. matrix_continuwuity_config_allow_federation: "{{ matrix_homeserver_federation_enabled }}"
  4845. matrix_continuwuity_config_well_known_client: "{{ matrix_homeserver_url if matrix_playbook_ssl_enabled else '' }}"
  4846. matrix_continuwuity_config_smtp_enabled: "{{ exim_relay_enabled }}"
  4847. matrix_continuwuity_config_smtp_connection_uri: "{{ ('smtp://' ~ exim_relay_identifier ~ ':8025') if exim_relay_enabled else '' }}"
  4848. matrix_continuwuity_config_smtp_sender: "{{ exim_relay_sender_address if exim_relay_enabled else '' }}"
  4849. matrix_continuwuity_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_continuwuity_container_image_registry_prefix_upstream_default }}"
  4850. matrix_continuwuity_container_network: "{{ matrix_homeserver_container_network }}"
  4851. matrix_continuwuity_container_additional_networks_auto: |
  4852. {{
  4853. (
  4854. ([matrix_playbook_reverse_proxyable_services_additional_network] if matrix_continuwuity_container_labels_traefik_enabled and matrix_playbook_reverse_proxyable_services_additional_network else [])
  4855. +
  4856. ([exim_relay_container_network] if (exim_relay_enabled and matrix_continuwuity_config_smtp_enabled and matrix_continuwuity_config_smtp_connection_uri == ('smtp://' ~ exim_relay_identifier ~ ':8025') and matrix_continuwuity_container_network != exim_relay_container_network) else [])
  4857. ) | unique
  4858. }}
  4859. matrix_continuwuity_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] and not matrix_synapse_workers_enabled }}"
  4860. matrix_continuwuity_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  4861. matrix_continuwuity_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  4862. matrix_continuwuity_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  4863. matrix_continuwuity_container_labels_public_client_root_redirection_enabled: "{{ matrix_continuwuity_container_labels_public_client_root_redirection_url != '' }}"
  4864. matrix_continuwuity_container_labels_public_client_root_redirection_url: "{{ matrix_playbook_public_client_root_redirection_url }}"
  4865. matrix_continuwuity_container_labels_public_federation_api_traefik_hostname: "{{ matrix_server_fqn_matrix_federation }}"
  4866. matrix_continuwuity_container_labels_public_federation_api_traefik_entrypoints: "{{ matrix_federation_traefik_entrypoint_name }}"
  4867. matrix_continuwuity_container_labels_public_federation_api_traefik_tls: "{{ matrix_federation_traefik_entrypoint_tls }}"
  4868. matrix_continuwuity_container_labels_internal_client_api_enabled: "{{ matrix_playbook_internal_matrix_client_api_traefik_entrypoint_enabled }}"
  4869. matrix_continuwuity_container_labels_internal_client_api_traefik_entrypoints: "{{ matrix_playbook_internal_matrix_client_api_traefik_entrypoint_name }}"
  4870. matrix_continuwuity_config_rtc_foci_livekit_url: "{{ matrix_livekit_jwt_service_public_url if matrix_livekit_jwt_service_enabled else '' }}"
  4871. matrix_continuwuity_config_turn_uris: "{{ coturn_turn_uris if coturn_enabled else [] }}"
  4872. matrix_continuwuity_config_turn_secret: "{{ coturn_turn_static_auth_secret if (coturn_enabled and coturn_authentication_method == 'auth-secret') else '' }}"
  4873. matrix_continuwuity_config_turn_username: "{{ coturn_lt_cred_mech_username if (coturn_enabled and coturn_authentication_method == 'lt-cred-mech') else '' }}"
  4874. matrix_continuwuity_config_turn_password: "{{ coturn_lt_cred_mech_password if (coturn_enabled and coturn_authentication_method == 'lt-cred-mech') else '' }}"
  4875. matrix_continuwuity_self_check_validate_certificates: "{{ matrix_playbook_ssl_enabled }}"
  4876. matrix_continuwuity_systemd_wanted_services_list_auto: |
  4877. {{
  4878. ([exim_relay_identifier ~ '.service'] if (exim_relay_enabled and matrix_continuwuity_config_smtp_enabled and matrix_continuwuity_config_smtp_connection_uri == ('smtp://' ~ exim_relay_identifier ~ ':8025')) else [])
  4879. }}
  4880. ######################################################################
  4881. #
  4882. # /matrix-continuwuity
  4883. #
  4884. ######################################################################
  4885. ######################################################################
  4886. #
  4887. # matrix-tuwunel
  4888. #
  4889. ######################################################################
  4890. matrix_tuwunel_enabled: "{{ matrix_homeserver_implementation == 'tuwunel' }}"
  4891. matrix_tuwunel_hostname: "{{ matrix_server_fqn_matrix }}"
  4892. matrix_tuwunel_config_allow_federation: "{{ matrix_homeserver_federation_enabled }}"
  4893. matrix_tuwunel_config_well_known_client: "{{ matrix_homeserver_url if matrix_playbook_ssl_enabled else '' }}"
  4894. matrix_tuwunel_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_tuwunel_container_image_registry_prefix_upstream_default }}"
  4895. matrix_tuwunel_container_network: "{{ matrix_homeserver_container_network }}"
  4896. matrix_tuwunel_container_additional_networks_auto: |
  4897. {{
  4898. (
  4899. ([matrix_playbook_reverse_proxyable_services_additional_network] if matrix_tuwunel_container_labels_traefik_enabled and matrix_playbook_reverse_proxyable_services_additional_network else [])
  4900. ) | unique
  4901. }}
  4902. matrix_tuwunel_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] and not matrix_synapse_workers_enabled }}"
  4903. matrix_tuwunel_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  4904. matrix_tuwunel_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  4905. matrix_tuwunel_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  4906. matrix_tuwunel_container_labels_public_client_root_redirection_enabled: "{{ matrix_tuwunel_container_labels_public_client_root_redirection_url != '' }}"
  4907. matrix_tuwunel_container_labels_public_client_root_redirection_url: "{{ matrix_playbook_public_client_root_redirection_url }}"
  4908. matrix_tuwunel_container_labels_public_client_synapse_admin_api_enabled: "{{ matrix_ketesa_enabled or matrix_element_admin_enabled }}"
  4909. matrix_tuwunel_container_labels_internal_client_synapse_admin_api_enabled: "{{ (matrix_bot_draupnir_enabled and matrix_bot_draupnir_admin_api_enabled) }}"
  4910. matrix_tuwunel_container_labels_internal_client_synapse_admin_api_traefik_entrypoints: "{{ matrix_playbook_internal_matrix_client_api_traefik_entrypoint_name }}"
  4911. matrix_tuwunel_container_labels_public_federation_api_traefik_hostname: "{{ matrix_server_fqn_matrix_federation }}"
  4912. matrix_tuwunel_container_labels_public_federation_api_traefik_entrypoints: "{{ matrix_federation_traefik_entrypoint_name }}"
  4913. matrix_tuwunel_container_labels_public_federation_api_traefik_tls: "{{ matrix_federation_traefik_entrypoint_tls }}"
  4914. matrix_tuwunel_container_labels_internal_client_api_enabled: "{{ matrix_playbook_internal_matrix_client_api_traefik_entrypoint_enabled }}"
  4915. matrix_tuwunel_container_labels_internal_client_api_traefik_entrypoints: "{{ matrix_playbook_internal_matrix_client_api_traefik_entrypoint_name }}"
  4916. matrix_tuwunel_container_labels_internal_tuwunel_api_traefik_entrypoints: "{{ matrix_playbook_internal_matrix_client_api_traefik_entrypoint_name }}"
  4917. matrix_tuwunel_config_well_known_livekit_url: "{{ matrix_livekit_jwt_service_public_url if matrix_livekit_jwt_service_enabled else '' }}"
  4918. matrix_tuwunel_config_turn_uris: "{{ coturn_turn_uris if coturn_enabled else [] }}"
  4919. matrix_tuwunel_config_turn_secret: "{{ coturn_turn_static_auth_secret if (coturn_enabled and coturn_authentication_method == 'auth-secret') else '' }}"
  4920. matrix_tuwunel_config_turn_username: "{{ coturn_lt_cred_mech_username if (coturn_enabled and coturn_authentication_method == 'lt-cred-mech') else '' }}"
  4921. matrix_tuwunel_config_turn_password: "{{ coturn_lt_cred_mech_password if (coturn_enabled and coturn_authentication_method == 'lt-cred-mech') else '' }}"
  4922. matrix_tuwunel_self_check_validate_certificates: "{{ matrix_playbook_ssl_enabled }}"
  4923. matrix_tuwunel_systemd_wanted_services_list_auto: |
  4924. {{
  4925. ([coturn_identifier ~ '.service'] if coturn_enabled else [])
  4926. }}
  4927. ######################################################################
  4928. #
  4929. # /matrix-tuwunel
  4930. #
  4931. ######################################################################
  4932. ######################################################################
  4933. #
  4934. # matrix-user-creator
  4935. #
  4936. ######################################################################
  4937. matrix_user_creator_users_auto: |
  4938. {{
  4939. ([{
  4940. 'username': matrix_bot_baibot_config_user_mxid_localpart,
  4941. 'initial_password': matrix_bot_baibot_config_user_password,
  4942. 'initial_type': 'bot',
  4943. }] if matrix_bot_baibot_enabled and ((matrix_bot_baibot_config_user_password | default('', true) | string | length) > 0) else [])
  4944. +
  4945. ([{
  4946. 'username': matrix_bot_matrix_reminder_bot_matrix_user_id_localpart,
  4947. 'initial_password': matrix_bot_matrix_reminder_bot_matrix_user_password,
  4948. 'initial_type': 'bot',
  4949. }] if matrix_bot_matrix_reminder_bot_enabled else [])
  4950. +
  4951. ([{
  4952. 'username': matrix_bot_honoroit_login,
  4953. 'initial_password': matrix_bot_honoroit_password,
  4954. 'initial_type': 'bot',
  4955. }] if matrix_bot_honoroit_enabled else [])
  4956. +
  4957. ([{
  4958. 'username': matrix_bridge_postmoogle_login,
  4959. 'initial_password': matrix_bridge_postmoogle_password,
  4960. 'initial_type': 'bot',
  4961. }] if matrix_bridge_postmoogle_enabled else [])
  4962. +
  4963. ([{
  4964. 'username': matrix_bot_buscarron_login,
  4965. 'initial_password': matrix_bot_buscarron_password,
  4966. 'initial_type': 'bot',
  4967. }] if matrix_bot_buscarron_enabled else [])
  4968. +
  4969. ([{
  4970. 'username': matrix_bot_maubot_login,
  4971. 'initial_password': matrix_bot_maubot_initial_password,
  4972. 'initial_type': 'bot',
  4973. }] if matrix_bot_maubot_enabled else [])
  4974. +
  4975. ([{
  4976. 'username': matrix_bot_draupnir_login,
  4977. 'initial_password': matrix_bot_draupnir_password,
  4978. 'initial_type': ('admin' if matrix_bot_draupnir_admin_api_enabled else 'bot'),
  4979. }] if matrix_bot_draupnir_enabled and matrix_bot_draupnir_password else [])
  4980. }}
  4981. ######################################################################
  4982. #
  4983. # /matrix-user-creator
  4984. #
  4985. ######################################################################
  4986. ######################################################################
  4987. #
  4988. # matrix-user-verification-service
  4989. #
  4990. ######################################################################
  4991. matrix_user_verification_service_enabled: false
  4992. matrix_user_verification_service_systemd_required_services_list: |
  4993. {{
  4994. [devture_systemd_docker_base_docker_service_name]
  4995. +
  4996. (['matrix-' + matrix_homeserver_implementation + '.service'])
  4997. }}
  4998. matrix_user_verification_service_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_user_verification_service_container_image_registry_prefix_upstream_default }}"
  4999. matrix_user_verification_service_container_network: "{{ matrix_addons_container_network }}"
  5000. matrix_user_verification_service_container_additional_networks: |
  5001. {{
  5002. (
  5003. ([matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network else [])
  5004. +
  5005. ([matrix_homeserver_container_network] if matrix_homeserver_container_network != matrix_user_verification_service_container_network else [])
  5006. ) | unique
  5007. }}
  5008. # If Jitsi is managed by this playbook we can use the docker network — no need to expose a port.
  5009. # If Jitsi is not managed by this playbook, or you otherwise have a need for it, you can expose
  5010. # matrix-user-verfification-services's client-server port to port 3003.
  5011. # By default Matrix-User-Verification-Service binds to port 3000, which collides with grafana, therefore this uses port 3003.
  5012. matrix_user_verification_service_container_http_host_bind_port: "{{ '' if (jitsi_enabled | bool and jitsi_enable_auth | bool and jitsi_auth_type == 'matrix') else matrix_playbook_service_host_bind_interface_prefix ~ '3003' }}"
  5013. # URL exposed in the docker network
  5014. matrix_user_verification_service_container_url: "http://{{ matrix_user_verification_service_container_name }}:3000"
  5015. # Using `matrix_addons_homeserver_client_api_url` would not work here,
  5016. # because `matrix-traefik:8008` (matrix-internal-client-api) does not expose any `/_synapse` paths.
  5017. # UVS accesses `/_synapse/admin/v1/rooms` API to check room membership.
  5018. matrix_user_verification_service_uvs_homeserver_url: "{{ matrix_homeserver_container_url }}"
  5019. # We connect via the container network (private IPs), so we need to disable IP checks
  5020. matrix_user_verification_service_uvs_disable_ip_blacklist: "{{ matrix_synapse_enabled }}"
  5021. matrix_user_verification_service_uvs_auth_token: "{{ (matrix_homeserver_generic_secret_key + ':uvs.auth.token') | hash('sha512') | to_uuid }}"
  5022. ######################################################################
  5023. #
  5024. # /matrix-user-verification-service
  5025. #
  5026. ######################################################################
  5027. ########################################################################
  5028. # #
  5029. # matrix-static-files #
  5030. # #
  5031. ########################################################################
  5032. matrix_static_files_enabled: true
  5033. matrix_static_files_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_static_files_container_image_registry_prefix_upstream_default }}"
  5034. matrix_static_files_container_network: "{{ (matrix_static_files_identifier if matrix_playbook_reverse_proxy_type == 'none' else matrix_playbook_reverse_proxy_container_network) }}"
  5035. matrix_static_files_container_labels_traefik_enabled: "{{ matrix_playbook_traefik_labels_enabled }}"
  5036. matrix_static_files_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  5037. matrix_static_files_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  5038. matrix_static_files_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  5039. matrix_static_files_container_labels_well_known_matrix_endpoint_traefik_hostname: "{{ matrix_server_fqn_matrix }}"
  5040. # Base domain serving is not enabled by default (see `matrix_static_files_container_labels_base_domain_enabled`),
  5041. # but we pass the hostname, so that enabling it is easy.
  5042. matrix_static_files_container_labels_base_domain_traefik_hostname: "{{ matrix_domain }}"
  5043. # If we're not serving a static webpage, serve a redirect instead of a 404.
  5044. matrix_static_files_container_labels_base_domain_root_path_redirection_enabled: "{{ not matrix_static_files_file_index_html_enabled }}"
  5045. matrix_static_files_container_labels_base_domain_root_path_redirection_url: "{{ ('https://' if matrix_playbook_ssl_enabled else 'http://') + matrix_server_fqn_matrix }}/${1}"
  5046. matrix_static_files_file_matrix_client_property_io_element_jitsi_preferred_domain: "{{ matrix_server_fqn_jitsi if jitsi_enabled else '' }}"
  5047. matrix_static_files_file_matrix_client_property_org_matrix_msc2965_authentication_enabled: "{{ matrix_authentication_service_enabled }}"
  5048. matrix_static_files_file_matrix_client_property_org_matrix_msc2965_authentication_issuer: "{{ matrix_authentication_service_config_http_issuer if matrix_authentication_service_enabled else '' }}"
  5049. matrix_static_files_file_matrix_client_property_org_matrix_msc2965_authentication_account: "{{ matrix_authentication_service_account_management_url if matrix_authentication_service_enabled else '' }}"
  5050. matrix_static_files_file_matrix_client_property_m_tile_server_entries_enabled: "{{ matrix_client_element_location_sharing_enabled }}"
  5051. matrix_static_files_file_matrix_client_property_m_tile_server_map_style_url: "{{ ('https://' if matrix_playbook_ssl_enabled else 'http://') + matrix_server_fqn_element }}/map_style.json"
  5052. # We set this regardless of whether Ketesa is enabled, because people may wish to use a hosted (externally) Ketesa installation and still have it auto-configured.
  5053. matrix_static_files_file_matrix_client_property_cc_etke_ketesa_auto: "{{ matrix_ketesa_configuration if matrix_homeserver_implementation == 'synapse' else {} }}"
  5054. matrix_static_files_file_matrix_client_property_org_matrix_msc4143_rtc_foci_enabled: "{{ matrix_livekit_jwt_service_enabled }}"
  5055. matrix_static_files_file_matrix_client_property_org_matrix_msc4143_rtc_foci_auto: |-
  5056. {{
  5057. (
  5058. [{'type': 'livekit', 'livekit_service_url': matrix_livekit_jwt_service_public_url}] if matrix_livekit_jwt_service_enabled else []
  5059. )
  5060. }}
  5061. # Advertise all enabled and exposed mautrix bridges for auto-discovery by tools like Mautrix Manager.
  5062. # A bridge's public address is only reachable when the playbook attaches its Traefik labels and emits the exposure router,
  5063. # so we gate on these in addition to the bridge being enabled.
  5064. matrix_static_files_file_matrix_mautrix_property_fi_mau_bridges_auto: |-
  5065. {{
  5066. [
  5067. matrix_bridge_beeper_line_bridge_public_address if (matrix_bridge_beeper_line_enabled and matrix_bridge_beeper_line_container_labels_traefik_enabled and matrix_bridge_beeper_line_container_labels_exposure_enabled) else '',
  5068. matrix_bridge_mautrix_bluesky_appservice_public_address if (matrix_bridge_mautrix_bluesky_enabled and matrix_bridge_mautrix_bluesky_container_labels_traefik_enabled and matrix_bridge_mautrix_bluesky_container_labels_exposure_enabled) else '',
  5069. matrix_bridge_mautrix_gmessages_bridge_public_address if (matrix_bridge_mautrix_gmessages_enabled and matrix_bridge_mautrix_gmessages_container_labels_traefik_enabled and matrix_bridge_mautrix_gmessages_container_labels_exposure_enabled) else '',
  5070. matrix_bridge_mautrix_gvoice_bridge_public_address if (matrix_bridge_mautrix_gvoice_enabled and matrix_bridge_mautrix_gvoice_container_labels_traefik_enabled and matrix_bridge_mautrix_gvoice_container_labels_exposure_enabled) else '',
  5071. matrix_bridge_mautrix_linkedin_bridge_public_address if (matrix_bridge_mautrix_linkedin_enabled and matrix_bridge_mautrix_linkedin_container_labels_traefik_enabled and matrix_bridge_mautrix_linkedin_container_labels_exposure_enabled) else '',
  5072. matrix_bridge_mautrix_meta_instagram_bridge_public_address if (matrix_bridge_mautrix_meta_instagram_enabled and matrix_bridge_mautrix_meta_instagram_container_labels_traefik_enabled and matrix_bridge_mautrix_meta_instagram_container_labels_exposure_enabled) else '',
  5073. matrix_bridge_mautrix_meta_messenger_bridge_public_address if (matrix_bridge_mautrix_meta_messenger_enabled and matrix_bridge_mautrix_meta_messenger_container_labels_traefik_enabled and matrix_bridge_mautrix_meta_messenger_container_labels_exposure_enabled) else '',
  5074. matrix_bridge_mautrix_signal_bridge_public_address if (matrix_bridge_mautrix_signal_enabled and matrix_bridge_mautrix_signal_container_labels_traefik_enabled and matrix_bridge_mautrix_signal_container_labels_exposure_enabled) else '',
  5075. matrix_bridge_mautrix_slack_bridge_public_address if (matrix_bridge_mautrix_slack_enabled and matrix_bridge_mautrix_slack_container_labels_traefik_enabled and matrix_bridge_mautrix_slack_container_labels_exposure_enabled) else '',
  5076. matrix_bridge_mautrix_telegram_bridge_public_address if (matrix_bridge_mautrix_telegram_enabled and matrix_bridge_mautrix_telegram_container_labels_traefik_enabled and matrix_bridge_mautrix_telegram_container_labels_exposure_enabled) else '',
  5077. matrix_bridge_mautrix_twitter_appservice_public_address if (matrix_bridge_mautrix_twitter_enabled and matrix_bridge_mautrix_twitter_container_labels_traefik_enabled and matrix_bridge_mautrix_twitter_container_labels_exposure_enabled) else '',
  5078. matrix_bridge_mautrix_whatsapp_bridge_public_address if (matrix_bridge_mautrix_whatsapp_enabled and matrix_bridge_mautrix_whatsapp_container_labels_traefik_enabled and matrix_bridge_mautrix_whatsapp_container_labels_exposure_enabled) else '',
  5079. ] | select | list
  5080. }}
  5081. matrix_static_files_file_matrix_server_property_m_server: "{{ matrix_server_fqn_matrix_federation }}:{{ matrix_federation_public_port }}"
  5082. matrix_static_files_scheme: "{{ 'https' if matrix_playbook_ssl_enabled else 'http' }}"
  5083. matrix_static_files_self_check_hostname_matrix: "{{ matrix_server_fqn_matrix }}"
  5084. matrix_static_files_self_check_hostname_identity: "{{ matrix_domain }}"
  5085. ########################################################################
  5086. # #
  5087. # /matrix-static-files #
  5088. # #
  5089. ########################################################################
  5090. ########################################################################
  5091. # #
  5092. # container-socket-proxy #
  5093. # #
  5094. ########################################################################
  5095. container_socket_proxy_enabled: "{{ matrix_playbook_reverse_proxy_type == 'playbook-managed-traefik' }}"
  5096. container_socket_proxy_identifier: matrix-container-socket-proxy
  5097. container_socket_proxy_base_path: "{{ matrix_base_data_path }}/container-socket-proxy"
  5098. container_socket_proxy_uid: "{{ matrix_user_uid }}"
  5099. container_socket_proxy_gid: "{{ matrix_user_gid }}"
  5100. # Traefik requires read access to the containers APIs to do its job
  5101. container_socket_proxy_api_containers_enabled: true
  5102. container_socket_proxy_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else container_socket_proxy_container_image_registry_prefix_upstream_default }}"
  5103. ########################################################################
  5104. # #
  5105. # /container-socket-proxy #
  5106. # #
  5107. ########################################################################
  5108. ########################################################################
  5109. # #
  5110. # traefik #
  5111. # #
  5112. ########################################################################
  5113. traefik_enabled: "{{ matrix_playbook_reverse_proxy_type == 'playbook-managed-traefik' }}"
  5114. traefik_identifier: matrix-traefik
  5115. traefik_base_path: "{{ matrix_base_data_path }}/traefik"
  5116. traefik_uid: "{{ matrix_user_uid }}"
  5117. traefik_gid: "{{ matrix_user_gid }}"
  5118. # It's common for setups to deal with large file uploads which may take longer than the default readTimeout (60s).
  5119. # This override (for the `web` entrypoint) also cascades to overriding the `web-secure` entrypoint and the `matrix-federation` entrypoint.
  5120. traefik_config_entrypoint_web_transport_respondingTimeouts_readTimeout: 300s
  5121. traefik_additional_entrypoints_auto: |
  5122. {{
  5123. ([matrix_playbook_public_matrix_federation_api_traefik_entrypoint_definition] if matrix_playbook_public_matrix_federation_api_traefik_entrypoint_enabled else [])
  5124. +
  5125. ([matrix_playbook_internal_matrix_client_api_traefik_entrypoint_definition] if matrix_playbook_internal_matrix_client_api_traefik_entrypoint_enabled else [])
  5126. +
  5127. ([matrix_playbook_livekit_turn_traefik_entrypoint_definition] if matrix_playbook_livekit_turn_traefik_entrypoint_enabled else [])
  5128. }}
  5129. traefik_config_providers_docker_endpoint: "{{ container_socket_proxy_endpoint if container_socket_proxy_enabled else 'unix:///var/run/docker.sock' }}"
  5130. traefik_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else traefik_container_image_registry_prefix_upstream_default }}"
  5131. traefik_container_additional_networks_auto: |
  5132. {{
  5133. ([container_socket_proxy_container_network] if container_socket_proxy_enabled else [])
  5134. }}
  5135. traefik_systemd_required_services_list: |
  5136. {{
  5137. ([devture_systemd_docker_base_docker_service_name])
  5138. +
  5139. ([container_socket_proxy_identifier + '.service'] if container_socket_proxy_enabled else [])
  5140. }}
  5141. traefik_additional_domains_to_obtain_certificates_for_auto: |
  5142. {{
  5143. ([coturn_hostname] if (coturn_enabled and coturn_tls_enabled and coturn_hostname != matrix_server_fqn_matrix) else [])
  5144. }}
  5145. ########################################################################
  5146. # #
  5147. # /traefik #
  5148. # #
  5149. ########################################################################
  5150. ########################################################################
  5151. # #
  5152. # traefik_certs_dumper #
  5153. # #
  5154. ########################################################################
  5155. traefik_certs_dumper_enabled: "{{ (matrix_playbook_reverse_proxy_type == 'playbook-managed-traefik' and traefik_config_entrypoint_web_secure_enabled and traefik_config_certificatesResolvers_acme_enabled) or matrix_playbook_reverse_proxy_type == 'other-traefik-container' }}"
  5156. traefik_certs_dumper_identifier: matrix-traefik-certs-dumper
  5157. traefik_certs_dumper_base_path: "{{ matrix_base_data_path }}/traefik-certs-dumper"
  5158. traefik_certs_dumper_uid: "{{ matrix_user_uid }}"
  5159. traefik_certs_dumper_gid: "{{ matrix_user_gid }}"
  5160. traefik_certs_dumper_ssl_path: "{{ traefik_ssl_dir_path if traefik_enabled else '' }}"
  5161. # We make the certs dumper require the Traefik service (not just docker.service),
  5162. # because when both restart simultaneously (e.g. in all-at-once mode), Traefik may
  5163. # momentarily truncate or reinitialize acme.json, causing the certs dumper to read
  5164. # an empty file and panic. By requiring Traefik, the certs dumper only starts after
  5165. # Traefik is fully ready and acme.json is stable.
  5166. traefik_certs_dumper_systemd_required_services_list_auto: |
  5167. {{
  5168. ([traefik_identifier + '.service'] if traefik_enabled else [])
  5169. }}
  5170. traefik_certs_dumper_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else traefik_certs_dumper_container_image_registry_prefix_upstream_default }}"
  5171. ########################################################################
  5172. # #
  5173. # /traefik_certs_dumper #
  5174. # #
  5175. ########################################################################
  5176. ########################################################################
  5177. # #
  5178. # matrix-element-admin #
  5179. # #
  5180. ########################################################################
  5181. # We don't enable this by default.
  5182. matrix_element_admin_enabled: false
  5183. matrix_element_admin_scheme: "{{ 'https' if matrix_playbook_ssl_enabled else 'http' }}"
  5184. matrix_element_admin_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_element_admin_container_image_registry_prefix_upstream_default }}"
  5185. matrix_element_admin_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm64'] }}"
  5186. matrix_element_admin_container_network: "{{ matrix_addons_container_network }}"
  5187. matrix_element_admin_container_additional_networks_auto: |-
  5188. {{
  5189. (
  5190. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  5191. +
  5192. ([matrix_playbook_reverse_proxyable_services_additional_network] if (matrix_playbook_reverse_proxyable_services_additional_network and matrix_element_admin_container_labels_traefik_enabled) else [])
  5193. ) | unique
  5194. }}
  5195. matrix_element_admin_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  5196. matrix_element_admin_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  5197. matrix_element_admin_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  5198. matrix_element_admin_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  5199. matrix_element_admin_systemd_required_services_list_auto: "{{ matrix_addons_homeserver_systemd_services_list }}"
  5200. ######################################################################
  5201. # #
  5202. # /matrix-element-admin #
  5203. # #
  5204. ######################################################################
  5205. ########################################################################
  5206. # #
  5207. # matrix-element-call #
  5208. # #
  5209. ########################################################################
  5210. matrix_element_call_enabled: false
  5211. matrix_element_call_scheme: "{{ 'https' if matrix_playbook_ssl_enabled else 'http' }}"
  5212. matrix_element_call_container_network: "{{ matrix_addons_container_network }}"
  5213. matrix_element_call_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_element_call_container_image_registry_prefix_upstream_default }}"
  5214. matrix_element_call_container_additional_networks_auto: "{{ [matrix_playbook_reverse_proxyable_services_additional_network] if (matrix_element_call_container_labels_traefik_enabled and matrix_playbook_reverse_proxyable_services_additional_network) else [] }}"
  5215. matrix_element_call_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  5216. matrix_element_call_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  5217. matrix_element_call_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  5218. matrix_element_call_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  5219. matrix_element_call_config_livekit_livekit_service_url: "{{ matrix_livekit_jwt_service_public_url if matrix_livekit_jwt_service_enabled else '' }}"
  5220. ########################################################################
  5221. # #
  5222. # /matrix-element-call #
  5223. # #
  5224. ########################################################################
  5225. ########################################################################
  5226. # #
  5227. # livekit-server #
  5228. # #
  5229. ########################################################################
  5230. livekit_server_enabled: "{{ matrix_rtc_enabled }}"
  5231. livekit_server_identifier: matrix-livekit-server
  5232. livekit_server_uid: "{{ matrix_user_uid }}"
  5233. livekit_server_gid: "{{ matrix_user_gid }}"
  5234. livekit_server_base_path: "{{ matrix_base_data_path }}/livekit-server"
  5235. livekit_server_hostname: "{{ matrix_server_fqn_matrix }}"
  5236. livekit_server_path_prefix: "/livekit-server"
  5237. livekit_server_container_image_self_build: "{{ matrix_architecture not in ['arm64', 'amd64'] }}"
  5238. livekit_server_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else livekit_server_container_image_registry_prefix_upstream_default }}"
  5239. livekit_server_container_network: "{{ matrix_addons_container_network }}"
  5240. livekit_server_container_additional_networks_auto: "{{ [matrix_playbook_reverse_proxyable_services_additional_network] if (livekit_server_container_labels_traefik_enabled and matrix_playbook_reverse_proxyable_services_additional_network) else [] }}"
  5241. # We expose LiveKit TURN/TLS via Traefik on a dedicated TCP entrypoint.
  5242. matrix_playbook_livekit_turn_traefik_entrypoint_enabled: "{{ matrix_playbook_reverse_proxy_type == 'playbook-managed-traefik' and livekit_server_config_turn_enabled and livekit_server_config_turn_external_tls and livekit_server_container_labels_traefik_enabled }}"
  5243. matrix_playbook_livekit_turn_traefik_entrypoint_port: "{{ livekit_server_config_turn_tls_port }}"
  5244. matrix_playbook_livekit_turn_traefik_entrypoint_host_bind_port: "{{ (matrix_playbook_service_host_bind_interface_prefix ~ (matrix_playbook_livekit_turn_traefik_entrypoint_port | string)) if matrix_playbook_service_host_bind_interface_prefix else (matrix_playbook_livekit_turn_traefik_entrypoint_port | string) }}"
  5245. livekit_server_container_additional_volumes_auto: |
  5246. {{
  5247. (
  5248. [
  5249. {
  5250. 'src': (traefik_certs_dumper_dumped_certificates_path + '/' + livekit_server_config_turn_domain + '/certificate.crt'),
  5251. 'dst': livekit_server_config_turn_cert_file,
  5252. 'options': 'ro',
  5253. },
  5254. {
  5255. 'src': (traefik_certs_dumper_dumped_certificates_path + '/' + livekit_server_config_turn_domain + '/privatekey.key'),
  5256. 'dst': livekit_server_config_turn_key_file,
  5257. 'options': 'ro',
  5258. },
  5259. ] if (matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] and traefik_certs_dumper_enabled and livekit_server_config_turn_enabled and not (livekit_server_config_turn_external_tls | bool) and (livekit_server_config_turn_cert_file and livekit_server_config_turn_key_file)) else []
  5260. )
  5261. }}
  5262. livekit_server_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  5263. livekit_server_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  5264. livekit_server_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  5265. livekit_server_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  5266. livekit_server_container_labels_turn_traefik_enabled: "{{ matrix_playbook_livekit_turn_traefik_entrypoint_enabled }}"
  5267. livekit_server_container_labels_turn_traefik_entrypoints: "{{ matrix_playbook_livekit_turn_traefik_entrypoint_name }}"
  5268. livekit_server_container_labels_turn_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  5269. livekit_server_container_labels_public_metrics_middleware_basic_auth_enabled: "{{ matrix_metrics_exposure_http_basic_auth_enabled }}"
  5270. livekit_server_container_labels_public_metrics_middleware_basic_auth_users: "{{ matrix_metrics_exposure_http_basic_auth_users }}"
  5271. livekit_server_metrics_proxying_enabled: "{{ livekit_server_config_prometheus_enabled and matrix_metrics_exposure_enabled }}"
  5272. livekit_server_metrics_proxying_hostname: "{{ matrix_metrics_exposure_hostname }}"
  5273. livekit_server_metrics_proxying_path_prefix: "{{ matrix_metrics_exposure_path_prefix }}/livekit-server"
  5274. livekit_server_config_prometheus_enabled: "{{ prometheus_enabled or matrix_metrics_exposure_enabled }}"
  5275. livekit_server_config_keys_auto: |-
  5276. {{
  5277. {}
  5278. | combine(
  5279. {matrix_livekit_jwt_service_environment_variable_livekit_key: matrix_livekit_jwt_service_environment_variable_livekit_secret}
  5280. if matrix_livekit_jwt_service_enabled else {}
  5281. )
  5282. }}
  5283. # We only wish for matrix-livekit-jwt-service to create rooms, only for users on trusted homeservers.
  5284. # See `matrix_livekit_jwt_service_environment_variable_livekit_full_access_homeservers`.
  5285. #
  5286. # Ref:
  5287. # - https://github.com/element-hq/lk-jwt-service/releases/tag/v0.3.0
  5288. # - https://github.com/livekit/livekit/blob/5e483e7554e5afbf254acf84e3ec0aa6e108e758/config-sample.yaml#L168-L170
  5289. # - https://github.com/mother-of-all-self-hosting/ansible-role-livekit-server/commit/2a1b04552634097bdd26d472502a8f5bf1b8528f
  5290. livekit_server_config_room_auto_create: false
  5291. # The playbook intentionally uses a non-standard port than the default used by the role (5349),
  5292. # because Coturn is already using that port.
  5293. # Note that TURN is not enabled by default. See `livekit_server_config_turn_enabled`.
  5294. livekit_server_config_turn_tls_port: 5350
  5295. # The playbook intentionally uses a non-standard port than the default used by the role (3478),
  5296. # because Coturn is already using that port.
  5297. # Note that TURN is not enabled by default. See `livekit_server_config_turn_enabled`.
  5298. livekit_server_config_turn_udp_port: 3479
  5299. # In this mode, Traefik terminates TURN/TLS and forwards plaintext TCP to LiveKit's `turn.tls_port`.
  5300. # We only enable it automatically when Traefik is managed by this playbook.
  5301. livekit_server_config_turn_external_tls: "{{ matrix_playbook_reverse_proxy_type == 'playbook-managed-traefik' and matrix_playbook_ssl_enabled }}"
  5302. # TURN stays enabled for either mode:
  5303. # - external TLS termination by playbook-managed Traefik
  5304. # - in-container TLS using certificates from Traefik Certs Dumper
  5305. livekit_server_config_turn_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] and (livekit_server_config_turn_external_tls or traefik_certs_dumper_enabled) }}"
  5306. livekit_server_config_turn_cert_file: |-
  5307. {{
  5308. {
  5309. 'playbook-managed-traefik': ('/certificate.crt' if traefik_certs_dumper_enabled and not (livekit_server_config_turn_external_tls | bool) else ''),
  5310. 'other-traefik-container': ('/certificate.crt' if traefik_certs_dumper_enabled and not (livekit_server_config_turn_external_tls | bool) else ''),
  5311. 'none': '',
  5312. }[matrix_playbook_reverse_proxy_type]
  5313. }}
  5314. livekit_server_config_turn_key_file: |-
  5315. {{
  5316. {
  5317. 'playbook-managed-traefik': ('/privatekey.key' if traefik_certs_dumper_enabled and not (livekit_server_config_turn_external_tls | bool) else ''),
  5318. 'other-traefik-container': ('/privatekey.key' if traefik_certs_dumper_enabled and not (livekit_server_config_turn_external_tls | bool) else ''),
  5319. 'none': '',
  5320. }[matrix_playbook_reverse_proxy_type]
  5321. }}
  5322. livekit_server_systemd_required_services_list_auto: |
  5323. {{
  5324. ([traefik_certs_dumper_identifier + '-wait-for-domain@' + livekit_server_config_turn_domain + '.service'] if matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] and traefik_certs_dumper_enabled and livekit_server_config_turn_enabled and not (livekit_server_config_turn_external_tls | bool) else [])
  5325. }}
  5326. ########################################################################
  5327. # #
  5328. # /livekit-server #
  5329. # #
  5330. ########################################################################
  5331. ########################################################################
  5332. # #
  5333. # matrix-livekit-jwt-service #
  5334. # #
  5335. ########################################################################
  5336. matrix_livekit_jwt_service_enabled: "{{ matrix_rtc_enabled and livekit_server_enabled }}"
  5337. matrix_livekit_jwt_service_scheme: "{{ 'https' if matrix_playbook_ssl_enabled else 'http' }}"
  5338. matrix_livekit_jwt_service_hostname: "{{ matrix_server_fqn_matrix }}"
  5339. matrix_livekit_jwt_service_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm64'] }}"
  5340. matrix_livekit_jwt_service_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_livekit_jwt_service_container_image_registry_prefix_upstream_default }}"
  5341. matrix_livekit_jwt_service_container_network: "{{ matrix_addons_container_network }}"
  5342. matrix_livekit_jwt_service_container_additional_networks_auto: |
  5343. {{
  5344. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  5345. +
  5346. ([matrix_playbook_reverse_proxyable_services_additional_network] if (matrix_livekit_jwt_service_container_labels_traefik_enabled and matrix_playbook_reverse_proxyable_services_additional_network) else [])
  5347. }}
  5348. matrix_livekit_jwt_service_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  5349. matrix_livekit_jwt_service_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  5350. matrix_livekit_jwt_service_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  5351. matrix_livekit_jwt_service_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  5352. matrix_livekit_jwt_service_environment_variable_livekit_url: "{{ livekit_server_websocket_public_url }}"
  5353. # The service discovers where a homeserver's Client-Server API lives by fetching the `/.well-known/matrix/client`
  5354. # file of that homeserver's base domain over the public network.
  5355. # For our own homeserver, we already know the answer and can spare it the round trip, which would otherwise
  5356. # need to leave the server and come back to it.
  5357. # Other (federated) homeservers are still resolved via discovery.
  5358. matrix_livekit_jwt_service_environment_variable_livekit_cs_api_url_overrides_map_auto: "{{ {matrix_domain: matrix_addons_homeserver_client_api_url} }}"
  5359. matrix_livekit_jwt_service_environment_variable_livekit_key: "{{ (matrix_homeserver_generic_secret_key + ':lk.key') | hash('sha512') | to_uuid }}"
  5360. matrix_livekit_jwt_service_environment_variable_livekit_secret: "{{ (matrix_homeserver_generic_secret_key + ':lk.secret') | hash('sha512') | to_uuid }}"
  5361. ########################################################################
  5362. # #
  5363. # /matrix-livekit-jwt-service #
  5364. # #
  5365. ########################################################################