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

6633 lines
362 KiB

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