Matrix Docker Ansible eploy
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

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