Matrix Docker Ansible eploy
No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.
 
 

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