Matrix Docker Ansible eploy
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

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