Matrix Docker Ansible eploy
25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.
 
 

6631 satır
375 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_appservice_discord_config_path + '/registration.yaml,dst=/matrix-appservice-discord-registration.yaml,ro'] if matrix_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_appservice_irc_config_path + '/registration.yaml,dst=/matrix-appservice-irc-registration.yaml,ro'] if matrix_appservice_irc_enabled else [])
  82. +
  83. (['--mount type=bind,src=' + matrix_appservice_kakaotalk_config_path + '/registration.yaml,dst=/matrix-appservice-kakaotalk-registration.yaml,ro'] if matrix_appservice_kakaotalk_enabled else [])
  84. +
  85. (['--mount type=bind,src=' + matrix_appservice_slack_config_path + '/slack-registration.yaml,dst=/matrix-appservice-slack-registration.yaml,ro'] if matrix_appservice_slack_enabled else [])
  86. +
  87. (['--mount type=bind,src=' + matrix_appservice_webhooks_config_path + '/webhooks-registration.yaml,dst=/matrix-appservice-webhooks-registration.yaml,ro'] if matrix_appservice_webhooks_enabled else [])
  88. +
  89. (['--mount type=bind,src=' + matrix_beeper_linkedin_config_path + '/registration.yaml,dst=/matrix-beeper-linkedin-registration.yaml,ro'] if matrix_beeper_linkedin_enabled else [])
  90. +
  91. (['--mount type=bind,src=' + matrix_go_skype_bridge_config_path + '/registration.yaml,dst=/matrix-go-skype-bridge-registration.yaml,ro'] if matrix_go_skype_bridge_enabled else [])
  92. +
  93. (['--mount type=bind,src=' + matrix_wechat_config_path + '/registration.yaml,dst=/matrix-wechat-registration.yaml,ro'] if matrix_wechat_enabled else [])
  94. +
  95. (['--mount type=bind,src=' + matrix_heisenbridge_base_path + '/registration.yaml,dst=/heisenbridge-registration.yaml,ro'] if matrix_heisenbridge_enabled else [])
  96. +
  97. (['--mount type=bind,src=' + matrix_hookshot_base_path + '/registration.yml,dst=/hookshot-registration.yml,ro'] if matrix_hookshot_enabled else [])
  98. +
  99. (['--mount type=bind,src=' + matrix_mautrix_bluesky_config_path + '/registration.yaml,dst=/matrix-mautrix-bluesky-registration.yaml,ro'] if matrix_mautrix_bluesky_enabled else [])
  100. +
  101. (['--mount type=bind,src=' + matrix_mautrix_discord_config_path + '/registration.yaml,dst=/matrix-mautrix-discord-registration.yaml,ro'] if matrix_mautrix_discord_enabled else [])
  102. +
  103. (['--mount type=bind,src=' + matrix_mautrix_slack_config_path + '/registration.yaml,dst=/matrix-mautrix-slack-registration.yaml,ro'] if matrix_mautrix_slack_enabled else [])
  104. +
  105. (['--mount type=bind,src=' + matrix_mautrix_facebook_config_path + '/registration.yaml,dst=/matrix-mautrix-facebook-registration.yaml,ro'] if matrix_mautrix_facebook_enabled else [])
  106. +
  107. (['--mount type=bind,src=' + matrix_mautrix_googlechat_config_path + '/registration.yaml,dst=/matrix-mautrix-googlechat-registration.yaml,ro'] if matrix_mautrix_googlechat_enabled else [])
  108. +
  109. (['--mount type=bind,src=' + matrix_mautrix_instagram_config_path + '/registration.yaml,dst=/matrix-mautrix-instagram-registration.yaml,ro'] if matrix_mautrix_instagram_enabled else [])
  110. +
  111. (['--mount type=bind,src=' + matrix_mautrix_signal_config_path + '/registration.yaml,dst=/matrix-mautrix-signal-registration.yaml,ro'] if matrix_mautrix_signal_enabled else [])
  112. +
  113. (['--mount type=bind,src=' + matrix_mautrix_meta_messenger_config_path + '/registration.yaml,dst=/matrix-mautrix-meta-messenger-registration.yaml,ro'] if matrix_mautrix_meta_messenger_enabled else [])
  114. +
  115. (['--mount type=bind,src=' + matrix_mautrix_meta_instagram_config_path + '/registration.yaml,dst=/matrix-mautrix-meta-instagram-registration.yaml,ro'] if matrix_mautrix_meta_instagram_enabled else [])
  116. +
  117. (['--mount type=bind,src=' + matrix_mautrix_telegram_config_path + '/registration.yaml,dst=/matrix-mautrix-telegram-registration.yaml,ro'] if matrix_mautrix_telegram_enabled else [])
  118. +
  119. (['--mount type=bind,src=' + matrix_mautrix_twitter_config_path + '/registration.yaml,dst=/matrix-mautrix-twitter-registration.yaml,ro'] if matrix_mautrix_twitter_enabled else [])
  120. +
  121. (['--mount type=bind,src=' + matrix_mautrix_gmessages_config_path + '/registration.yaml,dst=/matrix-mautrix-gmessages-registration.yaml,ro'] if matrix_mautrix_gmessages_enabled else [])
  122. +
  123. (['--mount type=bind,src=' + matrix_mautrix_whatsapp_config_path + '/registration.yaml,dst=/matrix-mautrix-whatsapp-registration.yaml,ro'] if matrix_mautrix_whatsapp_enabled else [])
  124. +
  125. (['--mount type=bind,src=' + matrix_mautrix_wsproxy_config_path + '/androidsms-registration.yaml,dst=/matrix-mautrix-androidsms-registration.yaml,ro'] if matrix_mautrix_wsproxy_enabled else [])
  126. +
  127. (['--mount type=bind,src=' + matrix_mautrix_wsproxy_config_path + '/imessage-registration.yaml,dst=/matrix-mautrix-imessage-registration.yaml,ro'] if matrix_mautrix_wsproxy_enabled else [])
  128. +
  129. (['--mount type=bind,src=' + matrix_mx_puppet_discord_config_path + '/registration.yaml,dst=/matrix-mx-puppet-discord-registration.yaml,ro'] if matrix_mx_puppet_discord_enabled else [])
  130. +
  131. (['--mount type=bind,src=' + matrix_mx_puppet_groupme_config_path + '/registration.yaml,dst=/matrix-mx-puppet-groupme-registration.yaml,ro'] if matrix_mx_puppet_groupme_enabled else [])
  132. +
  133. (['--mount type=bind,src=' + matrix_mx_puppet_instagram_config_path + '/registration.yaml,dst=/matrix-mx-puppet-instagram-registration.yaml,ro'] if matrix_mx_puppet_instagram_enabled else [])
  134. +
  135. (['--mount type=bind,src=' + matrix_mx_puppet_slack_config_path + '/registration.yaml,dst=/matrix-mx-puppet-slack-registration.yaml,ro'] if matrix_mx_puppet_slack_enabled else [])
  136. +
  137. (['--mount type=bind,src=' + matrix_mx_puppet_steam_config_path + '/registration.yaml,dst=/matrix-mx-puppet-steam-registration.yaml,ro'] if matrix_mx_puppet_steam_enabled else [])
  138. +
  139. (['--mount type=bind,src=' + matrix_mx_puppet_twitter_config_path + '/registration.yaml,dst=/matrix-mx-puppet-twitter-registration.yaml,ro'] if matrix_mx_puppet_twitter_enabled else [])
  140. +
  141. (['--mount type=bind,src=' + matrix_sms_bridge_config_path + '/registration.yaml,dst=/matrix-sms-bridge-registration.yaml,ro'] if matrix_sms_bridge_enabled else [])
  142. +
  143. (['--mount type=bind,src=' + matrix_steam_bridge_config_path + '/registration.yaml,dst=/matrix-steam-bridge-registration.yaml,ro'] if matrix_steam_bridge_enabled else [])
  144. +
  145. (['--mount type=bind,src=' + matrix_cactus_comments_app_service_config_file + ',dst=/matrix-cactus-comments.yaml,ro'] if matrix_cactus_comments_enabled else [])
  146. }}
  147. matrix_homeserver_app_service_config_files_auto: |
  148. {{
  149. (['/matrix-appservice-discord-registration.yaml'] if matrix_appservice_discord_enabled else [])
  150. +
  151. (['/matrix-appservice-draupnir-for-all-registration.yaml'] if matrix_appservice_draupnir_for_all_enabled else [])
  152. +
  153. (['/matrix-appservice-double-puppet-registration.yaml'] if matrix_appservice_double_puppet_enabled else [])
  154. +
  155. (['/matrix-appservice-irc-registration.yaml'] if matrix_appservice_irc_enabled else [])
  156. +
  157. (['/matrix-appservice-kakaotalk-registration.yaml'] if matrix_appservice_kakaotalk_enabled else [])
  158. +
  159. (['/matrix-appservice-slack-registration.yaml'] if matrix_appservice_slack_enabled else [])
  160. +
  161. (['/matrix-appservice-webhooks-registration.yaml'] if matrix_appservice_webhooks_enabled else [])
  162. +
  163. (['/matrix-beeper-linkedin-registration.yaml'] if matrix_beeper_linkedin_enabled else [])
  164. +
  165. (['/matrix-go-skype-bridge-registration.yaml'] if matrix_go_skype_bridge_enabled else [])
  166. +
  167. (['/matrix-wechat-registration.yaml'] if matrix_wechat_enabled else [])
  168. +
  169. (['/heisenbridge-registration.yaml'] if matrix_heisenbridge_enabled else [])
  170. +
  171. (['/hookshot-registration.yml'] if matrix_hookshot_enabled else [])
  172. +
  173. (['/matrix-mautrix-bluesky-registration.yaml'] if matrix_mautrix_bluesky_enabled else [])
  174. +
  175. (['/matrix-mautrix-discord-registration.yaml'] if matrix_mautrix_discord_enabled else [])
  176. +
  177. (['/matrix-mautrix-slack-registration.yaml'] if matrix_mautrix_slack_enabled else [])
  178. +
  179. (['/matrix-mautrix-facebook-registration.yaml'] if matrix_mautrix_facebook_enabled else [])
  180. +
  181. (['/matrix-mautrix-googlechat-registration.yaml'] if matrix_mautrix_googlechat_enabled else [])
  182. +
  183. (['/matrix-mautrix-instagram-registration.yaml'] if matrix_mautrix_instagram_enabled else [])
  184. +
  185. (['/matrix-mautrix-signal-registration.yaml'] if matrix_mautrix_signal_enabled else [])
  186. +
  187. (['/matrix-mautrix-meta-messenger-registration.yaml'] if matrix_mautrix_meta_messenger_enabled else [])
  188. +
  189. (['/matrix-mautrix-meta-instagram-registration.yaml'] if matrix_mautrix_meta_instagram_enabled else [])
  190. +
  191. (['/matrix-mautrix-telegram-registration.yaml'] if matrix_mautrix_telegram_enabled else [])
  192. +
  193. (['/matrix-mautrix-twitter-registration.yaml'] if matrix_mautrix_twitter_enabled else [])
  194. +
  195. (['/matrix-mautrix-gmessages-registration.yaml'] if matrix_mautrix_gmessages_enabled else [])
  196. +
  197. (['/matrix-mautrix-whatsapp-registration.yaml'] if matrix_mautrix_whatsapp_enabled else [])
  198. +
  199. (['/matrix-mautrix-androidsms-registration.yaml'] if matrix_mautrix_wsproxy_enabled else [])
  200. +
  201. (['/matrix-mautrix-imessage-registration.yaml'] if matrix_mautrix_wsproxy_enabled else [])
  202. +
  203. (['/matrix-mx-puppet-discord-registration.yaml'] if matrix_mx_puppet_discord_enabled else [])
  204. +
  205. (['/matrix-mx-puppet-groupme-registration.yaml'] if matrix_mx_puppet_groupme_enabled else [])
  206. +
  207. (['/matrix-mx-puppet-instagram-registration.yaml'] if matrix_mx_puppet_instagram_enabled else [])
  208. +
  209. (['/matrix-mx-puppet-slack-registration.yaml'] if matrix_mx_puppet_slack_enabled else [])
  210. +
  211. (['/matrix-mx-puppet-steam-registration.yaml'] if matrix_mx_puppet_steam_enabled else [])
  212. +
  213. (['/matrix-mx-puppet-twitter-registration.yaml'] if matrix_mx_puppet_twitter_enabled else [])
  214. +
  215. (['/matrix-sms-bridge-registration.yaml'] if matrix_sms_bridge_enabled else [])
  216. +
  217. (['/matrix-cactus-comments.yaml'] if matrix_cactus_comments_enabled else [])
  218. +
  219. (['/matrix-steam-bridge-registration.yaml'] if matrix_steam_bridge_enabled else [])
  220. }}
  221. 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 }}"
  222. 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 }}"
  223. matrix_addons_homeserver_systemd_services_list: "{{ ([traefik_identifier + '.service'] if matrix_playbook_reverse_proxy_type == 'playbook-managed-traefik' else []) if matrix_playbook_internal_matrix_client_api_traefik_entrypoint_enabled else matrix_homeserver_systemd_services_list }}"
  224. # Starting from version `0.6.0` Conduit natively supports some sync v3 (sliding-sync) features.
  225. matrix_homeserver_sliding_sync_url: "{{ matrix_sliding_sync_base_url if matrix_sliding_sync_enabled else (matrix_homeserver_url if matrix_homeserver_implementation in ['conduit', 'conduwuit', 'continuwuity'] else '') }}"
  226. ########################################################################
  227. # #
  228. # /base #
  229. # #
  230. ########################################################################
  231. ########################################################################
  232. # #
  233. # com.devture.ansible.role.systemd_service_manager #
  234. # #
  235. ########################################################################
  236. # This list is not exhaustive and final.
  237. # Synapse workers are still injected into the list at runtime.
  238. # Additional JVB workers (jitsi_jvb.yml — roles/galaxy/jitsi/tasks/init_additional_jvb.yml) override this variable at runtime as well.
  239. #
  240. # Priority levels are like this:
  241. # - Traefik starts first with a level of 250, so that:
  242. # - it can get an early start on obtaining SSL certificates and routing to other services as soon as they start (later)
  243. # - so that addon services (starting later) can communicte with the homeserver via Traefik's internal entrypoint
  244. # (see `matrix_playbook_internal_matrix_client_api_traefik_entrypoint_enabled`)
  245. # - core services (the homeserver) get a level of ~1000
  246. # - services that the homeserver depends on (database, Redis, ntfy, coturn, etc.) get a lower level — between 500 and 1000
  247. # - coturn gets a higher level if `devture_systemd_service_manager_service_restart_mode == 'one-by-one'` to intentionally delay it, because:
  248. # - starting services one by one means that the service manager role waits for each service to fully start before proceeding to the next one
  249. # - if coturn has a lower priority than the homeserver, it would be started before it
  250. # - since coturn is started before the homeserver, there's no container label telling Traefik to get a `matrix.example.com` certificate
  251. # - 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.
  252. # - only later, when the homeserver actually starts, would that certificate be fetched and dumped
  253. # - reverse-proxying services get level 3000
  254. # - Matrix utility services (bridges, bots) get a level of 2000/2200, so that:
  255. # - they can start before the reverse-proxy
  256. # - so that, when the reverse-proxy is up (Matrix is up), all bots and bridges can be interacted with
  257. # - monitoring services (Prometheus, Grafana, …) get a level of 4000 — they can start later than all-of-Matrix
  258. # - services which aren't time-sensitive (various crons and timers) get a level of 5000 — they can start later than all-of-Matrix
  259. devture_systemd_service_manager_services_list_auto: |
  260. {{
  261. ([{'name': (backup_borg_identifier + '.timer'), 'priority': 5000, 'groups': ['matrix', 'backup', 'borg']}] if backup_borg_enabled else [])
  262. +
  263. ([{'name': 'matrix-alertmanager-receiver.service', 'priority': 2200, 'groups': ['matrix', 'alertmanager-receiver']}] if matrix_alertmanager_receiver_enabled else [])
  264. +
  265. ([{'name': 'matrix-authentication-service.service', 'priority': 2200, 'groups': ['matrix', 'matrix-authentication-service']}] if matrix_authentication_service_enabled else [])
  266. +
  267. ([{'name': 'matrix-bot-buscarron.service', 'priority': 2200, 'groups': ['matrix', 'bots', 'buscarron', 'bot-buscarron']}] if matrix_bot_buscarron_enabled else [])
  268. +
  269. ([{'name': 'matrix-bot-baibot.service', 'priority': 2200, 'groups': ['matrix', 'bots', 'baibot', 'bot-baibot']}] if matrix_bot_baibot_enabled else [])
  270. +
  271. ([{'name': 'matrix-bot-go-neb.service', 'priority': 2200, 'groups': ['matrix', 'bots', 'go-neb', 'bot-go-neb']}] if matrix_bot_go_neb_enabled else [])
  272. +
  273. ([{'name': 'matrix-bot-honoroit.service', 'priority': 2200, 'groups': ['matrix', 'bots', 'honoroit', 'bot-honoroit']}] if matrix_bot_honoroit_enabled else [])
  274. +
  275. ([{'name': 'matrix-bot-matrix-registration-bot.service', 'priority': 2200, 'groups': ['matrix', 'bots', 'registration-bot', 'bot-matrix-registration-bot']}] if matrix_bot_matrix_registration_bot_enabled else [])
  276. +
  277. ([{'name': 'matrix-bot-matrix-reminder-bot.service', 'priority': 2200, 'groups': ['matrix', 'bots', 'reminder-bot', 'bot-matrix-reminder-bot']}] if matrix_bot_matrix_reminder_bot_enabled else [])
  278. +
  279. ([{'name': 'matrix-bot-maubot.service', 'priority': 2200, 'groups': ['matrix', 'bots', 'maubot', 'bot-maubot']}] if matrix_bot_maubot_enabled else [])
  280. +
  281. ([{'name': 'matrix-bot-mjolnir.service', 'priority': 4000, 'groups': ['matrix', 'bots', 'mjolnir', 'bot-mjolnir']}] if matrix_bot_mjolnir_enabled else [])
  282. +
  283. ([{'name': 'matrix-bot-draupnir.service', 'priority': 4000, 'groups': ['matrix', 'bots', 'draupnir', 'bot-draupnir']}] if matrix_bot_draupnir_enabled else [])
  284. +
  285. ([{'name': 'matrix-bot-chatgpt.service', 'priority': 2200, 'groups': ['matrix', 'bots', 'chatgpt', 'bot-chatgpt']}] if matrix_bot_chatgpt_enabled else [])
  286. +
  287. ([{'name': 'matrix-appservice-discord.service', 'priority': 2000, 'groups': ['matrix', 'bridges', 'appservice-discord']}] if matrix_appservice_discord_enabled else [])
  288. +
  289. ([{'name': 'matrix-appservice-draupnir-for-all.service', 'priority': 4000, 'groups': ['matrix', 'bridges', 'draupnir-for-all', 'appservice-draupnir-for-all']}] if matrix_appservice_draupnir_for_all_enabled else [])
  290. +
  291. ([{'name': 'matrix-appservice-irc.service', 'priority': 2000, 'groups': ['matrix', 'bridges', 'appservice-irc']}] if matrix_appservice_irc_enabled else [])
  292. +
  293. ([{'name': 'matrix-appservice-kakaotalk.service', 'priority': 2000, 'groups': ['matrix', 'bridges', 'appservice-kakaotalk']}] if matrix_appservice_kakaotalk_enabled else [])
  294. +
  295. ([{'name': 'matrix-appservice-kakaotalk-node.service', 'priority': 1900, 'groups': ['matrix', 'bridges', 'appservice-kakaotalk', 'appservice-kakaotalk-node']}] if matrix_appservice_kakaotalk_enabled else [])
  296. +
  297. ([{'name': 'matrix-appservice-slack.service', 'priority': 2000, 'groups': ['matrix', 'bridges', 'appservice-slack']}] if matrix_appservice_slack_enabled else [])
  298. +
  299. ([{'name': 'matrix-appservice-webhooks.service', 'priority': 2000, 'groups': ['matrix', 'bridges', 'appservice-webhooks']}] if matrix_appservice_webhooks_enabled else [])
  300. +
  301. ([{'name': 'matrix-beeper-linkedin.service', 'priority': 2000, 'groups': ['matrix', 'bridges', 'beeper-linkedin']}] if matrix_beeper_linkedin_enabled else [])
  302. +
  303. ([{'name': 'matrix-go-skype-bridge.service', 'priority': 2000, 'groups': ['matrix', 'bridges', 'go-skype']}] if matrix_go_skype_bridge_enabled else [])
  304. +
  305. ([{'name': 'matrix-wechat.service', 'priority': 2000, 'groups': ['matrix', 'bridges', 'wechat']}] if matrix_wechat_enabled else [])
  306. +
  307. ([{'name': 'matrix-wechat-agent.service', 'priority': 2000, 'groups': ['matrix', 'bridges', 'wechat']}] if matrix_wechat_enabled else [])
  308. +
  309. ([{'name': 'matrix-heisenbridge.service', 'priority': 2000, 'groups': ['matrix', 'bridges', 'heisenbridge']}] if matrix_heisenbridge_enabled else [])
  310. +
  311. ([{'name': 'matrix-hookshot.service', 'priority': 2000, 'groups': ['matrix', 'bridges', 'hookshot', 'bridge-hookshot']}] if matrix_hookshot_enabled else [])
  312. +
  313. ([{'name': 'matrix-mautrix-bluesky.service', 'priority': 2000, 'groups': ['matrix', 'bridges', 'mautrix-bluesky']}] if matrix_mautrix_bluesky_enabled else [])
  314. +
  315. ([{'name': 'matrix-mautrix-discord.service', 'priority': 2000, 'groups': ['matrix', 'bridges', 'mautrix-discord']}] if matrix_mautrix_discord_enabled else [])
  316. +
  317. ([{'name': 'matrix-mautrix-slack.service', 'priority': 2000, 'groups': ['matrix', 'bridges', 'mautrix-slack']}] if matrix_mautrix_slack_enabled else [])
  318. +
  319. ([{'name': 'matrix-mautrix-facebook.service', 'priority': 2000, 'groups': ['matrix', 'bridges', 'mautrix-facebook']}] if matrix_mautrix_facebook_enabled else [])
  320. +
  321. ([{'name': 'matrix-mautrix-googlechat.service', 'priority': 2000, 'groups': ['matrix', 'bridges', 'mautrix-googlechat']}] if matrix_mautrix_googlechat_enabled else [])
  322. +
  323. ([{'name': 'matrix-mautrix-instagram.service', 'priority': 2000, 'groups': ['matrix', 'bridges', 'mautrix-instagram']}] if matrix_mautrix_instagram_enabled else [])
  324. +
  325. ([{'name': 'matrix-mautrix-signal.service', 'priority': 2000, 'groups': ['matrix', 'bridges', 'mautrix-signal', 'mautrix-signal']}] if matrix_mautrix_signal_enabled else [])
  326. +
  327. ([{'name': (matrix_mautrix_meta_messenger_identifier + '.service'), 'priority': 2000, 'groups': ['matrix', 'bridges', 'mautrix-meta', 'mautrix-meta-messenger']}] if matrix_mautrix_meta_messenger_enabled else [])
  328. +
  329. ([{'name': (matrix_mautrix_meta_instagram_identifier + '.service'), 'priority': 2000, 'groups': ['matrix', 'bridges', 'mautrix-meta', 'mautrix-meta-instagram']}] if matrix_mautrix_meta_instagram_enabled else [])
  330. +
  331. ([{'name': 'matrix-mautrix-telegram.service', 'priority': 2000, 'groups': ['matrix', 'bridges', 'mautrix-telegram']}] if matrix_mautrix_telegram_enabled else [])
  332. +
  333. ([{'name': 'matrix-mautrix-twitter.service', 'priority': 2000, 'groups': ['matrix', 'bridges', 'mautrix-twitter']}] if matrix_mautrix_twitter_enabled else [])
  334. +
  335. ([{'name': 'matrix-mautrix-gmessages.service', 'priority': 2000, 'groups': ['matrix', 'bridges', 'mautrix-gmessages']}] if matrix_mautrix_gmessages_enabled else [])
  336. +
  337. ([{'name': 'matrix-mautrix-whatsapp.service', 'priority': 2000, 'groups': ['matrix', 'bridges', 'mautrix-whatsapp']}] if matrix_mautrix_whatsapp_enabled else [])
  338. +
  339. ([{'name': 'matrix-mautrix-wsproxy.service', 'priority': 2000, 'groups': ['matrix', 'bridges', 'mautrix-wsproxy']}] if matrix_mautrix_wsproxy_enabled else [])
  340. +
  341. ([{'name': 'matrix-mautrix-wsproxy-syncproxy.service', 'priority': 2000, 'groups': ['matrix', 'bridges', 'mautrix-wsproxy-syncproxy']}] if matrix_mautrix_wsproxy_enabled else [])
  342. +
  343. ([{'name': 'matrix-mx-puppet-discord.service', 'priority': 2000, 'groups': ['matrix', 'bridges', 'mx-puppet-discord']}] if matrix_mx_puppet_discord_enabled else [])
  344. +
  345. ([{'name': 'matrix-mx-puppet-groupme.service', 'priority': 2000, 'groups': ['matrix', 'bridges', 'mx-puppet-groupme']}] if matrix_mx_puppet_groupme_enabled else [])
  346. +
  347. ([{'name': 'matrix-mx-puppet-instagram.service', 'priority': 2000, 'groups': ['matrix', 'bridges', 'mx-puppet-instagram']}] if matrix_mx_puppet_instagram_enabled else [])
  348. +
  349. ([{'name': 'matrix-mx-puppet-slack.service', 'priority': 2000, 'groups': ['matrix', 'bridges', 'mx-puppet-slack']}] if matrix_mx_puppet_slack_enabled else [])
  350. +
  351. ([{'name': 'matrix-mx-puppet-steam.service', 'priority': 2000, 'groups': ['matrix', 'bridges', 'mx-puppet-steam']}] if matrix_mx_puppet_steam_enabled else [])
  352. +
  353. ([{'name': 'matrix-mx-puppet-twitter.service', 'priority': 2000, 'groups': ['matrix', 'bridges', 'mx-puppet-twitter']}] if matrix_mx_puppet_twitter_enabled else [])
  354. +
  355. ([{'name': 'matrix-postmoogle.service', 'priority': 2200, 'groups': ['matrix', 'bridges', 'postmoogle']}] if matrix_postmoogle_enabled else [])
  356. +
  357. ([{'name': 'matrix-sms-bridge.service', 'priority': 2000, 'groups': ['matrix', 'bridges', 'sms']}] if matrix_sms_bridge_enabled else [])
  358. +
  359. ([{'name': 'matrix-steam-bridge.service', 'priority': 2000, 'groups': ['matrix', 'bridges', 'matrix-steam-bridge']}] if matrix_steam_bridge_enabled else [])
  360. +
  361. ([{'name': 'matrix-cactus-comments.service', 'priority': 2000, 'groups': ['matrix', 'cactus-comments']}] if matrix_cactus_comments_enabled else [])
  362. +
  363. ([{'name': 'matrix-cactus-comments-client.service', 'priority': 2000, 'groups': ['matrix', 'cactus-comments-client']}] if matrix_cactus_comments_client_enabled else [])
  364. +
  365. ([{'name': 'matrix-client-cinny.service', 'priority': 2000, 'groups': ['matrix', 'clients', 'cinny', 'client-cinny']}] if matrix_client_cinny_enabled else [])
  366. +
  367. ([{'name': 'matrix-client-element.service', 'priority': 2000, 'groups': ['matrix', 'clients', 'element', 'client-element']}] if matrix_client_element_enabled else [])
  368. +
  369. ([{'name': 'matrix-client-hydrogen.service', 'priority': 2000, 'groups': ['matrix', 'clients', 'hydrogen', 'client-hydrogen']}] if matrix_client_hydrogen_enabled else [])
  370. +
  371. ([{'name': 'matrix-client-schildichat.service', 'priority': 2000, 'groups': ['matrix', 'clients', 'schildichat', 'client-schildichat']}] if matrix_client_schildichat_enabled else [])
  372. +
  373. ([{'name': 'matrix-client-fluffychat.service', 'priority': 2000, 'groups': ['matrix', 'clients', 'fluffychat', 'client-fluffychat']}] if matrix_client_fluffychat_enabled else [])
  374. +
  375. ([{'name': ('matrix-' + matrix_homeserver_implementation + '.service'), 'priority': 1000, 'groups': ['matrix', 'homeservers', matrix_homeserver_implementation]}] if matrix_homeserver_enabled else [])
  376. +
  377. ([{'name': 'matrix-corporal.service', 'priority': 1500, 'groups': ['matrix', 'corporal']}] if matrix_corporal_enabled else [])
  378. +
  379. ([{'name': 'matrix-coturn.service', 'priority': (900 if devture_systemd_service_manager_service_restart_mode == 'clean-stop-start' else 1500), 'groups': ['matrix', 'coturn']}] if matrix_coturn_enabled else [])
  380. +
  381. ([{'name': 'matrix-rageshake.service', 'priority': 4000, 'groups': ['matrix', 'rageshake']}] if matrix_rageshake_enabled else [])
  382. +
  383. ([{'name': 'matrix-coturn-reload.timer', 'priority': 5000, 'groups': ['matrix', 'coturn']}] if (matrix_coturn_enabled and matrix_coturn_tls_enabled) else [])
  384. +
  385. ([{'name': 'matrix-dimension.service', 'priority': 4000, 'groups': ['matrix', 'integration-managers', 'dimension']}] if matrix_dimension_enabled else [])
  386. +
  387. ([{'name': 'matrix-dynamic-dns.service', 'priority': 5000, 'groups': ['matrix', 'dynamic-dns']}] if matrix_dynamic_dns_enabled else [])
  388. +
  389. ([{'name': (etherpad_identifier + '.service'), 'priority': 4000, 'groups': ['matrix', 'etherpad']}] if etherpad_enabled else [])
  390. +
  391. ([{'name': (grafana_identifier + '.service'), 'priority': 4000, 'groups': ['matrix', 'monitoring', 'grafana']}] if grafana_enabled else [])
  392. +
  393. ([{'name': (jitsi_identifier + '-web.service'), 'priority': 4200, 'groups': ['matrix', 'jitsi', 'jitsi-web']}] if jitsi_enabled else [])
  394. +
  395. ([{'name': (jitsi_identifier + '-prosody.service'), 'priority': 4000, 'groups': ['matrix', 'jitsi', 'jitsi-prosody']}] if jitsi_enabled else [])
  396. +
  397. ([{'name': (jitsi_identifier + '-jicofo.service'), 'priority': 4100, 'groups': ['matrix', 'jitsi', 'jitsi-jicofo']}] if jitsi_enabled else [])
  398. +
  399. ([{'name': (jitsi_identifier + '-jvb.service'), 'priority': 4100, 'groups': ['matrix', 'jitsi', 'jitsi-jvb']}] if jitsi_enabled else [])
  400. +
  401. ([{'name': 'matrix-ldap-registration-proxy.service', 'priority': 2000, 'groups': ['matrix', 'ldap-registration-proxy']}] if matrix_ldap_registration_proxy_enabled else [])
  402. +
  403. ([{'name': 'matrix-ma1sd.service', 'priority': 2000, 'groups': ['matrix', 'ma1sd']}] if matrix_ma1sd_enabled else [])
  404. +
  405. ([{'name': (matrix_media_repo_identifier + '.service'), 'priority': 4000, 'groups': ['matrix', 'matrix-media-repo']}] if matrix_media_repo_enabled else [])
  406. +
  407. ([{'name': (exim_relay_identifier ~ '.service'), 'priority': 800, 'groups': ['matrix', 'mailer', 'exim-relay']}] if exim_relay_enabled else [])
  408. +
  409. ([{'name': (ntfy_identifier + '.service'), 'priority': 800, 'groups': ['matrix', 'ntfy']}] if ntfy_enabled else [])
  410. +
  411. ([{'name': (postgres_identifier + '.service'), 'priority': 500, 'groups': ['matrix', 'postgres']}] if postgres_enabled else [])
  412. +
  413. ([{'name': (postgres_backup_identifier + '.service'), 'priority': 5000, 'groups': ['matrix', 'backup', 'postgres-backup']}] if postgres_backup_enabled else [])
  414. +
  415. ([{'name': (prometheus_identifier + '.service'), 'priority': 4000, 'groups': ['matrix', 'monitoring', 'prometheus']}] if prometheus_enabled else [])
  416. +
  417. ([{'name': (prometheus_node_exporter_identifier + '.service'), 'priority': 3900, 'groups': ['matrix', 'monitoring', 'prometheus-exporters', 'prometheus-node-exporter']}] if prometheus_node_exporter_enabled else [])
  418. +
  419. ([{'name': (prometheus_postgres_exporter_identifier + '.service'), 'priority': 3900, 'groups': ['matrix', 'monitoring', 'prometheus-exporters', 'prometheus-postgres-exporter']}] if prometheus_postgres_exporter_enabled else [])
  420. +
  421. ([{'name': 'matrix-prometheus-nginxlog-exporter.service', 'priority': 3900, 'groups': ['matrix', 'monitoring', 'prometheus-exporters', 'prometheus-nginxlog-exporter']}] if matrix_prometheus_nginxlog_exporter_enabled else [])
  422. +
  423. ([{'name': (valkey_identifier + '.service'), 'priority': 750, 'groups': ['matrix', 'valkey']}] if valkey_enabled else [])
  424. +
  425. ([{'name': 'matrix-pantalaimon.service', 'priority': 4000, 'groups': ['matrix', 'pantalaimon']}] if matrix_pantalaimon_enabled else [])
  426. +
  427. ([{'name': 'matrix-element-call.service', 'priority': 4000, 'groups': ['matrix', 'element-call']}] if matrix_element_call_enabled else [])
  428. +
  429. ([{'name': 'matrix-livekit-jwt-service.service', 'priority': 3500, 'groups': ['matrix', 'livekit-jwt-service']}] if matrix_livekit_jwt_service_enabled else [])
  430. +
  431. ([{'name': (livekit_server_identifier + '.service'), 'priority': 3000, 'groups': ['matrix', 'livekit-server']}] if livekit_server_enabled else [])
  432. +
  433. ([{'name': 'matrix-registration.service', 'priority': 4000, 'groups': ['matrix', 'registration', 'matrix-registration']}] if matrix_registration_enabled else [])
  434. +
  435. ([{'name': 'matrix-sliding-sync.service', 'priority': 1500, 'groups': ['matrix', 'sliding-sync']}] if matrix_sliding_sync_enabled else [])
  436. +
  437. ([{'name': 'matrix-sygnal.service', 'priority': 800, 'groups': ['matrix', 'sygnal']}] if matrix_sygnal_enabled else [])
  438. +
  439. ([{'name': 'matrix-goofys.service', 'priority': 800, 'groups': ['matrix', 'goofys']}] if matrix_s3_media_store_enabled else [])
  440. +
  441. ([{'name': 'matrix-synapse-s3-storage-provider-migrate.timer', 'priority': 5000, 'groups': ['matrix']}] if matrix_synapse_ext_synapse_s3_storage_provider_enabled else [])
  442. +
  443. ([{'name': 'matrix-synapse-auto-compressor.timer', 'priority': 5000, 'groups': ['matrix', 'synapse-auto-compressor']}] if matrix_synapse_auto_compressor_enabled else [])
  444. +
  445. ([{'name': 'matrix-synapse-admin.service', 'priority': 4000, 'groups': ['matrix', 'synapse-admin']}] if matrix_synapse_admin_enabled else [])
  446. +
  447. ([{'name': (matrix_synapse_usage_exporter_identifier + '.service'), 'priority': 4000, 'groups': ['matrix', 'synapse-usage-exporter']}] if matrix_synapse_usage_exporter_enabled else [])
  448. +
  449. ([{'name': 'matrix-synapse-reverse-proxy-companion.service', 'priority': 1500, 'groups': ['matrix', 'homeservers', 'synapse', 'synapse-reverse-proxy-companion', 'reverse-proxies']}] if matrix_synapse_reverse_proxy_companion_enabled else [])
  450. +
  451. ([{'name': 'matrix-user-verification-service.service', 'priority': 800, 'groups': ['matrix', 'matrix-user-verification-service']}] if matrix_user_verification_service_enabled else [])
  452. +
  453. ([{'name': (matrix_static_files_identifier + '.service'), 'priority': 4000, 'groups': ['matrix', 'matrix-static-files']}] if matrix_static_files_enabled else [])
  454. +
  455. ([{'name': (container_socket_proxy_identifier + '.service'), 'priority': 200, 'groups': ['matrix', 'reverse-proxies', 'container-socket-proxy']}] if container_socket_proxy_enabled else [])
  456. +
  457. ([{'name': (traefik_identifier + '.service'), 'priority': 250, 'groups': ['matrix', 'traefik', 'reverse-proxies']}] if traefik_enabled else [])
  458. +
  459. ([{'name': (traefik_certs_dumper_identifier + '.service'), 'priority': 300, 'groups': ['matrix', 'traefik-certs-dumper']}] if traefik_certs_dumper_enabled else [])
  460. }}
  461. ########################################################################
  462. # #
  463. # /com.devture.ansible.role.systemd_service_manager #
  464. # #
  465. ########################################################################
  466. ########################################################################
  467. # #
  468. # com.devture.ansible.role.timesync #
  469. # #
  470. ########################################################################
  471. # To completely disable installing systemd-timesyncd/ntpd, use `devture_timesync_installation_enabled: false`.
  472. ########################################################################
  473. # #
  474. # /com.devture.ansible.role.timesync #
  475. # #
  476. ########################################################################
  477. ######################################################################
  478. #
  479. # com.devture.ansible.role.playbook_state_preserver
  480. #
  481. ######################################################################
  482. # To completely disable this feature, use `devture_playbook_state_preserver_enabled: false`.
  483. devture_playbook_state_preserver_uid: "{{ matrix_user_uid }}"
  484. devture_playbook_state_preserver_gid: "{{ matrix_user_gid }}"
  485. devture_playbook_state_preserver_vars_preservation_dst: "{{ matrix_base_data_path }}/vars.yml"
  486. devture_playbook_state_preserver_commit_hash_preservation_dst: "{{ matrix_base_data_path }}/git_hash.yml"
  487. ######################################################################
  488. #
  489. # /com.devture.ansible.role.playbook_state_preserver
  490. #
  491. ######################################################################
  492. ########################################################################
  493. # #
  494. # geerlingguy/ansible-role-docker #
  495. # #
  496. ########################################################################
  497. docker_daemon_options: "{{ matrix_playbook_docker_installation_daemon_options }}"
  498. ########################################################################
  499. # #
  500. # /geerlingguy/ansible-role-docker #
  501. # #
  502. ########################################################################
  503. ######################################################################
  504. #
  505. # matrix-base
  506. #
  507. ######################################################################
  508. matrix_identity_server_url: "{{ (('https://' if matrix_playbook_ssl_enabled else 'http://') + matrix_server_fqn_matrix) if matrix_ma1sd_enabled else None }}"
  509. matrix_homeserver_systemd_services_list: |-
  510. {{
  511. (
  512. ([('matrix-' + matrix_homeserver_implementation + '.service')] if matrix_homeserver_implementation != 'synapse' else [])
  513. +
  514. ([('matrix-' + matrix_homeserver_implementation + '.service')] if matrix_homeserver_implementation == 'synapse' and not matrix_synapse_reverse_proxy_companion_enabled else [])
  515. +
  516. (['matrix-synapse-reverse-proxy-companion.service'] if matrix_synapse_reverse_proxy_companion_enabled else [])
  517. ) | unique
  518. }}
  519. matrix_homeserver_container_client_api_endpoint: |-
  520. {{
  521. {
  522. '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)),
  523. 'dendrite': ('matrix-dendrite:' + matrix_dendrite_http_bind_port | default('8008') | string),
  524. 'conduit': ('matrix-conduit:' + matrix_conduit_port_number | default('8008') | string),
  525. 'conduwuit': ('matrix-conduwuit:' + matrix_conduwuit_config_port_number | default('8008') | string),
  526. 'continuwuity': ('matrix-continuwuity:' + matrix_continuwuity_config_port_number | default('8008') | string),
  527. }[matrix_homeserver_implementation]
  528. }}
  529. matrix_homeserver_container_federation_api_endpoint: |-
  530. {{
  531. {
  532. '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)),
  533. 'dendrite': ('matrix-dendrite:' + matrix_dendrite_http_bind_port | default('8008') | string),
  534. 'conduit': ('matrix-conduit:' + matrix_conduit_port_number | default('8008') | string),
  535. 'conduwuit': ('matrix-conduwuit:' + matrix_conduwuit_config_port_number | default('8008') | string),
  536. 'continuwuity': ('matrix-continuwuity:' + matrix_continuwuity_config_port_number | default('8008') | string),
  537. }[matrix_homeserver_implementation]
  538. }}
  539. matrix_integration_manager_rest_url: "{{ matrix_dimension_integrations_rest_url if matrix_dimension_enabled else None }}"
  540. matrix_integration_manager_ui_url: "{{ matrix_dimension_integrations_ui_url if matrix_dimension_enabled else None }}"
  541. ######################################################################
  542. #
  543. # /matrix-base
  544. #
  545. ######################################################################
  546. ######################################################################
  547. #
  548. # matrix-alertmanager-receiver
  549. #
  550. ######################################################################
  551. # We don't enable this by default.
  552. matrix_alertmanager_receiver_enabled: false
  553. 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 }}"
  554. matrix_alertmanager_receiver_container_image_self_build: "{{ matrix_architecture != 'amd64' }}"
  555. matrix_alertmanager_receiver_container_network: "{{ matrix_addons_container_network }}"
  556. matrix_alertmanager_receiver_container_additional_networks_auto: |-
  557. {{
  558. (
  559. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  560. +
  561. ([matrix_playbook_reverse_proxyable_services_additional_network] if (matrix_playbook_reverse_proxyable_services_additional_network and matrix_alertmanager_receiver_container_labels_traefik_enabled) else [])
  562. ) | unique
  563. }}
  564. matrix_alertmanager_receiver_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  565. matrix_alertmanager_receiver_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  566. matrix_alertmanager_receiver_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  567. matrix_alertmanager_receiver_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  568. matrix_alertmanager_receiver_container_labels_metrics_middleware_basic_auth_enabled: "{{ matrix_metrics_exposure_http_basic_auth_enabled }}"
  569. matrix_alertmanager_receiver_container_labels_metrics_middleware_basic_auth_users: "{{ matrix_metrics_exposure_http_basic_auth_users }}"
  570. matrix_alertmanager_receiver_systemd_required_services_list_auto: "{{ matrix_addons_homeserver_systemd_services_list }}"
  571. matrix_alertmanager_receiver_config_matrix_homeserver_url: "{{ matrix_addons_homeserver_client_api_url }}"
  572. matrix_alertmanager_receiver_metrics_enabled: "{{ prometheus_enabled or matrix_metrics_exposure_enabled }}"
  573. matrix_alertmanager_receiver_metrics_proxying_enabled: "{{ matrix_alertmanager_receiver_config_http_metrics_enabled and matrix_metrics_exposure_enabled }}"
  574. matrix_alertmanager_receiver_metrics_proxying_hostname: "{{ matrix_metrics_exposure_hostname }}"
  575. matrix_alertmanager_receiver_metrics_proxying_path: "{{ matrix_metrics_exposure_path_prefix }}/matrix-alertmanager-receiver"
  576. ######################################################################
  577. #
  578. # /matrix-alertmanager-receiver
  579. #
  580. ######################################################################
  581. ######################################################################
  582. #
  583. # matrix-authentication-service
  584. #
  585. ######################################################################
  586. matrix_authentication_service_enabled: false
  587. matrix_authentication_service_hostname: "{{ matrix_server_fqn_matrix }}"
  588. matrix_authentication_service_path_prefix: /auth
  589. matrix_authentication_service_config_database_host: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  590. matrix_authentication_service_config_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mas.db', rounds=655555) | to_uuid }}"
  591. matrix_authentication_service_config_matrix_homeserver: "{{ matrix_domain }}"
  592. matrix_authentication_service_config_matrix_secret: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mas.hs.secret', rounds=655555) | to_uuid }}"
  593. matrix_authentication_service_config_matrix_endpoint: "{{ matrix_homeserver_container_url }}"
  594. # We're using a non-default configuration which:
  595. # - allows passwords from Synapse (hashed with bcrypt) to be imported with scheme version 1 so existing users will be able to login
  596. # - as soon as they do one login, the hash will be 'upgraded' to argon2id
  597. matrix_authentication_service_config_passwords_schemes:
  598. - version: 1
  599. secret: "{{ matrix_synapse_password_config_pepper }}"
  600. algorithm: bcrypt
  601. unicode_normalization: true
  602. - version: 2
  603. algorithm: argon2id
  604. matrix_authentication_service_config_email_transport: "{{ 'smtp' if exim_relay_enabled else 'blackhole' }}"
  605. matrix_authentication_service_config_email_hostname: "{{ exim_relay_identifier if exim_relay_enabled else '' }}"
  606. matrix_authentication_service_config_email_port: "{{ 8025 if exim_relay_enabled else 587 }}"
  607. matrix_authentication_service_config_email_mode: "{{ 'plain' if exim_relay_enabled else 'starttls' }}"
  608. matrix_authentication_service_config_email_from_address: "{{ exim_relay_sender_address }}"
  609. 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 }}"
  610. matrix_authentication_service_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm64'] }}"
  611. matrix_authentication_service_container_network: "{{ matrix_homeserver_container_network }}"
  612. matrix_authentication_service_container_additional_networks_auto: |-
  613. {{
  614. (
  615. ([postgres_container_network] if postgres_enabled and matrix_authentication_service_config_database_host == postgres_connection_hostname else [])
  616. +
  617. ([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 [])
  618. +
  619. ([matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network and matrix_authentication_service_container_labels_traefik_enabled else [])
  620. ) | unique
  621. }}
  622. matrix_authentication_service_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  623. matrix_authentication_service_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  624. matrix_authentication_service_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  625. matrix_authentication_service_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  626. matrix_authentication_service_container_labels_public_compatibility_layer_enabled: "{{ not matrix_authentication_service_migration_in_progress}}"
  627. matrix_authentication_service_container_labels_public_compatibility_layer_hostname: "{{ matrix_server_fqn_matrix }}"
  628. matrix_authentication_service_container_labels_internal_compatibility_layer_enabled: "{{ not matrix_authentication_service_migration_in_progress}}"
  629. matrix_authentication_service_container_labels_internal_compatibility_layer_entrypoints: "{{ matrix_playbook_internal_matrix_client_api_traefik_entrypoint_name }}"
  630. # MAS somewhat depends on the homeserver service, but the homeserver also depends on MAS.
  631. # To avoid a circular dependency, we make MAS not depend on the homeserver here.
  632. # The homeserver is more lost without MAS than MAS is without the homeserver, so we'll define the dependency on the homeserver side.
  633. # We'll put our dependency on the homeserver as a "want", rather than a requirement.
  634. matrix_authentication_service_systemd_required_services_list_auto: |
  635. {{
  636. ([postgres_identifier ~ '.service'] if postgres_enabled and matrix_authentication_service_config_database_host == postgres_connection_hostname else [])
  637. }}
  638. # See more information about this homeserver "want" in the comment for `matrix_authentication_service_systemd_required_services_list_auto` above.
  639. matrix_authentication_service_systemd_wanted_services_list_auto: |
  640. {{
  641. ['matrix-' + matrix_homeserver_implementation + '.service']
  642. +
  643. ([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 [])
  644. }}
  645. matrix_authentication_service_syn2mas_container_network: "{{ postgres_container_network if postgres_enabled and matrix_authentication_service_config_database_host == postgres_connection_hostname else matrix_authentication_service_container_network }}"
  646. matrix_authentication_service_syn2mas_synapse_homeserver_config_path: "{{ matrix_synapse_config_dir_path + '/homeserver.yaml' if matrix_synapse_enabled else '' }}"
  647. ######################################################################
  648. #
  649. # /matrix-authentication-service
  650. #
  651. ######################################################################
  652. ######################################################################
  653. #
  654. # matrix-bridge-appservice-discord
  655. #
  656. ######################################################################
  657. # We don't enable bridges by default.
  658. matrix_appservice_discord_enabled: false
  659. matrix_appservice_discord_systemd_required_services_list_auto: |
  660. {{
  661. matrix_addons_homeserver_systemd_services_list
  662. +
  663. ([postgres_identifier ~ '.service'] if (postgres_enabled and matrix_appservice_discord_database_hostname == postgres_connection_hostname) else [])
  664. }}
  665. matrix_appservice_discord_docker_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_appservice_discord_docker_image_registry_prefix_upstream_default }}"
  666. matrix_appservice_discord_container_http_host_bind_port: "{{ (matrix_playbook_service_host_bind_interface_prefix ~ '9005') if matrix_playbook_service_host_bind_interface_prefix else '' }}"
  667. matrix_appservice_discord_container_network: "{{ matrix_addons_container_network }}"
  668. matrix_appservice_discord_container_additional_networks_auto: |-
  669. {{
  670. (
  671. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  672. +
  673. ([postgres_container_network] if (postgres_enabled and matrix_appservice_discord_database_hostname == postgres_connection_hostname and matrix_appservice_discord_container_network != postgres_container_network) else [])
  674. ) | unique
  675. }}
  676. # If the homeserver disables presence, it's likely better (less wasteful) to also disable presence on the bridge side.
  677. matrix_appservice_discord_bridge_disablePresence: "{{ (not matrix_synapse_presence_enabled) if matrix_homeserver_implementation == 'synapse' else false }}"
  678. matrix_appservice_discord_appservice_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'discord.as.token', rounds=655555) | to_uuid }}"
  679. matrix_appservice_discord_homeserver_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'discord.hs.token', rounds=655555) | to_uuid }}"
  680. # We only make this use Postgres if our own Postgres server is enabled.
  681. # It's only then (for now) that we can automatically create the necessary database and user for this service.
  682. matrix_appservice_discord_database_engine: "{{ 'postgres' if postgres_enabled else 'sqlite' }}"
  683. matrix_appservice_discord_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  684. matrix_appservice_discord_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'as.discord.db', rounds=655555) | to_uuid }}"
  685. ######################################################################
  686. #
  687. # /matrix-bridge-appservice-discord
  688. #
  689. ######################################################################
  690. ######################################################################
  691. #
  692. # matrix-appservice-webhooks
  693. #
  694. ######################################################################
  695. # We don't enable bridges by default.
  696. matrix_appservice_webhooks_enabled: false
  697. matrix_appservice_webhooks_hostname: "{{ matrix_server_fqn_matrix }}"
  698. matrix_appservice_webhooks_systemd_required_services_list_auto: |
  699. {{
  700. matrix_addons_homeserver_systemd_services_list
  701. }}
  702. matrix_appservice_webhooks_docker_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_appservice_webhooks_docker_image_registry_prefix_upstream_default }}"
  703. matrix_appservice_webhooks_container_image_self_build: "{{ matrix_architecture != 'amd64' }}"
  704. matrix_appservice_webhooks_container_http_host_bind_port: "{{ (matrix_playbook_service_host_bind_interface_prefix ~ matrix_appservice_webhooks_matrix_port) if matrix_playbook_service_host_bind_interface_prefix else '' }}"
  705. matrix_appservice_webhooks_container_network: "{{ matrix_addons_container_network }}"
  706. matrix_appservice_webhooks_container_additional_networks_auto: |-
  707. {{
  708. (
  709. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  710. +
  711. ([matrix_playbook_reverse_proxyable_services_additional_network] if (matrix_playbook_reverse_proxyable_services_additional_network and matrix_appservice_webhooks_container_labels_traefik_enabled) else [])
  712. ) | unique
  713. }}
  714. matrix_appservice_webhooks_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  715. matrix_appservice_webhooks_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  716. matrix_appservice_webhooks_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  717. matrix_appservice_webhooks_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  718. matrix_appservice_webhooks_appservice_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'webhook.as.token', rounds=655555) | to_uuid }}"
  719. matrix_appservice_webhooks_homeserver_url: "{{ matrix_addons_homeserver_client_api_url }}"
  720. matrix_appservice_webhooks_homeserver_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'webhook.hs.token', rounds=655555) | to_uuid }}"
  721. matrix_appservice_webhooks_id_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'webhook.id.token', rounds=655555) | to_uuid }}"
  722. ######################################################################
  723. #
  724. # /matrix-appservice-webhooks
  725. #
  726. ######################################################################
  727. ######################################################################
  728. #
  729. # matrix-appservice-slack
  730. #
  731. ######################################################################
  732. # We don't enable bridges by default.
  733. matrix_appservice_slack_enabled: false
  734. matrix_appservice_slack_hostname: "{{ matrix_server_fqn_matrix }}"
  735. matrix_appservice_slack_systemd_required_services_list_auto: |
  736. {{
  737. matrix_addons_homeserver_systemd_services_list
  738. +
  739. ([postgres_identifier ~ '.service'] if (postgres_enabled and matrix_appservice_slack_database_hostname == postgres_connection_hostname) else [])
  740. }}
  741. matrix_appservice_slack_docker_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_appservice_slack_docker_image_registry_prefix_upstream_default }}"
  742. matrix_appservice_slack_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm64'] }}"
  743. matrix_appservice_slack_container_http_host_bind_port: "{{ (matrix_playbook_service_host_bind_interface_prefix ~ matrix_appservice_slack_slack_port) if matrix_playbook_service_host_bind_interface_prefix else '' }}"
  744. matrix_appservice_slack_container_network: "{{ matrix_addons_container_network }}"
  745. matrix_appservice_slack_container_additional_networks_auto: |-
  746. {{
  747. (
  748. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  749. +
  750. ([postgres_container_network] if (postgres_enabled and matrix_appservice_slack_database_hostname == postgres_connection_hostname and matrix_appservice_slack_container_network != postgres_container_network) else [])
  751. +
  752. ([matrix_playbook_reverse_proxyable_services_additional_network] if (matrix_playbook_reverse_proxyable_services_additional_network and matrix_appservice_slack_container_labels_traefik_enabled) else [])
  753. ) | unique
  754. }}
  755. matrix_appservice_slack_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  756. matrix_appservice_slack_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  757. matrix_appservice_slack_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  758. matrix_appservice_slack_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  759. matrix_appservice_slack_appservice_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'slack.as.token', rounds=655555) | to_uuid }}"
  760. matrix_appservice_slack_homeserver_url: "{{ matrix_addons_homeserver_client_api_url }}"
  761. matrix_appservice_slack_homeserver_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'slack.hs.token', rounds=655555) | to_uuid }}"
  762. matrix_appservice_slack_id_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'slack.id.token', rounds=655555) | to_uuid }}"
  763. # Postgres is the default, except if not using internal Postgres server
  764. matrix_appservice_slack_database_engine: "{{ 'postgres' if postgres_enabled else 'nedb' }}"
  765. matrix_appservice_slack_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  766. matrix_appservice_slack_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'as.slack.db', rounds=655555) | to_uuid }}"
  767. matrix_appservice_slack_database_container_network: "{{ postgres_container_network if postgres_enabled else '' }}"
  768. ######################################################################
  769. #
  770. # /matrix-bridge-appservice-slack
  771. #
  772. ######################################################################
  773. ######################################################################
  774. #
  775. # matrix-bridge-appservice-irc
  776. #
  777. ######################################################################
  778. # We don't enable bridges by default.
  779. matrix_appservice_irc_enabled: false
  780. matrix_appservice_irc_systemd_required_services_list_auto: |
  781. {{
  782. matrix_addons_homeserver_systemd_services_list
  783. +
  784. ([postgres_identifier ~ '.service'] if (postgres_enabled and matrix_appservice_irc_database_hostname == postgres_connection_hostname) else [])
  785. }}
  786. matrix_appservice_irc_docker_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_appservice_irc_docker_image_registry_prefix_upstream_default }}"
  787. matrix_appservice_irc_container_image_self_build: "{{ matrix_architecture != 'amd64' }}"
  788. matrix_appservice_irc_container_http_host_bind_port: "{{ (matrix_playbook_service_host_bind_interface_prefix ~ '9999') if matrix_playbook_service_host_bind_interface_prefix else '' }}"
  789. matrix_appservice_irc_container_network: "{{ matrix_addons_container_network }}"
  790. matrix_appservice_irc_container_additional_networks_auto: |-
  791. {{
  792. (
  793. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  794. +
  795. ([postgres_container_network] if (postgres_enabled and matrix_appservice_irc_database_hostname == postgres_connection_hostname and matrix_appservice_irc_container_network != postgres_container_network) else [])
  796. ) | unique
  797. }}
  798. # The IRC bridge docs say that if homeserver presence is disabled, it's better to also disable
  799. # IRC bridge presence, for performance reasons.
  800. matrix_appservice_irc_homeserver_enablePresence: "{{ matrix_synapse_presence_enabled if matrix_homeserver_implementation == 'synapse' else true }}"
  801. matrix_appservice_irc_appservice_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'irc.as.token', rounds=655555) | to_uuid }}"
  802. matrix_appservice_irc_homeserver_url: "{{ matrix_addons_homeserver_client_api_url }}"
  803. matrix_appservice_irc_homeserver_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'irc.hs.token', rounds=655555) | to_uuid }}"
  804. matrix_appservice_irc_database_engine: "{{ 'postgres' if postgres_enabled else 'nedb' }}"
  805. matrix_appservice_irc_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  806. matrix_appservice_irc_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'as.irc.db', rounds=655555) | to_uuid }}"
  807. matrix_appservice_irc_database_container_network: "{{ postgres_container_network if postgres_enabled else '' }}"
  808. ######################################################################
  809. #
  810. # /matrix-bridge-appservice-irc
  811. #
  812. ######################################################################
  813. ######################################################################
  814. #
  815. # matrix-bridge-appservice-kakaotalk
  816. #
  817. ######################################################################
  818. # We don't enable bridges by default.
  819. matrix_appservice_kakaotalk_enabled: false
  820. matrix_appservice_kakaotalk_systemd_required_services_list_auto: |
  821. {{
  822. matrix_addons_homeserver_systemd_services_list
  823. +
  824. ([postgres_identifier ~ '.service'] if (postgres_enabled and matrix_appservice_kakaotalk_database_hostname == postgres_connection_hostname) else [])
  825. }}
  826. matrix_appservice_kakaotalk_node_docker_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_appservice_kakaotalk_node_docker_image_registry_prefix_upstream_default }}"
  827. matrix_appservice_kakaotalk_docker_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_appservice_kakaotalk_docker_image_registry_prefix_upstream_default }}"
  828. matrix_appservice_kakaotalk_container_network: "{{ matrix_addons_container_network }}"
  829. matrix_appservice_kakaotalk_container_additional_networks_auto: |-
  830. {{
  831. (
  832. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  833. +
  834. ([postgres_container_network] if (postgres_enabled and matrix_appservice_kakaotalk_database_hostname == postgres_connection_hostname and matrix_appservice_kakaotalk_container_network != postgres_container_network) else [])
  835. ) | unique
  836. }}
  837. matrix_appservice_kakaotalk_appservice_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'as.kakao.hs', rounds=655555) | to_uuid }}"
  838. matrix_appservice_kakaotalk_homeserver_address: "{{ matrix_addons_homeserver_client_api_url }}"
  839. matrix_appservice_kakaotalk_homeserver_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'as.kakao.hs', rounds=655555) | to_uuid }}"
  840. matrix_appservice_kakaotalk_homeserver_async_media: "{{ matrix_homeserver_implementation in ['synapse'] }}"
  841. matrix_appservice_kakaotalk_login_shared_secret: "{{ matrix_synapse_ext_password_provider_shared_secret_auth_shared_secret if matrix_synapse_ext_password_provider_shared_secret_auth_enabled else '' }}"
  842. matrix_appservice_kakaotalk_database_engine: "{{ 'postgres' if postgres_enabled else 'sqlite' }}"
  843. matrix_appservice_kakaotalk_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  844. matrix_appservice_kakaotalk_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'as.kakao.db', rounds=655555) | to_uuid }}"
  845. ######################################################################
  846. #
  847. # /matrix-bridge-appservice-kakaotalk
  848. #
  849. ######################################################################
  850. ######################################################################
  851. #
  852. # matrix-bridge-beeper-linkedin
  853. #
  854. ######################################################################
  855. # We don't enable bridges by default.
  856. matrix_beeper_linkedin_enabled: false
  857. matrix_beeper_linkedin_systemd_required_services_list_auto: |
  858. {{
  859. matrix_addons_homeserver_systemd_services_list
  860. +
  861. ([postgres_identifier ~ '.service'] if (postgres_enabled and matrix_beeper_linkedin_database_hostname == postgres_connection_hostname) else [])
  862. }}
  863. matrix_beeper_linkedin_docker_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_beeper_linkedin_docker_image_registry_prefix_upstream_default }}"
  864. matrix_beeper_linkedin_container_image_self_build: "{{ matrix_architecture not in ['amd64'] }}"
  865. matrix_beeper_linkedin_container_network: "{{ matrix_addons_container_network }}"
  866. matrix_beeper_linkedin_container_additional_networks_auto: |-
  867. {{
  868. (
  869. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  870. +
  871. ([postgres_container_network] if (postgres_enabled and matrix_beeper_linkedin_database_hostname == postgres_connection_hostname and matrix_beeper_linkedin_container_network != postgres_container_network) else [])
  872. ) | unique
  873. }}
  874. matrix_beeper_linkedin_appservice_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'linked.as.token', rounds=655555) | to_uuid }}"
  875. matrix_beeper_linkedin_homeserver_address: "{{ matrix_addons_homeserver_client_api_url }}"
  876. matrix_beeper_linkedin_homeserver_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'linked.hs.token', rounds=655555) | to_uuid }}"
  877. matrix_beeper_linkedin_homeserver_async_media: "{{ matrix_homeserver_implementation in ['synapse'] }}"
  878. matrix_beeper_linkedin_bridge_login_shared_secret_map_auto: |-
  879. {{
  880. ({
  881. matrix_beeper_linkedin_homeserver_domain: ("as_token:" + matrix_appservice_double_puppet_registration_as_token)
  882. })
  883. if matrix_appservice_double_puppet_enabled
  884. else (
  885. {matrix_beeper_linkedin_homeserver_domain: matrix_synapse_ext_password_provider_shared_secret_auth_shared_secret}
  886. if matrix_synapse_ext_password_provider_shared_secret_auth_enabled
  887. else {}
  888. )
  889. }}
  890. matrix_beeper_linkedin_bridge_presence: "{{ (matrix_synapse_presence_enabled if matrix_synapse_enabled else true) if matrix_homeserver_implementation == 'synapse' else true }}"
  891. matrix_beeper_linkedin_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  892. matrix_beeper_linkedin_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'maulinkedin.db', rounds=655555) | to_uuid }}"
  893. ######################################################################
  894. #
  895. # /matrix-bridge-beeper-linkedin
  896. #
  897. ######################################################################
  898. ######################################################################
  899. #
  900. # matrix-bridge-go-skype-bridge
  901. #
  902. ######################################################################
  903. # We don't enable bridges by default.
  904. matrix_go_skype_bridge_enabled: false
  905. matrix_go_skype_bridge_systemd_required_services_list_auto: |
  906. {{
  907. matrix_addons_homeserver_systemd_services_list
  908. +
  909. ([postgres_identifier ~ '.service'] if (postgres_enabled and matrix_go_skype_bridge_database_hostname == postgres_connection_hostname) else [])
  910. }}
  911. matrix_go_skype_bridge_docker_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_go_skype_bridge_docker_image_registry_prefix_upstream_default }}"
  912. matrix_go_skype_bridge_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm64'] }}"
  913. matrix_go_skype_bridge_container_network: "{{ matrix_addons_container_network }}"
  914. matrix_go_skype_bridge_container_additional_networks_auto: |-
  915. {{
  916. (
  917. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  918. +
  919. ([postgres_container_network] if (postgres_enabled and matrix_go_skype_bridge_database_hostname == postgres_connection_hostname and matrix_go_skype_bridge_container_network != postgres_container_network) else [])
  920. ) | unique
  921. }}
  922. matrix_go_skype_bridge_appservice_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'skype.as.token', rounds=655555) | to_uuid }}"
  923. matrix_go_skype_bridge_homeserver_address: "{{ matrix_addons_homeserver_client_api_url }}"
  924. matrix_go_skype_bridge_homeserver_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'skype.hs.token', rounds=655555) | to_uuid }}"
  925. matrix_go_skype_bridge_login_shared_secret: "{{ matrix_synapse_ext_password_provider_shared_secret_auth_shared_secret if matrix_synapse_ext_password_provider_shared_secret_auth_enabled else '' }}"
  926. # Postgres is the default, except if not using internal Postgres server
  927. matrix_go_skype_bridge_database_engine: "{{ 'postgres' if postgres_enabled else 'sqlite' }}"
  928. matrix_go_skype_bridge_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  929. matrix_go_skype_bridge_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'goskype.db', rounds=655555) | to_uuid }}"
  930. ######################################################################
  931. #
  932. # /matrix-bridge-go-skype-bridge
  933. #
  934. ######################################################################
  935. ######################################################################
  936. #
  937. # matrix-bridge-mautrix-bluesky
  938. #
  939. ######################################################################
  940. # We don't enable bridges by default.
  941. matrix_mautrix_bluesky_enabled: false
  942. matrix_mautrix_bluesky_systemd_required_services_list_auto: |
  943. {{
  944. matrix_addons_homeserver_systemd_services_list
  945. +
  946. ([postgres_identifier ~ '.service'] if (postgres_enabled and matrix_mautrix_bluesky_database_hostname == postgres_connection_hostname) else [])
  947. }}
  948. matrix_mautrix_bluesky_docker_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_mautrix_bluesky_docker_image_registry_prefix_upstream_default }}"
  949. matrix_mautrix_bluesky_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm64'] }}"
  950. matrix_mautrix_bluesky_container_network: "{{ matrix_addons_container_network }}"
  951. matrix_mautrix_bluesky_container_additional_networks_auto: |-
  952. {{
  953. (
  954. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  955. +
  956. ([postgres_container_network] if (postgres_enabled and matrix_mautrix_bluesky_database_hostname == postgres_connection_hostname and matrix_mautrix_bluesky_container_network != postgres_container_network) else [])
  957. +
  958. ([matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network and matrix_mautrix_bluesky_container_labels_traefik_enabled else [])
  959. ) | unique
  960. }}
  961. matrix_mautrix_bluesky_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  962. matrix_mautrix_bluesky_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  963. matrix_mautrix_bluesky_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  964. matrix_mautrix_bluesky_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  965. matrix_mautrix_bluesky_container_labels_metrics_middleware_basic_auth_enabled: "{{ matrix_metrics_exposure_http_basic_auth_enabled }}"
  966. matrix_mautrix_bluesky_container_labels_metrics_middleware_basic_auth_users: "{{ matrix_metrics_exposure_http_basic_auth_users }}"
  967. matrix_mautrix_bluesky_appservice_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'bsky.as.token', rounds=655555) | to_uuid }}"
  968. matrix_mautrix_bluesky_homeserver_address: "{{ matrix_addons_homeserver_client_api_url }}"
  969. matrix_mautrix_bluesky_homeserver_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'bsky.hs.token', rounds=655555) | to_uuid }}"
  970. matrix_mautrix_bluesky_homeserver_async_media: "{{ matrix_homeserver_implementation in ['synapse'] }}"
  971. matrix_mautrix_bluesky_provisioning_shared_secret: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mau.bsky.prov', rounds=655555) | to_uuid }}"
  972. matrix_mautrix_bluesky_double_puppet_secrets_auto: |-
  973. {{
  974. ({
  975. matrix_mautrix_bluesky_homeserver_domain: ("as_token:" + matrix_appservice_double_puppet_registration_as_token)
  976. })
  977. if matrix_appservice_double_puppet_enabled
  978. else {}
  979. }}
  980. matrix_mautrix_bluesky_metrics_enabled: "{{ prometheus_enabled or matrix_metrics_exposure_enabled }}"
  981. matrix_mautrix_bluesky_metrics_proxying_enabled: "{{ matrix_mautrix_bluesky_metrics_enabled and matrix_metrics_exposure_enabled }}"
  982. matrix_mautrix_bluesky_metrics_proxying_hostname: "{{ matrix_metrics_exposure_hostname }}"
  983. matrix_mautrix_bluesky_metrics_proxying_path_prefix: "{{ matrix_metrics_exposure_path_prefix }}/mautrix-bluesky"
  984. matrix_mautrix_bluesky_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  985. matrix_mautrix_bluesky_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mau.twt.db', rounds=655555) | to_uuid if postgres_enabled else '' }}"
  986. ######################################################################
  987. #
  988. # /matrix-bridge-mautrix-bluesky
  989. #
  990. ######################################################################
  991. ######################################################################
  992. #
  993. # matrix-bridge-mautrix-discord
  994. #
  995. ######################################################################
  996. # We don't enable bridges by default.
  997. matrix_mautrix_discord_enabled: false
  998. matrix_mautrix_discord_docker_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_mautrix_discord_docker_image_registry_prefix_upstream_default }}"
  999. matrix_mautrix_discord_container_image_self_build: "{{ matrix_architecture not in ['arm64', 'amd64'] }}"
  1000. matrix_mautrix_discord_container_network: "{{ matrix_addons_container_network }}"
  1001. matrix_mautrix_discord_container_additional_networks_auto: |-
  1002. {{
  1003. (
  1004. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  1005. +
  1006. ([postgres_container_network] if postgres_enabled and matrix_mautrix_facebook_database_hostname == postgres_connection_hostname else [])
  1007. +
  1008. ([matrix_playbook_reverse_proxyable_services_additional_network] if (matrix_playbook_reverse_proxyable_services_additional_network and matrix_mautrix_discord_container_labels_traefik_enabled) else [])
  1009. ) | unique
  1010. }}
  1011. matrix_mautrix_discord_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  1012. matrix_mautrix_discord_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  1013. matrix_mautrix_discord_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  1014. matrix_mautrix_discord_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  1015. matrix_mautrix_discord_systemd_required_services_list_auto: |
  1016. {{
  1017. matrix_addons_homeserver_systemd_services_list
  1018. +
  1019. ([postgres_identifier ~ '.service'] if (postgres_enabled and matrix_mautrix_discord_database_hostname == postgres_connection_hostname) else [])
  1020. }}
  1021. matrix_mautrix_discord_appservice_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'maudisc.as.tok', rounds=655555) | to_uuid }}"
  1022. matrix_mautrix_discord_homeserver_address: "{{ matrix_addons_homeserver_client_api_url }}"
  1023. matrix_mautrix_discord_homeserver_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'maudisc.hs.tok', rounds=655555) | to_uuid }}"
  1024. matrix_mautrix_discord_homeserver_async_media: "{{ matrix_homeserver_implementation in ['synapse'] }}"
  1025. matrix_mautrix_discord_bridge_avatar_proxy_key: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'maudisc.avatar', rounds=655555) | to_uuid }}"
  1026. matrix_mautrix_discord_hostname: "{{ matrix_server_fqn_matrix }}"
  1027. matrix_mautrix_discord_scheme: "{{ 'https' if matrix_playbook_ssl_enabled else 'http' }}"
  1028. matrix_mautrix_discord_bridge_login_shared_secret_map_auto: |-
  1029. {{
  1030. ({
  1031. matrix_mautrix_discord_homeserver_domain: ("as_token:" + matrix_appservice_double_puppet_registration_as_token)
  1032. })
  1033. if matrix_appservice_double_puppet_enabled
  1034. else (
  1035. {matrix_mautrix_discord_homeserver_domain: matrix_synapse_ext_password_provider_shared_secret_auth_shared_secret}
  1036. if matrix_synapse_ext_password_provider_shared_secret_auth_enabled
  1037. else {}
  1038. )
  1039. }}
  1040. # Postgres is the default, except if not using internal Postgres server
  1041. matrix_mautrix_discord_database_engine: "{{ 'postgres' if postgres_enabled else 'sqlite' }}"
  1042. matrix_mautrix_discord_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  1043. matrix_mautrix_discord_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'maudiscord.db', rounds=655555) | to_uuid }}"
  1044. ######################################################################
  1045. #
  1046. # /matrix-bridge-mautrix-discord
  1047. #
  1048. ######################################################################
  1049. ######################################################################
  1050. #
  1051. # matrix-bridge-mautrix-slack
  1052. #
  1053. ######################################################################
  1054. # We don't enable bridges by default.
  1055. matrix_mautrix_slack_enabled: false
  1056. matrix_mautrix_slack_systemd_required_services_list_auto: |
  1057. {{
  1058. matrix_addons_homeserver_systemd_services_list
  1059. +
  1060. ([postgres_identifier ~ '.service'] if (postgres_enabled and matrix_mautrix_slack_database_hostname == postgres_connection_hostname) else [])
  1061. }}
  1062. matrix_mautrix_slack_docker_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_mautrix_slack_docker_image_registry_prefix_upstream_default }}"
  1063. matrix_mautrix_slack_container_image_self_build: "{{ matrix_architecture not in ['arm64', 'amd64'] }}"
  1064. matrix_mautrix_slack_container_network: "{{ matrix_addons_container_network }}"
  1065. matrix_mautrix_slack_container_additional_networks_auto: |-
  1066. {{
  1067. (
  1068. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  1069. +
  1070. ([postgres_container_network] if (postgres_enabled and matrix_mautrix_slack_database_hostname == postgres_connection_hostname and matrix_mautrix_slack_container_network != postgres_container_network) else [])
  1071. ) | unique
  1072. }}
  1073. matrix_mautrix_slack_appservice_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mauslack.as.tok', rounds=655555) | to_uuid }}"
  1074. matrix_mautrix_slack_homeserver_address: "{{ matrix_addons_homeserver_client_api_url }}"
  1075. matrix_mautrix_slack_homeserver_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mauslack.hs.tok', rounds=655555) | to_uuid }}"
  1076. matrix_mautrix_slack_homeserver_async_media: "{{ matrix_homeserver_implementation in ['synapse'] }}"
  1077. matrix_mautrix_slack_double_puppet_secrets_auto: |-
  1078. {{
  1079. {
  1080. matrix_mautrix_slack_homeserver_domain: ("as_token:" + matrix_appservice_double_puppet_registration_as_token)
  1081. }
  1082. if matrix_appservice_double_puppet_enabled
  1083. else {}
  1084. }}
  1085. # Postgres is the default, except if not using internal Postgres server
  1086. matrix_mautrix_slack_database_engine: "{{ 'postgres' if postgres_enabled else 'sqlite' }}"
  1087. matrix_mautrix_slack_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  1088. matrix_mautrix_slack_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mauslack.db', rounds=655555) | to_uuid }}"
  1089. matrix_mautrix_slack_provisioning_shared_secret: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mau.slack.prov', rounds=655555) | to_uuid }}"
  1090. matrix_mautrix_slack_public_media_signing_key: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mau.slack.pmed', rounds=655555) | to_uuid }}"
  1091. ######################################################################
  1092. #
  1093. # /matrix-bridge-mautrix-slack
  1094. #
  1095. ######################################################################
  1096. ######################################################################
  1097. #
  1098. # matrix-bridge-mautrix-facebook
  1099. #
  1100. ######################################################################
  1101. # We don't enable bridges by default.
  1102. matrix_mautrix_facebook_enabled: false
  1103. matrix_mautrix_facebook_systemd_required_services_list_auto: |
  1104. {{
  1105. matrix_addons_homeserver_systemd_services_list
  1106. +
  1107. ([postgres_identifier ~ '.service'] if (postgres_enabled and matrix_mautrix_facebook_database_hostname == postgres_connection_hostname) else [])
  1108. }}
  1109. matrix_mautrix_facebook_docker_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_mautrix_facebook_docker_image_registry_prefix_upstream_default }}"
  1110. matrix_mautrix_facebook_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm64'] }}"
  1111. matrix_mautrix_facebook_container_http_host_bind_port: "{{ (matrix_playbook_service_host_bind_interface_prefix ~ '9008') if matrix_playbook_service_host_bind_interface_prefix else '' }}"
  1112. matrix_mautrix_facebook_container_network: "{{ matrix_addons_container_network }}"
  1113. matrix_mautrix_facebook_container_additional_networks_auto: |-
  1114. {{
  1115. (
  1116. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  1117. +
  1118. ([postgres_container_network] if (postgres_enabled and matrix_mautrix_facebook_database_hostname == postgres_connection_hostname and matrix_mautrix_facebook_container_network != postgres_container_network) else [])
  1119. +
  1120. ([matrix_playbook_reverse_proxyable_services_additional_network] if (matrix_playbook_reverse_proxyable_services_additional_network and matrix_mautrix_facebook_container_labels_traefik_enabled) else [])
  1121. ) | unique
  1122. }}
  1123. matrix_mautrix_facebook_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  1124. matrix_mautrix_facebook_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  1125. matrix_mautrix_facebook_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  1126. matrix_mautrix_facebook_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  1127. matrix_mautrix_facebook_container_labels_metrics_middleware_basic_auth_enabled: "{{ matrix_metrics_exposure_http_basic_auth_enabled }}"
  1128. matrix_mautrix_facebook_container_labels_metrics_middleware_basic_auth_users: "{{ matrix_metrics_exposure_http_basic_auth_users }}"
  1129. matrix_mautrix_facebook_appservice_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'fb.as.token', rounds=655555) | to_uuid }}"
  1130. matrix_mautrix_facebook_homeserver_address: "{{ matrix_addons_homeserver_client_api_url }}"
  1131. matrix_mautrix_facebook_homeserver_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'fb.hs.token', rounds=655555) | to_uuid }}"
  1132. matrix_mautrix_facebook_homeserver_async_media: "{{ matrix_homeserver_implementation in ['synapse'] }}"
  1133. matrix_mautrix_facebook_appservice_public_enabled: true
  1134. matrix_mautrix_facebook_appservice_public_hostname: "{{ matrix_server_fqn_matrix }}"
  1135. matrix_mautrix_facebook_appservice_public_prefix: "/{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'facebook', rounds=655555) | to_uuid }}"
  1136. matrix_mautrix_facebook_login_shared_secret: "{{ matrix_synapse_ext_password_provider_shared_secret_auth_shared_secret if matrix_synapse_ext_password_provider_shared_secret_auth_enabled else '' }}"
  1137. matrix_mautrix_facebook_bridge_presence: "{{ (matrix_synapse_presence_enabled if matrix_synapse_enabled else true) if matrix_homeserver_implementation == 'synapse' else true }}"
  1138. matrix_mautrix_facebook_metrics_enabled: "{{ prometheus_enabled or matrix_metrics_exposure_enabled }}"
  1139. matrix_mautrix_facebook_metrics_proxying_enabled: "{{ matrix_mautrix_facebook_metrics_enabled and matrix_metrics_exposure_enabled }}"
  1140. matrix_mautrix_facebook_metrics_proxying_hostname: "{{ matrix_metrics_exposure_hostname }}"
  1141. matrix_mautrix_facebook_metrics_proxying_path_prefix: "{{ matrix_metrics_exposure_path_prefix }}/mautrix-facebook"
  1142. # We'd like to force-set people with external Postgres to SQLite, so the bridge role can complain
  1143. # and point them to a migration path.
  1144. matrix_mautrix_facebook_database_engine: "{{ 'postgres' if postgres_enabled else 'sqlite' }}"
  1145. matrix_mautrix_facebook_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  1146. matrix_mautrix_facebook_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mau.fb.db', rounds=655555) | to_uuid }}"
  1147. ######################################################################
  1148. #
  1149. # /matrix-bridge-mautrix-facebook
  1150. #
  1151. ######################################################################
  1152. ######################################################################
  1153. #
  1154. # matrix-bridge-mautrix-googlechat
  1155. #
  1156. ######################################################################
  1157. # We don't enable bridges by default.
  1158. matrix_mautrix_googlechat_enabled: false
  1159. matrix_mautrix_googlechat_systemd_required_services_list_auto: |
  1160. {{
  1161. matrix_addons_homeserver_systemd_services_list
  1162. +
  1163. ([postgres_identifier ~ '.service'] if (postgres_enabled and matrix_mautrix_googlechat_database_hostname == postgres_connection_hostname) else [])
  1164. }}
  1165. matrix_mautrix_googlechat_docker_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_mautrix_googlechat_docker_image_registry_prefix_upstream_default }}"
  1166. matrix_mautrix_googlechat_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm64'] }}"
  1167. matrix_mautrix_googlechat_container_http_host_bind_port: "{{ (matrix_playbook_service_host_bind_interface_prefix ~ '9007') if matrix_playbook_service_host_bind_interface_prefix else '' }}"
  1168. matrix_mautrix_googlechat_container_network: "{{ matrix_addons_container_network }}"
  1169. matrix_mautrix_googlechat_container_additional_networks_auto: |-
  1170. {{
  1171. (
  1172. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  1173. +
  1174. ([postgres_container_network] if (postgres_enabled and matrix_mautrix_googlechat_database_hostname == postgres_connection_hostname and matrix_mautrix_googlechat_container_network != postgres_container_network) else [])
  1175. +
  1176. ([matrix_playbook_reverse_proxyable_services_additional_network] if (matrix_playbook_reverse_proxyable_services_additional_network and matrix_mautrix_gmessages_container_labels_traefik_enabled) else [])
  1177. ) | unique
  1178. }}
  1179. matrix_mautrix_googlechat_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  1180. matrix_mautrix_googlechat_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  1181. matrix_mautrix_googlechat_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  1182. matrix_mautrix_googlechat_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  1183. matrix_mautrix_googlechat_container_labels_public_endpoint_hostname: "{{ matrix_server_fqn_matrix }}"
  1184. matrix_mautrix_googlechat_container_labels_metrics_middleware_basic_auth_enabled: "{{ matrix_metrics_exposure_http_basic_auth_enabled }}"
  1185. matrix_mautrix_googlechat_container_labels_metrics_middleware_basic_auth_users: "{{ matrix_metrics_exposure_http_basic_auth_users }}"
  1186. matrix_mautrix_googlechat_appservice_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'gc.as.token', rounds=655555) | to_uuid }}"
  1187. matrix_mautrix_googlechat_homeserver_address: "{{ matrix_addons_homeserver_client_api_url }}"
  1188. matrix_mautrix_googlechat_homeserver_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'gc.hs.token', rounds=655555) | to_uuid }}"
  1189. matrix_mautrix_googlechat_login_shared_secret: |-
  1190. {{
  1191. ("as_token:" + matrix_appservice_double_puppet_registration_as_token)
  1192. if matrix_appservice_double_puppet_enabled
  1193. else (
  1194. matrix_synapse_ext_password_provider_shared_secret_auth_shared_secret if matrix_synapse_ext_password_provider_shared_secret_auth_enabled
  1195. if matrix_synapse_ext_password_provider_shared_secret_auth_enabled
  1196. else ""
  1197. )
  1198. }}
  1199. matrix_mautrix_googlechat_metrics_enabled: "{{ prometheus_enabled or matrix_metrics_exposure_enabled }}"
  1200. matrix_mautrix_googlechat_metrics_proxying_enabled: "{{ matrix_mautrix_googlechat_metrics_enabled and matrix_metrics_exposure_enabled }}"
  1201. matrix_mautrix_googlechat_metrics_proxying_hostname: "{{ matrix_metrics_exposure_hostname }}"
  1202. matrix_mautrix_googlechat_metrics_proxying_path_prefix: "{{ matrix_metrics_exposure_path_prefix }}/mautrix-googlechat"
  1203. # Postgres is the default, except if not using internal Postgres server
  1204. matrix_mautrix_googlechat_database_engine: "{{ 'postgres' if postgres_enabled else 'sqlite' }}"
  1205. matrix_mautrix_googlechat_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  1206. matrix_mautrix_googlechat_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mau.gc.db', rounds=655555) | to_uuid }}"
  1207. ######################################################################
  1208. #
  1209. # /matrix-bridge-mautrix-googlechat
  1210. #
  1211. ######################################################################
  1212. ######################################################################
  1213. #
  1214. # matrix-bridge-mautrix-instagram
  1215. #
  1216. ######################################################################
  1217. # We don't enable bridges by default.
  1218. matrix_mautrix_instagram_enabled: false
  1219. matrix_mautrix_instagram_systemd_required_services_list_auto: |
  1220. {{
  1221. matrix_addons_homeserver_systemd_services_list
  1222. +
  1223. ([postgres_identifier ~ '.service'] if (postgres_enabled and matrix_mautrix_instagram_database_hostname == postgres_connection_hostname) else [])
  1224. }}
  1225. matrix_mautrix_instagram_docker_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_mautrix_instagram_docker_image_registry_prefix_upstream_default }}"
  1226. matrix_mautrix_instagram_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm64'] }}"
  1227. matrix_mautrix_instagram_container_network: "{{ matrix_addons_container_network }}"
  1228. matrix_mautrix_instagram_container_additional_networks_auto: |-
  1229. {{
  1230. (
  1231. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  1232. +
  1233. ([postgres_container_network] if (postgres_enabled and matrix_mautrix_instagram_database_hostname == postgres_connection_hostname and matrix_mautrix_instagram_container_network != postgres_container_network) else [])
  1234. +
  1235. ([matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network and matrix_mautrix_instagram_container_labels_traefik_enabled else [])
  1236. ) | unique
  1237. }}
  1238. matrix_mautrix_instagram_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  1239. matrix_mautrix_instagram_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  1240. matrix_mautrix_instagram_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  1241. matrix_mautrix_instagram_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  1242. matrix_mautrix_instagram_container_labels_metrics_middleware_basic_auth_enabled: "{{ matrix_metrics_exposure_http_basic_auth_enabled }}"
  1243. matrix_mautrix_instagram_container_labels_metrics_middleware_basic_auth_users: "{{ matrix_metrics_exposure_http_basic_auth_users }}"
  1244. matrix_mautrix_instagram_appservice_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'ig.as.token', rounds=655555) | to_uuid }}"
  1245. matrix_mautrix_instagram_homeserver_address: "{{ matrix_addons_homeserver_client_api_url }}"
  1246. matrix_mautrix_instagram_homeserver_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'ig.hs.token', rounds=655555) | to_uuid }}"
  1247. matrix_mautrix_instagram_login_shared_secret: "{{ matrix_synapse_ext_password_provider_shared_secret_auth_shared_secret if matrix_synapse_ext_password_provider_shared_secret_auth_enabled else '' }}"
  1248. matrix_mautrix_instagram_bridge_presence: "{{ (matrix_synapse_presence_enabled if matrix_synapse_enabled else true) if matrix_homeserver_implementation == 'synapse' else true }}"
  1249. matrix_mautrix_instagram_metrics_enabled: "{{ prometheus_enabled or matrix_metrics_exposure_enabled }}"
  1250. matrix_mautrix_instagram_metrics_proxying_enabled: "{{ matrix_mautrix_instagram_metrics_enabled and matrix_metrics_exposure_enabled }}"
  1251. matrix_mautrix_instagram_metrics_proxying_hostname: "{{ matrix_metrics_exposure_hostname }}"
  1252. matrix_mautrix_instagram_metrics_proxying_path_prefix: "{{ matrix_metrics_exposure_path_prefix }}/mautrix-instagram"
  1253. # We'd like to force-set people with external Postgres to SQLite, so the bridge role can complain
  1254. # and point them to a migration path.
  1255. matrix_mautrix_instagram_database_engine: "{{ 'postgres' if postgres_enabled else 'sqlite' }}"
  1256. matrix_mautrix_instagram_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  1257. matrix_mautrix_instagram_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mau.ig.db', rounds=655555) | to_uuid }}"
  1258. ######################################################################
  1259. #
  1260. # /matrix-bridge-mautrix-instagram
  1261. #
  1262. ######################################################################
  1263. ######################################################################
  1264. #
  1265. # matrix-bridge-mautrix-signal
  1266. #
  1267. ######################################################################
  1268. # We don't enable bridges by default.
  1269. matrix_mautrix_signal_enabled: false
  1270. matrix_mautrix_signal_systemd_required_services_list_auto: |
  1271. {{
  1272. matrix_addons_homeserver_systemd_services_list
  1273. +
  1274. ([postgres_identifier ~ '.service'] if (postgres_enabled and matrix_mautrix_signal_database_hostname == postgres_connection_hostname) else [])
  1275. }}
  1276. matrix_mautrix_signal_docker_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_mautrix_signal_docker_image_registry_prefix_upstream_default }}"
  1277. matrix_mautrix_signal_container_image_self_build: "{{ matrix_architecture not in ['arm64', 'amd64'] }}"
  1278. matrix_mautrix_signal_container_network: "{{ matrix_addons_container_network }}"
  1279. matrix_mautrix_signal_container_additional_networks_auto: |-
  1280. {{
  1281. (
  1282. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  1283. +
  1284. ([postgres_container_network] if (postgres_enabled and matrix_mautrix_signal_database_hostname == postgres_connection_hostname and matrix_mautrix_signal_container_network != postgres_container_network) else [])
  1285. +
  1286. ([matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network and matrix_mautrix_signal_container_labels_traefik_enabled else [])
  1287. ) | unique
  1288. }}
  1289. matrix_mautrix_signal_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  1290. matrix_mautrix_signal_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  1291. matrix_mautrix_signal_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  1292. matrix_mautrix_signal_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  1293. matrix_mautrix_signal_container_labels_metrics_middleware_basic_auth_enabled: "{{ matrix_metrics_exposure_http_basic_auth_enabled }}"
  1294. matrix_mautrix_signal_container_labels_metrics_middleware_basic_auth_users: "{{ matrix_metrics_exposure_http_basic_auth_users }}"
  1295. matrix_mautrix_signal_homeserver_domain: '{{ matrix_domain }}'
  1296. matrix_mautrix_signal_homeserver_address: "{{ matrix_addons_homeserver_client_api_url }}"
  1297. matrix_mautrix_signal_homeserver_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'si.hs.token', rounds=655555) | to_uuid }}"
  1298. matrix_mautrix_signal_homeserver_async_media: "{{ matrix_homeserver_implementation in ['synapse'] }}"
  1299. matrix_mautrix_signal_appservice_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'si.as.token', rounds=655555) | to_uuid }}"
  1300. matrix_mautrix_signal_double_puppet_secrets_auto: |-
  1301. {{
  1302. {
  1303. matrix_mautrix_signal_homeserver_domain: ("as_token:" + matrix_appservice_double_puppet_registration_as_token)
  1304. }
  1305. if matrix_appservice_double_puppet_enabled
  1306. else {}
  1307. }}
  1308. matrix_mautrix_signal_metrics_enabled: "{{ prometheus_enabled or matrix_metrics_exposure_enabled }}"
  1309. matrix_mautrix_signal_metrics_proxying_enabled: "{{ matrix_mautrix_signal_metrics_enabled and matrix_metrics_exposure_enabled }}"
  1310. matrix_mautrix_signal_metrics_proxying_hostname: "{{ matrix_metrics_exposure_hostname }}"
  1311. matrix_mautrix_signal_metrics_proxying_path_prefix: "{{ matrix_metrics_exposure_path_prefix }}/mautrix-signal"
  1312. matrix_mautrix_signal_database_engine: "{{ 'postgres' if postgres_enabled else 'sqlite' }}"
  1313. matrix_mautrix_signal_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  1314. matrix_mautrix_signal_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mau.signal.db', rounds=655555) | to_uuid }}"
  1315. matrix_mautrix_signal_provisioning_shared_secret: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mau.signal.prov', rounds=655555) | to_uuid }}"
  1316. matrix_mautrix_signal_public_media_signing_key: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mau.signal.pmed', rounds=655555) | to_uuid }}"
  1317. ######################################################################
  1318. #
  1319. # /matrix-bridge-mautrix-signal
  1320. #
  1321. ######################################################################
  1322. ######################################################################
  1323. #
  1324. # matrix-bridge-mautrix-meta-messenger
  1325. #
  1326. ######################################################################
  1327. # We don't enable bridges by default.
  1328. matrix_mautrix_meta_messenger_enabled: false
  1329. matrix_mautrix_meta_messenger_systemd_required_services_list_auto: |
  1330. {{
  1331. matrix_addons_homeserver_systemd_services_list
  1332. +
  1333. ([postgres_identifier ~ '.service'] if (postgres_enabled and matrix_mautrix_meta_messenger_database_hostname == postgres_connection_hostname) else [])
  1334. }}
  1335. matrix_mautrix_meta_messenger_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_mautrix_meta_messenger_container_image_registry_prefix_upstream_default }}"
  1336. matrix_mautrix_meta_messenger_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm64'] }}"
  1337. matrix_mautrix_meta_messenger_container_network: "{{ matrix_addons_container_network }}"
  1338. matrix_mautrix_meta_messenger_container_additional_networks_auto: |-
  1339. {{
  1340. (
  1341. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  1342. +
  1343. ([postgres_container_network] if (postgres_enabled and matrix_mautrix_meta_messenger_database_hostname == postgres_connection_hostname and matrix_mautrix_meta_messenger_container_network != postgres_container_network) else [])
  1344. +
  1345. ([matrix_playbook_reverse_proxyable_services_additional_network] if (matrix_playbook_reverse_proxyable_services_additional_network and matrix_mautrix_meta_messenger_container_labels_traefik_enabled) else [])
  1346. ) | unique
  1347. }}
  1348. matrix_mautrix_meta_messenger_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  1349. matrix_mautrix_meta_messenger_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  1350. matrix_mautrix_meta_messenger_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  1351. matrix_mautrix_meta_messenger_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  1352. matrix_mautrix_meta_messenger_container_labels_metrics_middleware_basic_auth_enabled: "{{ matrix_metrics_exposure_http_basic_auth_enabled }}"
  1353. matrix_mautrix_meta_messenger_container_labels_metrics_middleware_basic_auth_users: "{{ matrix_metrics_exposure_http_basic_auth_users }}"
  1354. matrix_mautrix_meta_messenger_appservice_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mau.meta.fb.as', rounds=655555) | to_uuid }}"
  1355. matrix_mautrix_meta_messenger_homeserver_address: "{{ matrix_addons_homeserver_client_api_url }}"
  1356. matrix_mautrix_meta_messenger_homeserver_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mau.meta.fb.hs', rounds=655555) | to_uuid }}"
  1357. matrix_mautrix_meta_messenger_homeserver_async_media: "{{ matrix_homeserver_implementation in ['synapse'] }}"
  1358. matrix_mautrix_meta_messenger_double_puppet_secrets_auto: |-
  1359. {{
  1360. {
  1361. matrix_mautrix_meta_messenger_homeserver_domain: ("as_token:" + matrix_appservice_double_puppet_registration_as_token)
  1362. }
  1363. if matrix_appservice_double_puppet_enabled
  1364. else {}
  1365. }}
  1366. matrix_mautrix_meta_messenger_metrics_enabled: "{{ prometheus_enabled or matrix_metrics_exposure_enabled }}"
  1367. matrix_mautrix_meta_messenger_metrics_proxying_enabled: "{{ matrix_mautrix_meta_messenger_metrics_enabled and matrix_metrics_exposure_enabled }}"
  1368. matrix_mautrix_meta_messenger_metrics_proxying_hostname: "{{ matrix_metrics_exposure_hostname }}"
  1369. matrix_mautrix_meta_messenger_metrics_proxying_path_prefix: "{{ matrix_metrics_exposure_path_prefix }}/mautrix-meta-messenger"
  1370. # We'd like to force-set people with external Postgres to SQLite, so the bridge role can complain
  1371. # and point them to a migration path.
  1372. matrix_mautrix_meta_messenger_database_engine: "{{ 'postgres' if postgres_enabled else 'sqlite3-fk-wal' }}"
  1373. matrix_mautrix_meta_messenger_database_hostname: "{{ postgres_connection_hostname if (postgres_enabled and matrix_mautrix_meta_messenger_database_engine == 'postgres') else '' }}"
  1374. matrix_mautrix_meta_messenger_database_password: "{{ ('%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mau.fb.db', rounds=655555) | to_uuid) if (postgres_enabled and matrix_mautrix_meta_messenger_database_engine == 'postgres') else '' }}"
  1375. ######################################################################
  1376. #
  1377. # /matrix-bridge-mautrix-meta-messenger
  1378. #
  1379. ######################################################################
  1380. ######################################################################
  1381. #
  1382. # matrix-bridge-mautrix-meta-instagram
  1383. #
  1384. ######################################################################
  1385. # We don't enable bridges by default.
  1386. matrix_mautrix_meta_instagram_enabled: false
  1387. matrix_mautrix_meta_instagram_systemd_required_services_list_auto: |
  1388. {{
  1389. matrix_addons_homeserver_systemd_services_list
  1390. +
  1391. ([postgres_identifier ~ '.service'] if (postgres_enabled and matrix_mautrix_meta_instagram_database_hostname == postgres_connection_hostname) else [])
  1392. }}
  1393. matrix_mautrix_meta_instagram_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_mautrix_meta_instagram_container_image_registry_prefix_upstream_default }}"
  1394. matrix_mautrix_meta_instagram_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm64'] }}"
  1395. matrix_mautrix_meta_instagram_container_network: "{{ matrix_addons_container_network }}"
  1396. matrix_mautrix_meta_instagram_container_additional_networks_auto: |-
  1397. {{
  1398. (
  1399. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  1400. +
  1401. ([postgres_container_network] if (postgres_enabled and matrix_mautrix_meta_instagram_database_hostname == postgres_connection_hostname and matrix_mautrix_meta_instagram_container_network != postgres_container_network) else [])
  1402. +
  1403. ([matrix_playbook_reverse_proxyable_services_additional_network] if (matrix_playbook_reverse_proxyable_services_additional_network and matrix_mautrix_meta_instagram_container_labels_traefik_enabled) else [])
  1404. ) | unique
  1405. }}
  1406. matrix_mautrix_meta_instagram_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  1407. matrix_mautrix_meta_instagram_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  1408. matrix_mautrix_meta_instagram_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  1409. matrix_mautrix_meta_instagram_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  1410. matrix_mautrix_meta_instagram_container_labels_metrics_middleware_basic_auth_enabled: "{{ matrix_metrics_exposure_http_basic_auth_enabled }}"
  1411. matrix_mautrix_meta_instagram_container_labels_metrics_middleware_basic_auth_users: "{{ matrix_metrics_exposure_http_basic_auth_users }}"
  1412. matrix_mautrix_meta_instagram_appservice_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mau.meta.ig.as', rounds=655555) | to_uuid }}"
  1413. matrix_mautrix_meta_instagram_homeserver_address: "{{ matrix_addons_homeserver_client_api_url }}"
  1414. matrix_mautrix_meta_instagram_homeserver_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mau.meta.ig.hs', rounds=655555) | to_uuid }}"
  1415. matrix_mautrix_meta_instagram_homeserver_async_media: "{{ matrix_homeserver_implementation in ['synapse'] }}"
  1416. matrix_mautrix_meta_instagram_double_puppet_secrets_auto: |-
  1417. {{
  1418. {
  1419. matrix_mautrix_meta_instagram_homeserver_domain: ("as_token:" + matrix_appservice_double_puppet_registration_as_token)
  1420. }
  1421. if matrix_appservice_double_puppet_enabled
  1422. else {}
  1423. }}
  1424. matrix_mautrix_meta_instagram_metrics_enabled: "{{ prometheus_enabled or matrix_metrics_exposure_enabled }}"
  1425. matrix_mautrix_meta_instagram_metrics_proxying_enabled: "{{ matrix_mautrix_meta_instagram_metrics_enabled and matrix_metrics_exposure_enabled }}"
  1426. matrix_mautrix_meta_instagram_metrics_proxying_hostname: "{{ matrix_metrics_exposure_hostname }}"
  1427. matrix_mautrix_meta_instagram_metrics_proxying_path_prefix: "{{ matrix_metrics_exposure_path_prefix }}/mautrix-meta-instagram"
  1428. # We'd like to force-set people with external Postgres to SQLite, so the bridge role can complain
  1429. # and point them to a migration path.
  1430. matrix_mautrix_meta_instagram_database_engine: "{{ 'postgres' if postgres_enabled else 'sqlite3-fk-wal' }}"
  1431. matrix_mautrix_meta_instagram_database_hostname: "{{ postgres_connection_hostname if (postgres_enabled and matrix_mautrix_meta_instagram_database_engine == 'postgres') else '' }}"
  1432. matrix_mautrix_meta_instagram_database_password: "{{ ('%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mau.fb.db', rounds=655555) | to_uuid) if (postgres_enabled and matrix_mautrix_meta_instagram_database_engine == 'postgres') else '' }}"
  1433. ######################################################################
  1434. #
  1435. # /matrix-bridge-mautrix-meta-instagram
  1436. #
  1437. ######################################################################
  1438. ######################################################################
  1439. #
  1440. # matrix-bridge-mautrix-telegram
  1441. #
  1442. ######################################################################
  1443. # We don't enable bridges by default.
  1444. matrix_mautrix_telegram_enabled: false
  1445. matrix_mautrix_telegram_hostname: "{{ matrix_server_fqn_matrix }}"
  1446. matrix_mautrix_telegram_path_prefix: "/{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'telegram', rounds=655555) | to_uuid }}"
  1447. matrix_mautrix_telegram_systemd_required_services_list_auto: |
  1448. {{
  1449. matrix_addons_homeserver_systemd_services_list
  1450. +
  1451. ([postgres_identifier ~ '.service'] if (postgres_enabled and matrix_mautrix_telegram_database_hostname == postgres_connection_hostname) else [])
  1452. }}
  1453. matrix_mautrix_telegram_lottieconverter_docker_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_mautrix_telegram_lottieconverter_docker_image_registry_prefix_upstream_default }}"
  1454. matrix_mautrix_telegram_docker_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_mautrix_telegram_docker_image_registry_prefix_upstream_default }}"
  1455. # Images are multi-arch (amd64 and arm64, but not arm32).
  1456. matrix_mautrix_telegram_container_image_self_build: "{{ matrix_architecture not in ['arm64', 'amd64'] }}"
  1457. matrix_mautrix_telegram_lottieconverter_container_image_self_build: "{{ matrix_architecture not in ['arm64', 'amd64'] }}"
  1458. matrix_mautrix_telegram_lottieconverter_container_image_self_build_mask_arch: "{{ matrix_architecture != 'amd64' }}"
  1459. matrix_mautrix_telegram_container_http_host_bind_port: "{{ (matrix_playbook_service_host_bind_interface_prefix ~ '9006') if matrix_playbook_service_host_bind_interface_prefix else '' }}"
  1460. matrix_mautrix_telegram_container_network: "{{ matrix_addons_container_network }}"
  1461. matrix_mautrix_telegram_container_additional_networks_auto: |-
  1462. {{
  1463. (
  1464. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  1465. +
  1466. ([postgres_container_network] if (postgres_enabled and matrix_mautrix_telegram_database_hostname == postgres_connection_hostname and matrix_mautrix_telegram_container_network != postgres_container_network) else [])
  1467. +
  1468. ([matrix_playbook_reverse_proxyable_services_additional_network] if (matrix_playbook_reverse_proxyable_services_additional_network and matrix_mautrix_telegram_container_labels_traefik_enabled) else [])
  1469. ) | unique
  1470. }}
  1471. matrix_mautrix_telegram_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  1472. matrix_mautrix_telegram_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  1473. matrix_mautrix_telegram_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  1474. matrix_mautrix_telegram_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  1475. matrix_mautrix_telegram_container_labels_metrics_middleware_basic_auth_enabled: "{{ matrix_metrics_exposure_http_basic_auth_enabled }}"
  1476. matrix_mautrix_telegram_container_labels_metrics_middleware_basic_auth_users: "{{ matrix_metrics_exposure_http_basic_auth_users }}"
  1477. matrix_mautrix_telegram_appservice_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'telegr.as.token', rounds=655555) | to_uuid }}"
  1478. matrix_mautrix_telegram_homeserver_domain: "{{ matrix_domain }}"
  1479. matrix_mautrix_telegram_homeserver_address: "{{ matrix_addons_homeserver_client_api_url }}"
  1480. matrix_mautrix_telegram_homeserver_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'telegr.hs.token', rounds=655555) | to_uuid }}"
  1481. matrix_mautrix_telegram_homeserver_async_media: "{{ matrix_homeserver_implementation in ['synapse'] }}"
  1482. matrix_mautrix_telegram_bridge_login_shared_secret_map_auto: |-
  1483. {{
  1484. ({
  1485. matrix_mautrix_telegram_homeserver_domain: ("as_token:" + matrix_appservice_double_puppet_registration_as_token)
  1486. })
  1487. if matrix_appservice_double_puppet_enabled
  1488. else (
  1489. {matrix_mautrix_telegram_homeserver_domain: matrix_synapse_ext_password_provider_shared_secret_auth_shared_secret}
  1490. if matrix_synapse_ext_password_provider_shared_secret_auth_enabled
  1491. else {}
  1492. )
  1493. }}
  1494. matrix_mautrix_telegram_metrics_enabled: "{{ prometheus_enabled or matrix_metrics_exposure_enabled }}"
  1495. matrix_mautrix_telegram_metrics_proxying_enabled: "{{ matrix_mautrix_telegram_metrics_enabled and matrix_metrics_exposure_enabled }}"
  1496. matrix_mautrix_telegram_metrics_proxying_hostname: "{{ matrix_metrics_exposure_hostname }}"
  1497. matrix_mautrix_telegram_metrics_proxying_path_prefix: "{{ matrix_metrics_exposure_path_prefix }}/mautrix-telegram"
  1498. # Postgres is the default, except if not using internal Postgres server
  1499. matrix_mautrix_telegram_database_engine: "{{ 'postgres' if postgres_enabled else 'sqlite' }}"
  1500. matrix_mautrix_telegram_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  1501. matrix_mautrix_telegram_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mau.telegram.db', rounds=655555) | to_uuid }}"
  1502. ######################################################################
  1503. #
  1504. # /matrix-bridge-mautrix-telegram
  1505. #
  1506. ######################################################################
  1507. ######################################################################
  1508. #
  1509. # matrix-bridge-mautrix-twitter
  1510. #
  1511. ######################################################################
  1512. # We don't enable bridges by default.
  1513. matrix_mautrix_twitter_enabled: false
  1514. matrix_mautrix_twitter_systemd_required_services_list_auto: |
  1515. {{
  1516. matrix_addons_homeserver_systemd_services_list
  1517. +
  1518. ([postgres_identifier ~ '.service'] if (postgres_enabled and matrix_mautrix_twitter_database_hostname == postgres_connection_hostname) else [])
  1519. }}
  1520. matrix_mautrix_twitter_docker_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_mautrix_twitter_docker_image_registry_prefix_upstream_default }}"
  1521. matrix_mautrix_twitter_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm64'] }}"
  1522. matrix_mautrix_twitter_container_network: "{{ matrix_addons_container_network }}"
  1523. matrix_mautrix_twitter_container_additional_networks_auto: |-
  1524. {{
  1525. (
  1526. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  1527. +
  1528. ([postgres_container_network] if (postgres_enabled and matrix_mautrix_twitter_database_hostname == postgres_connection_hostname and matrix_mautrix_twitter_container_network != postgres_container_network) else [])
  1529. +
  1530. ([matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network and matrix_mautrix_twitter_container_labels_traefik_enabled else [])
  1531. ) | unique
  1532. }}
  1533. matrix_mautrix_twitter_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  1534. matrix_mautrix_twitter_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  1535. matrix_mautrix_twitter_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  1536. matrix_mautrix_twitter_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  1537. matrix_mautrix_twitter_container_labels_metrics_middleware_basic_auth_enabled: "{{ matrix_metrics_exposure_http_basic_auth_enabled }}"
  1538. matrix_mautrix_twitter_container_labels_metrics_middleware_basic_auth_users: "{{ matrix_metrics_exposure_http_basic_auth_users }}"
  1539. matrix_mautrix_twitter_appservice_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'twt.as.token', rounds=655555) | to_uuid }}"
  1540. matrix_mautrix_twitter_homeserver_address: "{{ matrix_addons_homeserver_client_api_url }}"
  1541. matrix_mautrix_twitter_homeserver_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'twt.hs.token', rounds=655555) | to_uuid }}"
  1542. matrix_mautrix_twitter_homeserver_async_media: "{{ matrix_homeserver_implementation in ['synapse'] }}"
  1543. matrix_mautrix_twitter_provisioning_shared_secret: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mau.twit.prov', rounds=655555) | to_uuid }}"
  1544. matrix_mautrix_twitter_double_puppet_secrets_auto: |-
  1545. {{
  1546. ({
  1547. matrix_mautrix_twitter_homeserver_domain: ("as_token:" + matrix_appservice_double_puppet_registration_as_token)
  1548. })
  1549. if matrix_appservice_double_puppet_enabled
  1550. else {}
  1551. }}
  1552. matrix_mautrix_twitter_metrics_enabled: "{{ prometheus_enabled or matrix_metrics_exposure_enabled }}"
  1553. matrix_mautrix_twitter_metrics_proxying_enabled: "{{ matrix_mautrix_twitter_metrics_enabled and matrix_metrics_exposure_enabled }}"
  1554. matrix_mautrix_twitter_metrics_proxying_hostname: "{{ matrix_metrics_exposure_hostname }}"
  1555. matrix_mautrix_twitter_metrics_proxying_path_prefix: "{{ matrix_metrics_exposure_path_prefix }}/mautrix-twitter"
  1556. matrix_mautrix_twitter_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  1557. matrix_mautrix_twitter_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mau.twt.db', rounds=655555) | to_uuid if postgres_enabled else '' }}"
  1558. ######################################################################
  1559. #
  1560. # /matrix-bridge-mautrix-twitter
  1561. #
  1562. ######################################################################
  1563. ######################################################################
  1564. #
  1565. # matrix-bridge-mautrix-gmessages
  1566. #
  1567. ######################################################################
  1568. # We don't enable bridges by default.
  1569. matrix_mautrix_gmessages_enabled: false
  1570. matrix_mautrix_gmessages_systemd_required_services_list_auto: |
  1571. {{
  1572. matrix_addons_homeserver_systemd_services_list
  1573. +
  1574. ([postgres_identifier ~ '.service'] if (postgres_enabled and matrix_mautrix_facebook_database_hostname == postgres_connection_hostname) else [])
  1575. }}
  1576. matrix_mautrix_gmessages_docker_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_mautrix_gmessages_docker_image_registry_prefix_upstream_default }}"
  1577. matrix_mautrix_gmessages_container_image_self_build: "{{ matrix_architecture not in ['arm64', 'amd64'] }}"
  1578. matrix_mautrix_gmessages_container_network: "{{ matrix_addons_container_network }}"
  1579. matrix_mautrix_gmessages_container_additional_networks_auto: |-
  1580. {{
  1581. (
  1582. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  1583. +
  1584. ([postgres_container_network] if (postgres_enabled and matrix_mautrix_gmessages_database_hostname == postgres_connection_hostname and matrix_mautrix_gmessages_container_network != postgres_container_network) else [])
  1585. +
  1586. ([matrix_playbook_reverse_proxyable_services_additional_network] if (matrix_playbook_reverse_proxyable_services_additional_network and matrix_mautrix_gmessages_container_labels_traefik_enabled) else [])
  1587. ) | unique
  1588. }}
  1589. matrix_mautrix_gmessages_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  1590. matrix_mautrix_gmessages_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  1591. matrix_mautrix_gmessages_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  1592. matrix_mautrix_gmessages_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  1593. matrix_mautrix_gmessages_container_labels_metrics_middleware_basic_auth_enabled: "{{ matrix_metrics_exposure_http_basic_auth_enabled }}"
  1594. matrix_mautrix_gmessages_container_labels_metrics_middleware_basic_auth_users: "{{ matrix_metrics_exposure_http_basic_auth_users }}"
  1595. matrix_mautrix_gmessages_appservice_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'gmessa.as.token', rounds=655555) | to_uuid }}"
  1596. matrix_mautrix_gmessages_homeserver_address: "{{ matrix_addons_homeserver_client_api_url }}"
  1597. matrix_mautrix_gmessages_homeserver_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'gmessa.hs.token', rounds=655555) | to_uuid }}"
  1598. matrix_mautrix_gmessages_homeserver_async_media: "{{ matrix_homeserver_implementation in ['synapse'] }}"
  1599. matrix_mautrix_gmessages_double_puppet_secrets_auto: |-
  1600. {{
  1601. {
  1602. matrix_mautrix_gmessages_homeserver_domain: ("as_token:" + matrix_appservice_double_puppet_registration_as_token)
  1603. }
  1604. if matrix_appservice_double_puppet_enabled
  1605. else {}
  1606. }}
  1607. matrix_mautrix_gmessages_metrics_enabled: "{{ prometheus_enabled or matrix_metrics_exposure_enabled }}"
  1608. matrix_mautrix_gmessages_metrics_proxying_enabled: "{{ matrix_mautrix_gmessages_metrics_enabled and matrix_metrics_exposure_enabled }}"
  1609. matrix_mautrix_gmessages_metrics_proxying_hostname: "{{ matrix_metrics_exposure_hostname }}"
  1610. matrix_mautrix_gmessages_metrics_proxying_path_prefix: "{{ matrix_metrics_exposure_path_prefix }}/mautrix-gmessages"
  1611. # Postgres is the default, except if not using internal Postgres server
  1612. matrix_mautrix_gmessages_database_engine: "{{ 'postgres' if postgres_enabled else 'sqlite' }}"
  1613. matrix_mautrix_gmessages_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  1614. matrix_mautrix_gmessages_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'maugmessages.db', rounds=655555) | to_uuid }}"
  1615. ######################################################################
  1616. #
  1617. # /matrix-bridge-mautrix-gmessages
  1618. #
  1619. ######################################################################
  1620. ######################################################################
  1621. #
  1622. # matrix-bridge-mautrix-wsproxy
  1623. #
  1624. ######################################################################
  1625. # We don't enable bridges by default.
  1626. matrix_mautrix_wsproxy_enabled: false
  1627. matrix_mautrix_wsproxy_systemd_required_services_list_default: |
  1628. {{
  1629. matrix_addons_homeserver_systemd_services_list
  1630. +
  1631. ([postgres_identifier ~ '.service'] if (postgres_enabled and matrix_mautrix_wsproxy_syncproxy_database_hostname == postgres_connection_hostname) else [])
  1632. }}
  1633. matrix_mautrix_wsproxy_homeserver_domain: "{{ matrix_domain }}"
  1634. matrix_mautrix_wsproxy_homeserver_address: "{{ matrix_addons_homeserver_client_api_url }}"
  1635. matrix_mautrix_wsproxy_hostname: "wsproxy.{{ matrix_mautrix_wsproxy_homeserver_domain }}"
  1636. matrix_mautrix_wsproxy_syncproxy_homeserver_url: "{{ matrix_addons_homeserver_client_api_url }}"
  1637. matrix_mautrix_wsproxy_docker_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_mautrix_wsproxy_docker_image_registry_prefix_upstream_default }}"
  1638. matrix_mautrix_wsproxy_container_network: "{{ matrix_addons_container_network }}"
  1639. matrix_mautrix_wsproxy_container_additional_networks: |
  1640. {{
  1641. (
  1642. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  1643. +
  1644. ([matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network else [])
  1645. +
  1646. ([postgres_container_network] if (postgres_enabled and matrix_mautrix_wsproxy_syncproxy_database_hostname == postgres_connection_hostname and postgres_container_network != matrix_mautrix_wsproxy_container_network) else [])
  1647. ) | unique
  1648. }}
  1649. matrix_mautrix_wsproxy_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  1650. matrix_mautrix_wsproxy_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  1651. matrix_mautrix_wsproxy_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  1652. matrix_mautrix_wsproxy_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  1653. matrix_mautrix_wsproxy_syncproxy_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  1654. matrix_mautrix_wsproxy_syncproxy_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'wsproxy.db', rounds=655555) | to_uuid }}"
  1655. ######################################################################
  1656. #
  1657. # /matrix-bridge-mautrix-wsproxy
  1658. #
  1659. ######################################################################
  1660. ######################################################################
  1661. #
  1662. # matrix-bridge-wechat
  1663. #
  1664. ######################################################################
  1665. # We don't enable bridges by default.
  1666. matrix_wechat_enabled: false
  1667. matrix_wechat_systemd_required_services_list_auto: |
  1668. {{
  1669. matrix_addons_homeserver_systemd_services_list
  1670. +
  1671. ([postgres_identifier ~ '.service'] if (postgres_enabled and matrix_wechat_database_hostname == postgres_connection_hostname) else [])
  1672. }}
  1673. matrix_wechat_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_wechat_container_image_registry_prefix_upstream_default }}"
  1674. matrix_wechat_agent_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_wechat_agent_container_image_registry_prefix_upstream_default }}"
  1675. matrix_wechat_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm64'] }}"
  1676. matrix_wechat_agent_container_image_self_build: "{{ matrix_architecture not in ['amd64'] }}"
  1677. matrix_wechat_container_network: "{{ matrix_addons_container_network }}"
  1678. matrix_wechat_container_additional_networks_auto: |-
  1679. {{
  1680. (
  1681. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  1682. +
  1683. ([postgres_container_network] if (postgres_enabled and matrix_wechat_database_hostname == postgres_connection_hostname and matrix_wechat_container_network != postgres_container_network) else [])
  1684. ) | unique
  1685. }}
  1686. matrix_wechat_appservice_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'wechat.as.token', rounds=655555) | to_uuid }}"
  1687. matrix_wechat_homeserver_address: "{{ matrix_addons_homeserver_client_api_url }}"
  1688. matrix_wechat_homeserver_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'wechat.hs.token', rounds=655555) | to_uuid }}"
  1689. matrix_wechat_homeserver_async_media: "{{ matrix_homeserver_implementation in ['synapse'] }}"
  1690. matrix_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 '' }}"
  1691. matrix_wechat_bridge_listen_secret: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'wechat.lstn', rounds=655555) | to_uuid }}"
  1692. # Postgres is the default, except if not using internal Postgres server
  1693. matrix_wechat_database_engine: "{{ 'postgres' if postgres_enabled else 'sqlite' }}"
  1694. matrix_wechat_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  1695. matrix_wechat_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'gowechat.db', rounds=655555) | to_uuid }}"
  1696. ######################################################################
  1697. #
  1698. # /matrix-bridge-wechat
  1699. #
  1700. ######################################################################
  1701. ######################################################################
  1702. #
  1703. # matrix-bridge-mautrix-whatsapp
  1704. #
  1705. ######################################################################
  1706. # We don't enable bridges by default.
  1707. matrix_mautrix_whatsapp_enabled: false
  1708. matrix_mautrix_whatsapp_docker_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_mautrix_whatsapp_docker_image_registry_prefix_upstream_default }}"
  1709. matrix_mautrix_whatsapp_container_image_self_build: "{{ matrix_architecture not in ['arm64', 'amd64'] }}"
  1710. matrix_mautrix_whatsapp_container_network: "{{ matrix_addons_container_network }}"
  1711. matrix_mautrix_whatsapp_container_additional_networks_auto: |-
  1712. {{
  1713. (
  1714. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  1715. +
  1716. ([postgres_container_network] if postgres_enabled and matrix_mautrix_whatsapp_database_hostname == postgres_connection_hostname else [])
  1717. +
  1718. ([matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network and matrix_mautrix_whatsapp_container_labels_traefik_enabled else [])
  1719. ) | unique
  1720. }}
  1721. matrix_mautrix_whatsapp_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  1722. matrix_mautrix_whatsapp_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  1723. matrix_mautrix_whatsapp_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  1724. matrix_mautrix_whatsapp_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  1725. matrix_mautrix_whatsapp_container_labels_metrics_middleware_basic_auth_enabled: "{{ matrix_metrics_exposure_http_basic_auth_enabled }}"
  1726. matrix_mautrix_whatsapp_container_labels_metrics_middleware_basic_auth_users: "{{ matrix_metrics_exposure_http_basic_auth_users }}"
  1727. matrix_mautrix_whatsapp_systemd_required_services_list_auto: |
  1728. {{
  1729. matrix_addons_homeserver_systemd_services_list
  1730. +
  1731. ([postgres_identifier ~ '.service'] if postgres_enabled and matrix_mautrix_whatsapp_database_hostname == postgres_connection_hostname else [])
  1732. }}
  1733. matrix_mautrix_whatsapp_appservice_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'whats.as.token', rounds=655555) | to_uuid }}"
  1734. matrix_mautrix_whatsapp_homeserver_address: "{{ matrix_addons_homeserver_client_api_url }}"
  1735. matrix_mautrix_whatsapp_homeserver_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'whats.hs.token', rounds=655555) | to_uuid }}"
  1736. matrix_mautrix_whatsapp_homeserver_async_media: "{{ matrix_homeserver_implementation in ['synapse'] }}"
  1737. matrix_mautrix_whatsapp_double_puppet_secrets_auto: |-
  1738. {{
  1739. {
  1740. matrix_mautrix_whatsapp_homeserver_domain: ("as_token:" + matrix_appservice_double_puppet_registration_as_token)
  1741. }
  1742. if matrix_appservice_double_puppet_enabled
  1743. else {}
  1744. }}
  1745. matrix_mautrix_whatsapp_metrics_enabled: "{{ prometheus_enabled or matrix_metrics_exposure_enabled }}"
  1746. matrix_mautrix_whatsapp_metrics_proxying_enabled: "{{ matrix_mautrix_whatsapp_metrics_enabled and matrix_metrics_exposure_enabled }}"
  1747. matrix_mautrix_whatsapp_metrics_proxying_hostname: "{{ matrix_metrics_exposure_hostname }}"
  1748. matrix_mautrix_whatsapp_metrics_proxying_path_prefix: "{{ matrix_metrics_exposure_path_prefix }}/mautrix-whatsapp"
  1749. # Postgres is the default, except if not using internal Postgres server
  1750. matrix_mautrix_whatsapp_database_engine: "{{ 'postgres' if postgres_enabled else 'sqlite' }}"
  1751. matrix_mautrix_whatsapp_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  1752. matrix_mautrix_whatsapp_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mauwhatsapp.db', rounds=655555) | to_uuid }}"
  1753. ######################################################################
  1754. #
  1755. # /matrix-bridge-mautrix-whatsapp
  1756. #
  1757. ######################################################################
  1758. ######################################################################
  1759. #
  1760. # matrix-sms-bridge
  1761. #
  1762. ######################################################################
  1763. # We don't enable bridges by default.
  1764. matrix_sms_bridge_enabled: false
  1765. matrix_sms_bridge_systemd_required_services_list_auto: |
  1766. {{
  1767. matrix_addons_homeserver_systemd_services_list
  1768. +
  1769. ([postgres_identifier ~ '.service'] if (postgres_enabled and matrix_mautrix_facebook_database_hostname == postgres_connection_hostname) else [])
  1770. }}
  1771. matrix_sms_bridge_docker_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_sms_bridge_docker_image_registry_prefix_upstream_default }}"
  1772. matrix_sms_bridge_container_network: "{{ matrix_addons_container_network }}"
  1773. matrix_sms_bridge_container_additional_networks_auto: |-
  1774. {{
  1775. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  1776. }}
  1777. matrix_sms_bridge_appservice_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'sms.as.token', rounds=655555) | to_uuid }}"
  1778. matrix_sms_bridge_homeserver_hostname: "{{ (matrix_homeserver_container_client_api_endpoint | split(':'))[0] }}"
  1779. matrix_sms_bridge_homeserver_port: "{{ (matrix_homeserver_container_client_api_endpoint | split(':'))[1] }}"
  1780. matrix_sms_bridge_homeserver_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'sms.hs.token', rounds=655555) | to_uuid }}"
  1781. ######################################################################
  1782. #
  1783. # /matrix-sms-bridge
  1784. #
  1785. ######################################################################
  1786. ######################################################################
  1787. #
  1788. # matrix-bridge-heisenbridge
  1789. #
  1790. ######################################################################
  1791. # We don't enable bridges by default.
  1792. matrix_heisenbridge_enabled: false
  1793. matrix_heisenbridge_scheme: "{{ 'https' if matrix_playbook_ssl_enabled else 'http' }}"
  1794. matrix_heisenbridge_systemd_required_services_list_auto: |
  1795. {{
  1796. matrix_addons_homeserver_systemd_services_list
  1797. }}
  1798. matrix_heisenbridge_docker_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_heisenbridge_docker_image_registry_prefix_upstream_default }}"
  1799. matrix_heisenbridge_container_network: "{{ matrix_addons_container_network }}"
  1800. matrix_heisenbridge_container_additional_networks_auto: |-
  1801. {{
  1802. (
  1803. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  1804. +
  1805. [matrix_playbook_reverse_proxyable_services_additional_network] if (matrix_heisenbridge_container_labels_traefik_enabled and matrix_playbook_reverse_proxyable_services_additional_network) else []
  1806. ) | unique
  1807. }}
  1808. matrix_heisenbridge_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  1809. matrix_heisenbridge_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  1810. matrix_heisenbridge_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  1811. matrix_heisenbridge_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  1812. matrix_heisenbridge_appservice_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'heisen.as.tok', rounds=655555) | to_uuid }}"
  1813. matrix_heisenbridge_homeserver_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'heisen.hs.tok', rounds=655555) | to_uuid }}"
  1814. matrix_heisenbridge_homeserver_url: "{{ matrix_addons_homeserver_client_api_url }}"
  1815. ######################################################################
  1816. #
  1817. # /matrix-bridge-heisenbridge
  1818. #
  1819. ######################################################################
  1820. ######################################################################
  1821. #
  1822. # matrix-bridge-hookshot
  1823. #
  1824. ######################################################################
  1825. # We don't enable bridges by default.
  1826. matrix_hookshot_enabled: false
  1827. matrix_hookshot_docker_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_hookshot_docker_image_registry_prefix_upstream_default }}"
  1828. matrix_hookshot_container_image_self_build: "{{ matrix_architecture not in ['arm64', 'amd64'] }}"
  1829. matrix_hookshot_appservice_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'hookshot.as.tok', rounds=655555) | to_uuid }}"
  1830. matrix_hookshot_homeserver_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'hookshot.hs.tok', rounds=655555) | to_uuid }}"
  1831. matrix_hookshot_homeserver_address: "{{ matrix_addons_homeserver_client_api_url }}"
  1832. matrix_hookshot_systemd_wanted_services_list: |
  1833. {{
  1834. matrix_addons_homeserver_systemd_services_list
  1835. +
  1836. ([(valkey_identifier + '.service')] if valkey_enabled and matrix_hookshot_cache_redis_host == valkey_identifier else [])
  1837. }}
  1838. # Hookshot's experimental encryption feature (and possibly others) may benefit from Redis, if available.
  1839. # We only connect to Redis if encryption is enabled (not for everyone who has Redis enabled),
  1840. # because connectivity is still potentially troublesome and is to be investigated.
  1841. matrix_hookshot_cache_redis_host: "{{ valkey_identifier if valkey_enabled else '' }}"
  1842. matrix_hookshot_container_network: "{{ matrix_addons_container_network }}"
  1843. matrix_hookshot_container_additional_networks_auto: |
  1844. {{
  1845. (
  1846. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  1847. +
  1848. ([valkey_container_network] if valkey_enabled and matrix_hookshot_cache_redis_host == valkey_identifier else [])
  1849. +
  1850. ([matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network and matrix_hookshot_container_labels_traefik_enabled else [])
  1851. ) | unique
  1852. }}
  1853. matrix_hookshot_container_http_host_bind_ports_defaultmapping:
  1854. - "{{ matrix_playbook_service_host_bind_interface_prefix }}{{ matrix_hookshot_appservice_port }}:{{ matrix_hookshot_appservice_port }}"
  1855. - "{{ matrix_playbook_service_host_bind_interface_prefix }}{{ matrix_hookshot_metrics_port }}:{{ matrix_hookshot_metrics_port }}"
  1856. - "{{ matrix_playbook_service_host_bind_interface_prefix }}{{ matrix_hookshot_webhook_port }}:{{ matrix_hookshot_webhook_port }}"
  1857. matrix_hookshot_container_http_host_bind_ports: "{{ matrix_hookshot_container_http_host_bind_ports_defaultmapping if matrix_playbook_service_host_bind_interface_prefix else [] }}"
  1858. matrix_hookshot_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  1859. matrix_hookshot_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  1860. matrix_hookshot_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  1861. matrix_hookshot_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  1862. matrix_hookshot_metrics_enabled: "{{ prometheus_enabled or matrix_metrics_exposure_enabled }}"
  1863. matrix_hookshot_metrics_proxying_enabled: "{{ matrix_hookshot_metrics_enabled and matrix_metrics_exposure_enabled }}"
  1864. matrix_hookshot_metrics_proxying_hostname: "{{ matrix_metrics_exposure_hostname }}"
  1865. matrix_hookshot_metrics_proxying_path_prefix: "{{ matrix_metrics_exposure_path_prefix }}/hookshot"
  1866. matrix_hookshot_container_labels_metrics_middleware_basic_auth_enabled: "{{ matrix_metrics_exposure_http_basic_auth_enabled }}"
  1867. matrix_hookshot_container_labels_metrics_middleware_basic_auth_users: "{{ matrix_metrics_exposure_http_basic_auth_users }}"
  1868. matrix_hookshot_public_scheme: "{{ 'https' if matrix_playbook_ssl_enabled else 'http' }}"
  1869. matrix_hookshot_public_hostname: "{{ matrix_server_fqn_matrix }}"
  1870. ######################################################################
  1871. #
  1872. # /matrix-bridge-hookshot
  1873. #
  1874. ######################################################################
  1875. ######################################################################
  1876. #
  1877. # matrix-bridge-mx-puppet-slack
  1878. #
  1879. ######################################################################
  1880. # We don't enable bridges by default.
  1881. matrix_mx_puppet_slack_enabled: false
  1882. matrix_mx_puppet_slack_hostname: "{{ matrix_server_fqn_matrix }}"
  1883. matrix_mx_puppet_slack_systemd_required_services_list_auto: |
  1884. {{
  1885. matrix_addons_homeserver_systemd_services_list
  1886. +
  1887. ([postgres_identifier ~ '.service'] if (postgres_enabled and matrix_mx_puppet_slack_database_hostname == postgres_connection_hostname) else [])
  1888. }}
  1889. matrix_mx_puppet_slack_docker_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_mx_puppet_slack_docker_image_registry_prefix_upstream_default }}"
  1890. matrix_mx_puppet_slack_container_image_self_build: "{{ matrix_architecture != 'amd64' }}"
  1891. matrix_mx_puppet_slack_container_network: "{{ matrix_addons_container_network }}"
  1892. matrix_mx_puppet_slack_container_additional_networks_auto: |-
  1893. {{
  1894. (
  1895. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  1896. +
  1897. ([postgres_container_network] if (postgres_enabled and matrix_mx_puppet_slack_database_hostname == postgres_connection_hostname and matrix_mx_puppet_slack_container_network != postgres_container_network) else [])
  1898. +
  1899. ([matrix_playbook_reverse_proxyable_services_additional_network] if (matrix_playbook_reverse_proxyable_services_additional_network and matrix_mx_puppet_slack_container_labels_traefik_enabled) else [])
  1900. ) | unique
  1901. }}
  1902. matrix_mx_puppet_slack_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  1903. matrix_mx_puppet_slack_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  1904. matrix_mx_puppet_slack_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  1905. matrix_mx_puppet_slack_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  1906. matrix_mx_puppet_slack_appservice_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mxslk.as.tok', rounds=655555) | to_uuid }}"
  1907. matrix_mx_puppet_slack_homeserver_address: "{{ matrix_addons_homeserver_client_api_url }}"
  1908. matrix_mx_puppet_slack_homeserver_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mxslk.hs.tok', rounds=655555) | to_uuid }}"
  1909. matrix_mx_puppet_slack_login_shared_secret: "{{ matrix_synapse_ext_password_provider_shared_secret_auth_shared_secret if matrix_synapse_ext_password_provider_shared_secret_auth_enabled else '' }}"
  1910. matrix_mx_puppet_slack_presence_enabled: "{{ matrix_homeserver_implementation != 'synapse' or matrix_synapse_presence_enabled }}"
  1911. # Postgres is the default, except if not using internal Postgres server
  1912. matrix_mx_puppet_slack_database_engine: "{{ 'postgres' if postgres_enabled else 'sqlite' }}"
  1913. matrix_mx_puppet_slack_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  1914. matrix_mx_puppet_slack_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mxpup.slack.db', rounds=655555) | to_uuid }}"
  1915. ######################################################################
  1916. #
  1917. # /matrix-bridge-mx-puppet-slack
  1918. #
  1919. ######################################################################
  1920. ######################################################################
  1921. #
  1922. # matrix-bridge-mx-puppet-twitter
  1923. #
  1924. ######################################################################
  1925. # We don't enable bridges by default.
  1926. matrix_mx_puppet_twitter_enabled: false
  1927. matrix_mx_puppet_twitter_hostname: "{{ matrix_server_fqn_matrix }}"
  1928. matrix_mx_puppet_twitter_systemd_required_services_list_auto: |
  1929. {{
  1930. matrix_addons_homeserver_systemd_services_list
  1931. +
  1932. ([postgres_identifier ~ '.service'] if (postgres_enabled and matrix_mx_puppet_twitter_database_hostname == postgres_connection_hostname) else [])
  1933. }}
  1934. matrix_mx_puppet_twitter_docker_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_mx_puppet_twitter_docker_image_registry_prefix_upstream_default }}"
  1935. matrix_mx_puppet_twitter_container_image_self_build: "{{ matrix_architecture != 'amd64' }}"
  1936. matrix_mx_puppet_twitter_container_http_host_bind_port: "{{ (matrix_playbook_service_host_bind_interface_prefix ~ '' ~ matrix_mx_puppet_twitter_appservice_port) if matrix_playbook_service_host_bind_interface_prefix else '' }}"
  1937. matrix_mx_puppet_twitter_container_network: "{{ matrix_addons_container_network }}"
  1938. matrix_mx_puppet_twitter_container_additional_networks_auto: |-
  1939. {{
  1940. (
  1941. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  1942. +
  1943. ([postgres_container_network] if (postgres_enabled and matrix_mx_puppet_twitter_database_hostname == postgres_connection_hostname and matrix_mx_puppet_twitter_container_network != postgres_container_network) else [])
  1944. +
  1945. ([matrix_playbook_reverse_proxyable_services_additional_network] if (matrix_playbook_reverse_proxyable_services_additional_network and matrix_mx_puppet_twitter_container_labels_traefik_enabled) else [])
  1946. ) | unique
  1947. }}
  1948. matrix_mx_puppet_twitter_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  1949. matrix_mx_puppet_twitter_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  1950. matrix_mx_puppet_twitter_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  1951. matrix_mx_puppet_twitter_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  1952. matrix_mx_puppet_twitter_appservice_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mxtwt.as.tok', rounds=655555) | to_uuid }}"
  1953. matrix_mx_puppet_twitter_homeserver_address: "{{ matrix_addons_homeserver_client_api_url }}"
  1954. matrix_mx_puppet_twitter_homeserver_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mxtwt.hs.tok', rounds=655555) | to_uuid }}"
  1955. matrix_mx_puppet_twitter_login_shared_secret: "{{ matrix_synapse_ext_password_provider_shared_secret_auth_shared_secret if matrix_synapse_ext_password_provider_shared_secret_auth_enabled else '' }}"
  1956. matrix_mx_puppet_twitter_presence_enabled: "{{ matrix_homeserver_implementation != 'synapse' or matrix_synapse_presence_enabled }}"
  1957. # Postgres is the default, except if not using internal Postgres server
  1958. matrix_mx_puppet_twitter_database_engine: "{{ 'postgres' if postgres_enabled else 'sqlite' }}"
  1959. matrix_mx_puppet_twitter_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  1960. matrix_mx_puppet_twitter_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mxpup.twitter.db', rounds=655555) | to_uuid }}"
  1961. ######################################################################
  1962. #
  1963. # /matrix-bridge-mx-puppet-twitter
  1964. #
  1965. ######################################################################
  1966. ######################################################################
  1967. #
  1968. # matrix-bridge-mx-puppet-instagram
  1969. #
  1970. ######################################################################
  1971. # We don't enable bridges by default.
  1972. matrix_mx_puppet_instagram_enabled: false
  1973. matrix_mx_puppet_instagram_systemd_required_services_list_auto: |
  1974. {{
  1975. matrix_addons_homeserver_systemd_services_list
  1976. +
  1977. ([postgres_identifier ~ '.service'] if (postgres_enabled and matrix_mx_puppet_instagram_database_hostname == postgres_connection_hostname) else [])
  1978. }}
  1979. matrix_mx_puppet_instagram_docker_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_mx_puppet_instagram_docker_image_registry_prefix_upstream_default }}"
  1980. matrix_mx_puppet_instagram_container_image_self_build: "{{ matrix_architecture != 'amd64' }}"
  1981. matrix_mx_puppet_instagram_container_network: "{{ matrix_addons_container_network }}"
  1982. matrix_mx_puppet_instagram_container_additional_networks_auto: |-
  1983. {{
  1984. (
  1985. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  1986. +
  1987. ([postgres_container_network] if (postgres_enabled and matrix_mx_puppet_instagram_database_hostname == postgres_connection_hostname and matrix_mx_puppet_instagram_container_network != postgres_container_network) else [])
  1988. ) | unique
  1989. }}
  1990. matrix_mx_puppet_instagram_appservice_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mxig.as.tok', rounds=655555) | to_uuid }}"
  1991. matrix_mx_puppet_instagram_homeserver_address: "{{ matrix_addons_homeserver_client_api_url }}"
  1992. matrix_mx_puppet_instagram_homeserver_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mxig.hs.tok', rounds=655555) | to_uuid }}"
  1993. matrix_mx_puppet_instagram_login_shared_secret: "{{ matrix_synapse_ext_password_provider_shared_secret_auth_shared_secret if matrix_synapse_ext_password_provider_shared_secret_auth_enabled else '' }}"
  1994. matrix_mx_puppet_instagram_presence_enabled: "{{ matrix_homeserver_implementation != 'synapse' or matrix_synapse_presence_enabled }}"
  1995. # Postgres is the default, except if not using internal Postgres server
  1996. matrix_mx_puppet_instagram_database_engine: "{{ 'postgres' if postgres_enabled else 'sqlite' }}"
  1997. matrix_mx_puppet_instagram_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  1998. matrix_mx_puppet_instagram_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mxpup.ig.db', rounds=655555) | to_uuid }}"
  1999. ######################################################################
  2000. #
  2001. # /matrix-bridge-mx-puppet-instagram
  2002. #
  2003. ######################################################################
  2004. ######################################################################
  2005. #
  2006. # matrix-bridge-mx-puppet-discord
  2007. #
  2008. ######################################################################
  2009. # We don't enable bridges by default.
  2010. matrix_mx_puppet_discord_enabled: false
  2011. matrix_mx_puppet_discord_systemd_required_services_list_auto: |
  2012. {{
  2013. matrix_addons_homeserver_systemd_services_list
  2014. +
  2015. ([postgres_identifier ~ '.service'] if (postgres_enabled and matrix_mx_puppet_discord_database_hostname == postgres_connection_hostname) else [])
  2016. }}
  2017. matrix_mx_puppet_discord_docker_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_mx_puppet_discord_docker_image_registry_prefix_upstream_default }}"
  2018. matrix_mx_puppet_discord_container_image_self_build: "{{ matrix_architecture != 'amd64' }}"
  2019. matrix_mx_puppet_discord_container_network: "{{ matrix_addons_container_network }}"
  2020. matrix_mx_puppet_discord_container_additional_networks_auto: |-
  2021. {{
  2022. (
  2023. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  2024. +
  2025. ([postgres_container_network] if (postgres_enabled and matrix_mx_puppet_discord_database_hostname == postgres_connection_hostname and matrix_mx_puppet_discord_container_network != postgres_container_network) else [])
  2026. ) | unique
  2027. }}
  2028. matrix_mx_puppet_discord_appservice_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mxdsc.as.tok', rounds=655555) | to_uuid }}"
  2029. matrix_mx_puppet_discord_homeserver_address: "{{ matrix_addons_homeserver_client_api_url }}"
  2030. matrix_mx_puppet_discord_homeserver_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mxdsc.hs.tok', rounds=655555) | to_uuid }}"
  2031. matrix_mx_puppet_discord_login_shared_secret: "{{ matrix_synapse_ext_password_provider_shared_secret_auth_shared_secret if matrix_synapse_ext_password_provider_shared_secret_auth_enabled else '' }}"
  2032. matrix_mx_puppet_discord_presence_enabled: "{{ matrix_homeserver_implementation != 'synapse' or matrix_synapse_presence_enabled }}"
  2033. # Postgres is the default, except if not using internal Postgres server
  2034. matrix_mx_puppet_discord_database_engine: "{{ 'postgres' if postgres_enabled else 'sqlite' }}"
  2035. matrix_mx_puppet_discord_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  2036. matrix_mx_puppet_discord_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mxpup.dsc.db', rounds=655555) | to_uuid }}"
  2037. ######################################################################
  2038. #
  2039. # /matrix-bridge-mx-puppet-discord
  2040. #
  2041. ######################################################################
  2042. ######################################################################
  2043. #
  2044. # matrix-bridge-mx-puppet-steam
  2045. #
  2046. ######################################################################
  2047. # We don't enable bridges by default.
  2048. matrix_mx_puppet_steam_enabled: false
  2049. matrix_mx_puppet_steam_systemd_required_services_list_auto: |
  2050. {{
  2051. matrix_addons_homeserver_systemd_services_list
  2052. +
  2053. ([postgres_identifier ~ '.service'] if (postgres_enabled and matrix_mx_puppet_steam_database_hostname == postgres_connection_hostname) else [])
  2054. }}
  2055. matrix_mx_puppet_steam_docker_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_mx_puppet_steam_docker_image_registry_prefix_upstream_default }}"
  2056. matrix_mx_puppet_steam_container_image_self_build: "{{ matrix_architecture not in ['arm64', 'amd64'] }}"
  2057. matrix_mx_puppet_steam_container_network: "{{ matrix_addons_container_network }}"
  2058. matrix_mx_puppet_steam_container_additional_networks_auto: |-
  2059. {{
  2060. (
  2061. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  2062. +
  2063. ([postgres_container_network] if (postgres_enabled and matrix_mx_puppet_steam_database_hostname == postgres_connection_hostname and matrix_mx_puppet_steam_container_network != postgres_container_network) else [])
  2064. ) | unique
  2065. }}
  2066. matrix_mx_puppet_steam_appservice_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mxste.as.tok', rounds=655555) | to_uuid }}"
  2067. matrix_mx_puppet_steam_homeserver_address: "{{ matrix_addons_homeserver_client_api_url }}"
  2068. matrix_mx_puppet_steam_homeserver_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mxste.hs.tok', rounds=655555) | to_uuid }}"
  2069. matrix_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 '' }}"
  2070. matrix_mx_puppet_steam_presence_enabled: "{{ matrix_homeserver_implementation != 'synapse' or matrix_synapse_presence_enabled }}"
  2071. # Postgres is the default, except if not using internal Postgres server
  2072. matrix_mx_puppet_steam_database_engine: "{{ 'postgres' if postgres_enabled else 'sqlite' }}"
  2073. matrix_mx_puppet_steam_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  2074. matrix_mx_puppet_steam_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mxpup.steam.db', rounds=655555) | to_uuid }}"
  2075. ######################################################################
  2076. #
  2077. # /matrix-bridge-mx-puppet-steam
  2078. #
  2079. ######################################################################
  2080. ######################################################################
  2081. #
  2082. # matrix-bridge-mx-puppet-groupme
  2083. #
  2084. ######################################################################
  2085. # We don't enable bridges by default.
  2086. matrix_mx_puppet_groupme_enabled: false
  2087. matrix_mx_puppet_groupme_systemd_required_services_list_auto: |
  2088. {{
  2089. matrix_addons_homeserver_systemd_services_list
  2090. +
  2091. ([postgres_identifier ~ '.service'] if (postgres_enabled and matrix_mx_puppet_groupme_database_hostname == postgres_connection_hostname) else [])
  2092. }}
  2093. matrix_mx_puppet_groupme_docker_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_mx_puppet_groupme_docker_image_registry_prefix_upstream_default }}"
  2094. matrix_mx_puppet_groupme_container_image_self_build: "{{ matrix_architecture != 'amd64' }}"
  2095. matrix_mx_puppet_groupme_container_network: "{{ matrix_addons_container_network }}"
  2096. matrix_mx_puppet_groupme_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_mx_puppet_groupme_database_hostname == postgres_connection_hostname and matrix_mx_puppet_groupme_container_network != postgres_container_network) else [])
  2102. ) | unique
  2103. }}
  2104. matrix_mx_puppet_groupme_appservice_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mxgro.as.tok', rounds=655555) | to_uuid }}"
  2105. matrix_mx_puppet_groupme_homeserver_address: "{{ matrix_addons_homeserver_client_api_url }}"
  2106. matrix_mx_puppet_groupme_homeserver_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mxgro.hs.tok', rounds=655555) | to_uuid }}"
  2107. matrix_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 '' }}"
  2108. matrix_mx_puppet_groupme_presence_enabled: "{{ matrix_homeserver_implementation != 'synapse' or matrix_synapse_presence_enabled }}"
  2109. # Postgres is the default, except if not using internal Postgres server
  2110. matrix_mx_puppet_groupme_database_engine: "{{ 'postgres' if postgres_enabled else 'sqlite' }}"
  2111. matrix_mx_puppet_groupme_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  2112. matrix_mx_puppet_groupme_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mxpup.groupme.db', rounds=655555) | to_uuid }}"
  2113. ######################################################################
  2114. #
  2115. # /matrix-bridge-mx-puppet-groupme
  2116. #
  2117. ######################################################################
  2118. ######################################################################
  2119. #
  2120. # matrix-bridge-postmoogle
  2121. #
  2122. ######################################################################
  2123. # We don't enable bridges by default.
  2124. matrix_postmoogle_enabled: false
  2125. matrix_postmoogle_docker_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_postmoogle_docker_image_registry_prefix_upstream_default }}"
  2126. matrix_postmoogle_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm64'] }}"
  2127. matrix_postmoogle_ssl_path: |-
  2128. {{
  2129. {
  2130. 'playbook-managed-traefik': (traefik_certs_dumper_dumped_certificates_dir_path if traefik_certs_dumper_enabled else ''),
  2131. 'other-traefik-container': (traefik_certs_dumper_dumped_certificates_dir_path if traefik_certs_dumper_enabled else ''),
  2132. 'none': '',
  2133. }[matrix_playbook_reverse_proxy_type]
  2134. }}
  2135. matrix_playbook_bridge_postmoogle_traefik_tls_cert: "{% for domain in matrix_postmoogle_domains %}/ssl/{{ domain }}/certificate.crt {% endfor %}"
  2136. matrix_playbook_bridge_postmoogle_traefik_key: "{% for domain in matrix_postmoogle_domains %}/ssl/{{ domain }}/privatekey.key {% endfor %}"
  2137. matrix_postmoogle_tls_cert: |-
  2138. {{
  2139. {
  2140. 'playbook-managed-traefik': (matrix_playbook_bridge_postmoogle_traefik_tls_cert if traefik_certs_dumper_enabled else ''),
  2141. 'other-traefik-container': (matrix_playbook_bridge_postmoogle_traefik_tls_cert if traefik_certs_dumper_enabled else ''),
  2142. 'none': '',
  2143. }[matrix_playbook_reverse_proxy_type]
  2144. }}
  2145. matrix_postmoogle_tls_key: |-
  2146. {{
  2147. {
  2148. 'playbook-managed-traefik': (matrix_playbook_bridge_postmoogle_traefik_key if traefik_certs_dumper_enabled else ''),
  2149. 'other-traefik-container': (matrix_playbook_bridge_postmoogle_traefik_key if traefik_certs_dumper_enabled else ''),
  2150. 'none': '',
  2151. }[matrix_playbook_reverse_proxy_type]
  2152. }}
  2153. matrix_playbook_bridge_postmoogle_traefik_certs_dumper_waiter_services: "{% for domain in matrix_postmoogle_domains %}{{ traefik_certs_dumper_identifier }}-wait-for-domain@{{ domain }}.service {% endfor %}"
  2154. matrix_postmoogle_systemd_required_services_list_auto: |
  2155. {{
  2156. matrix_addons_homeserver_systemd_services_list
  2157. +
  2158. ([postgres_identifier ~ '.service'] if postgres_enabled and matrix_postmoogle_database_hostname == matrix_postmoogle_database_hostname else [])
  2159. +
  2160. (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 [])
  2161. }}
  2162. # Postgres is the default, except if not using internal Postgres server
  2163. matrix_postmoogle_database_engine: "{{ 'postgres' if postgres_enabled else 'sqlite' }}"
  2164. matrix_postmoogle_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  2165. matrix_postmoogle_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'postmoogle.db', rounds=655555) | to_uuid }}"
  2166. matrix_postmoogle_homeserver: "{{ matrix_addons_homeserver_client_api_url }}"
  2167. matrix_postmoogle_container_network: "{{ matrix_addons_container_network }}"
  2168. matrix_postmoogle_container_additional_networks_auto: |-
  2169. {{
  2170. (
  2171. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  2172. +
  2173. ([postgres_container_network] if postgres_enabled and matrix_bot_matrix_reminder_bot_database_hostname == postgres_connection_hostname else [])
  2174. ) | unique
  2175. }}
  2176. ######################################################################
  2177. #
  2178. # /matrix-bridge-postmoogle
  2179. #
  2180. ######################################################################
  2181. ######################################################################
  2182. #
  2183. # matrix-bridge-steam
  2184. #
  2185. ######################################################################
  2186. # We don't enable bridges by default.
  2187. matrix_steam_bridge_enabled: false
  2188. matrix_steam_bridge_systemd_required_services_list_auto: |
  2189. {{
  2190. matrix_addons_homeserver_systemd_services_list
  2191. +
  2192. ([postgres_identifier ~ '.service'] if (postgres_enabled and matrix_steam_bridge_database_hostname == postgres_connection_hostname) else [])
  2193. }}
  2194. matrix_steam_bridge_docker_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_steam_bridge_docker_image_registry_prefix_upstream_default }}"
  2195. matrix_steam_bridge_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm64'] }}"
  2196. matrix_steam_bridge_container_network: "{{ matrix_addons_container_network }}"
  2197. matrix_steam_bridge_container_additional_networks_auto: |-
  2198. {{
  2199. (
  2200. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  2201. +
  2202. ([postgres_container_network] if (postgres_enabled and matrix_steam_bridge_database_hostname == postgres_connection_hostname and matrix_steam_bridge_container_network != postgres_container_network) else [])
  2203. +
  2204. ([matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network and matrix_steam_bridge_container_labels_traefik_enabled else [])
  2205. ) | unique
  2206. }}
  2207. matrix_steam_bridge_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  2208. matrix_steam_bridge_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  2209. matrix_steam_bridge_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  2210. matrix_steam_bridge_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  2211. matrix_steam_bridge_container_labels_metrics_middleware_basic_auth_enabled: "{{ matrix_metrics_exposure_http_basic_auth_enabled }}"
  2212. matrix_steam_bridge_container_labels_metrics_middleware_basic_auth_users: "{{ matrix_metrics_exposure_http_basic_auth_users }}"
  2213. matrix_steam_bridge_appservice_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'steam.as.token', rounds=655555) | to_uuid }}"
  2214. matrix_steam_bridge_homeserver_address: "{{ matrix_addons_homeserver_client_api_url }}"
  2215. matrix_steam_bridge_homeserver_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'steam.hs.token', rounds=655555) | to_uuid }}"
  2216. matrix_steam_bridge_homeserver_async_media: "{{ matrix_homeserver_implementation in ['synapse'] }}"
  2217. matrix_steam_bridge_public_media_signing_key: "{{ ('%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'steam.pub.key', rounds=655555) | to_uuid) if matrix_steam_bridge_public_media_enabled else '' }}"
  2218. matrix_steam_bridge_provisioning_shared_secret: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'steam.prov', rounds=655555) | to_uuid }}"
  2219. matrix_steam_bridge_double_puppet_secrets_auto: |-
  2220. {{
  2221. ({
  2222. matrix_steam_bridge_homeserver_domain: ("as_token:" + matrix_appservice_double_puppet_registration_as_token)
  2223. })
  2224. if matrix_appservice_double_puppet_enabled
  2225. else {}
  2226. }}
  2227. matrix_steam_bridge_metrics_enabled: "{{ prometheus_enabled or matrix_metrics_exposure_enabled }}"
  2228. matrix_steam_bridge_metrics_proxying_enabled: "{{ matrix_steam_bridge_metrics_enabled and matrix_metrics_exposure_enabled }}"
  2229. matrix_steam_bridge_metrics_proxying_hostname: "{{ matrix_metrics_exposure_hostname }}"
  2230. matrix_steam_bridge_metrics_proxying_path_prefix: "{{ matrix_metrics_exposure_path_prefix }}/matrix-steam-bridge"
  2231. matrix_steam_bridge_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  2232. matrix_steam_bridge_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mau.twt.db', rounds=655555) | to_uuid if postgres_enabled else '' }}"
  2233. ######################################################################
  2234. #
  2235. # /matrix-bridge-steam
  2236. #
  2237. ######################################################################
  2238. ######################################################################
  2239. #
  2240. # matrix-bot-matrix-reminder-bot
  2241. #
  2242. ######################################################################
  2243. # We don't enable bots by default.
  2244. matrix_bot_matrix_reminder_bot_enabled: false
  2245. matrix_bot_matrix_reminder_bot_systemd_required_services_list_auto: |
  2246. {{
  2247. matrix_addons_homeserver_systemd_services_list
  2248. +
  2249. ([postgres_identifier ~ '.service'] if postgres_enabled and matrix_bot_matrix_reminder_bot_database_hostname == postgres_connection_hostname else [])
  2250. }}
  2251. matrix_bot_matrix_reminder_bot_docker_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_bot_matrix_reminder_bot_docker_image_registry_prefix_upstream_default }}"
  2252. matrix_bot_matrix_reminder_bot_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm64'] }}"
  2253. matrix_bot_matrix_reminder_bot_container_network: "{{ matrix_addons_container_network }}"
  2254. matrix_bot_matrix_reminder_bot_container_additional_networks_auto: |-
  2255. {{
  2256. (
  2257. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  2258. +
  2259. ([postgres_container_network] if postgres_enabled and matrix_bot_matrix_reminder_bot_database_hostname == postgres_connection_hostname else [])
  2260. ) | unique
  2261. }}
  2262. matrix_bot_matrix_reminder_bot_matrix_homeserver_url: "{{ matrix_addons_homeserver_client_api_url }}"
  2263. # Postgres is the default, except if not using internal Postgres server
  2264. matrix_bot_matrix_reminder_bot_database_engine: "{{ 'postgres' if postgres_enabled else 'sqlite' }}"
  2265. matrix_bot_matrix_reminder_bot_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  2266. matrix_bot_matrix_reminder_bot_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'reminder.bot.db', rounds=655555) | to_uuid }}"
  2267. matrix_bot_matrix_reminder_bot_allowlist_enabled: true
  2268. matrix_bot_matrix_reminder_bot_allowlist_regexes_auto:
  2269. - "@[a-z0-9-_.]+:{{ matrix_domain }}"
  2270. ######################################################################
  2271. #
  2272. # /matrix-bot-matrix-reminder-bot
  2273. #
  2274. ######################################################################
  2275. ######################################################################
  2276. #
  2277. # matrix-bot-matrix-registration-bot
  2278. #
  2279. ######################################################################
  2280. # We don't enable bots by default.
  2281. matrix_bot_matrix_registration_bot_enabled: false
  2282. matrix_bot_matrix_registration_bot_systemd_required_services_list_auto: |
  2283. {{
  2284. matrix_addons_homeserver_systemd_services_list
  2285. }}
  2286. matrix_bot_matrix_registration_bot_docker_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_bot_matrix_registration_bot_docker_image_registry_prefix_upstream_default }}"
  2287. matrix_bot_matrix_registration_bot_container_image_self_build: "{{ matrix_architecture not in ['amd64'] }}"
  2288. matrix_bot_matrix_registration_bot_container_network: "{{ matrix_addons_container_network }}"
  2289. matrix_bot_matrix_registration_bot_container_additional_networks_auto: |-
  2290. {{
  2291. ([matrix_homeserver_container_network] if matrix_bot_matrix_registration_bot_container_network != matrix_homeserver_container_network else [])
  2292. }}
  2293. # Using `matrix_addons_homeserver_client_api_url` would not work here,
  2294. # because `matrix-traefik:8008` (matrix-internal-client-api) does not expose any `/_synapse` paths.
  2295. matrix_bot_matrix_registration_bot_api_base_url: "{{ matrix_homeserver_container_url }}"
  2296. ######################################################################
  2297. #
  2298. # /matrix-bot-matrix-registration-bot
  2299. #
  2300. ######################################################################
  2301. ######################################################################
  2302. #
  2303. # matrix-bot-maubot
  2304. #
  2305. ######################################################################
  2306. # We don't enable bots by default.
  2307. matrix_bot_maubot_enabled: false
  2308. matrix_bot_maubot_systemd_required_services_list_auto: |
  2309. {{
  2310. matrix_addons_homeserver_systemd_services_list
  2311. +
  2312. ([postgres_identifier ~ '.service'] if (postgres_enabled and matrix_bot_maubot_database_hostname == postgres_connection_hostname) else [])
  2313. }}
  2314. matrix_bot_maubot_hostname: "{{ matrix_server_fqn_matrix }}"
  2315. matrix_bot_maubot_homeserver_url: "{{ matrix_addons_homeserver_client_api_url }}"
  2316. matrix_bot_maubot_homeserver_secret: |-
  2317. {{
  2318. {
  2319. 'synapse': matrix_synapse_registration_shared_secret | default(''),
  2320. 'dendrite': matrix_dendrite_client_api_registration_shared_secret | default(''),
  2321. }[matrix_homeserver_implementation] | default('')
  2322. }}
  2323. matrix_bot_maubot_docker_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_bot_maubot_docker_image_registry_prefix_upstream_default }}"
  2324. matrix_bot_maubot_container_image_self_build: "{{ matrix_architecture not in ['amd64'] }}"
  2325. 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 '' }}"
  2326. matrix_bot_maubot_container_network: "{{ matrix_addons_container_network }}"
  2327. matrix_bot_maubot_container_additional_networks_auto: |-
  2328. {{
  2329. (
  2330. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  2331. +
  2332. ([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 [])
  2333. +
  2334. ([matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network and matrix_bot_maubot_container_labels_traefik_enabled else [])
  2335. ) | unique
  2336. }}
  2337. matrix_bot_maubot_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  2338. matrix_bot_maubot_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  2339. matrix_bot_maubot_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  2340. matrix_bot_maubot_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  2341. matrix_bot_maubot_container_labels_management_hostname: "{{ matrix_server_fqn_matrix }}"
  2342. # Postgres is the default, except if not using internal Postgres server
  2343. matrix_bot_maubot_database_engine: "{{ 'postgres' if postgres_enabled else 'sqlite' }}"
  2344. matrix_bot_maubot_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  2345. matrix_bot_maubot_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mxpup.dsc.db', rounds=655555) | to_uuid }}"
  2346. ######################################################################
  2347. #
  2348. # /matrix-bot-maubot
  2349. #
  2350. ######################################################################
  2351. ######################################################################
  2352. #
  2353. # matrix-bot-honoroit
  2354. #
  2355. ######################################################################
  2356. # We don't enable bots by default.
  2357. matrix_bot_honoroit_enabled: false
  2358. matrix_bot_honoroit_hostname: "{{ matrix_server_fqn_matrix }}"
  2359. matrix_bot_honoroit_path_prefix: /honoroit
  2360. matrix_bot_honoroit_systemd_required_services_list_auto: |
  2361. {{
  2362. matrix_addons_homeserver_systemd_services_list
  2363. +
  2364. ([postgres_identifier ~ '.service'] if postgres_enabled and matrix_bot_honoroit_database_hostname == postgres_connection_hostname else [])
  2365. }}
  2366. matrix_bot_honoroit_docker_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_bot_honoroit_docker_image_registry_prefix_upstream_default }}"
  2367. matrix_bot_honoroit_container_network: "{{ matrix_addons_container_network }}"
  2368. matrix_bot_honoroit_container_additional_networks: |
  2369. {{
  2370. (
  2371. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  2372. +
  2373. ([postgres_container_network] if (postgres_enabled and matrix_bot_honoroit_database_hostname == postgres_connection_hostname and matrix_bot_honoroit_container_network != postgres_container_network) else [])
  2374. +
  2375. ([matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network and matrix_bot_honoroit_container_labels_traefik_enabled else [])
  2376. ) | unique
  2377. }}
  2378. matrix_bot_honoroit_container_labels_traefik_enabled: "{{ matrix_playbook_traefik_labels_enabled }}"
  2379. matrix_bot_honoroit_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  2380. matrix_bot_honoroit_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  2381. matrix_bot_honoroit_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  2382. # For consistency with other things hosted at the Matrix FQN, we adjust the metrics endpoint
  2383. # so that metrics would be served at something like `/metrics/SERVICE_NAME`, and not at the default path for the role (`PREFIX/metrics`).
  2384. matrix_bot_honoroit_container_labels_traefik_metrics_path: "{{ matrix_metrics_exposure_path_prefix }}/honoroit"
  2385. matrix_bot_honoroit_homeserver: "{{ matrix_addons_homeserver_client_api_url }}"
  2386. # Postgres is the default, except if not using internal Postgres server
  2387. matrix_bot_honoroit_database_engine: "{{ 'postgres' if postgres_enabled else 'sqlite' }}"
  2388. matrix_bot_honoroit_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  2389. matrix_bot_honoroit_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'honoroit.bot.db', rounds=655555) | to_uuid }}"
  2390. matrix_bot_honoroit_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm64'] }}"
  2391. ######################################################################
  2392. #
  2393. # /matrix-bot-honoroit
  2394. #
  2395. ######################################################################
  2396. ######################################################################
  2397. #
  2398. # matrix-bot-buscarron
  2399. #
  2400. ######################################################################
  2401. # We don't enable bots by default.
  2402. matrix_bot_buscarron_enabled: false
  2403. matrix_bot_buscarron_hostname: "{{ matrix_server_fqn_buscarron }}"
  2404. matrix_bot_buscarron_systemd_required_services_list_auto: |
  2405. {{
  2406. matrix_addons_homeserver_systemd_services_list
  2407. +
  2408. ([postgres_identifier ~ '.service'] if (postgres_enabled and matrix_bot_buscarron_database_hostname == postgres_connection_hostname) else [])
  2409. }}
  2410. matrix_bot_buscarron_docker_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_bot_buscarron_docker_image_registry_prefix_upstream_default }}"
  2411. matrix_bot_buscarron_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm64'] }}"
  2412. matrix_bot_buscarron_container_network: "{{ matrix_addons_container_network }}"
  2413. matrix_bot_buscarron_container_additional_networks_auto: |-
  2414. {{
  2415. (
  2416. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  2417. +
  2418. ([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 [])
  2419. +
  2420. ([matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network and matrix_bot_buscarron_container_labels_traefik_enabled else [])
  2421. ) | unique
  2422. }}
  2423. matrix_bot_buscarron_container_labels_traefik_enabled: "{{ matrix_playbook_traefik_labels_enabled }}"
  2424. matrix_bot_buscarron_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  2425. matrix_bot_buscarron_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  2426. matrix_bot_buscarron_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  2427. matrix_bot_buscarron_homeserver: "{{ matrix_addons_homeserver_client_api_url }}"
  2428. # Postgres is the default, except if not using internal Postgres server
  2429. matrix_bot_buscarron_database_engine: "{{ 'postgres' if postgres_enabled else 'sqlite' }}"
  2430. matrix_bot_buscarron_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  2431. matrix_bot_buscarron_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'buscarron.bot.db', rounds=655555) | to_uuid }}"
  2432. ######################################################################
  2433. #
  2434. # /matrix-bot-buscarron
  2435. #
  2436. ######################################################################
  2437. ######################################################################
  2438. #
  2439. # matrix-bot-baibot
  2440. #
  2441. ######################################################################
  2442. # We don't enable bots by default.
  2443. matrix_bot_baibot_enabled: false
  2444. 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 }}"
  2445. matrix_bot_baibot_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm64'] }}"
  2446. matrix_bot_baibot_systemd_required_services_list_auto: |
  2447. {{
  2448. matrix_addons_homeserver_systemd_services_list
  2449. }}
  2450. matrix_bot_baibot_config_homeserver_url: "{{ matrix_addons_homeserver_client_api_url }}"
  2451. matrix_bot_baibot_container_network: "{{ matrix_addons_container_network }}"
  2452. matrix_bot_baibot_container_additional_networks_auto: |-
  2453. {{
  2454. (
  2455. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  2456. ) | unique
  2457. }}
  2458. ######################################################################
  2459. #
  2460. # /matrix-bot-baibot
  2461. #
  2462. ######################################################################
  2463. ######################################################################
  2464. #
  2465. # matrix-bot-chatgpt
  2466. #
  2467. ######################################################################
  2468. # We don't enable bots by default.
  2469. matrix_bot_chatgpt_enabled: false
  2470. matrix_bot_chatgpt_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_bot_chatgpt_container_image_registry_prefix_upstream_default }}"
  2471. matrix_bot_chatgpt_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm64'] }}"
  2472. matrix_bot_chatgpt_container_network: "{{ matrix_addons_container_network }}"
  2473. matrix_bot_chatgpt_container_additional_networks_auto: "{{ [] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network] }}"
  2474. matrix_bot_chatgpt_matrix_homeserver_url: "{{ matrix_addons_homeserver_client_api_url }}"
  2475. matrix_bot_chatgpt_systemd_required_services_list_auto: "{{ matrix_addons_homeserver_systemd_services_list }}"
  2476. ######################################################################
  2477. #
  2478. # /matrix-bot-chatgpt
  2479. #
  2480. ######################################################################
  2481. ######################################################################
  2482. #
  2483. # matrix-bot-go-neb
  2484. #
  2485. ######################################################################
  2486. # We don't enable bots by default.
  2487. matrix_bot_go_neb_enabled: false
  2488. matrix_bot_go_neb_scheme: "{{ 'https' if matrix_playbook_ssl_enabled else 'http' }}"
  2489. matrix_bot_go_neb_hostname: "{{ matrix_server_fqn_bot_go_neb }}"
  2490. matrix_bot_go_neb_systemd_required_services_list_auto: |
  2491. {{
  2492. matrix_addons_homeserver_systemd_services_list
  2493. }}
  2494. matrix_bot_go_neb_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_bot_go_neb_container_image_registry_prefix_upstream_default }}"
  2495. matrix_bot_go_neb_container_http_host_bind_port: "{{ (matrix_playbook_service_host_bind_interface_prefix ~ '4050') if matrix_playbook_service_host_bind_interface_prefix else '' }}"
  2496. matrix_bot_go_neb_container_network: "{{ matrix_addons_container_network }}"
  2497. matrix_bot_go_neb_container_additional_networks: |
  2498. {{
  2499. (
  2500. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  2501. +
  2502. ([matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network and matrix_bot_go_neb_container_labels_traefik_enabled else [])
  2503. ) | unique
  2504. }}
  2505. matrix_bot_go_neb_container_labels_traefik_enabled: "{{ matrix_playbook_traefik_labels_enabled }}"
  2506. matrix_bot_go_neb_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  2507. matrix_bot_go_neb_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  2508. matrix_bot_go_neb_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  2509. ######################################################################
  2510. #
  2511. # /matrix-bot-go-neb
  2512. #
  2513. ######################################################################
  2514. ######################################################################
  2515. #
  2516. # matrix-bot-mjolnir
  2517. #
  2518. ######################################################################
  2519. # We don't enable bots by default.
  2520. matrix_bot_mjolnir_enabled: false
  2521. matrix_bot_mjolnir_systemd_required_services_list_auto: |
  2522. {{
  2523. matrix_addons_homeserver_systemd_services_list
  2524. +
  2525. (['matrix-pantalaimon.service'] if matrix_bot_mjolnir_pantalaimon_use else [])
  2526. }}
  2527. matrix_bot_mjolnir_docker_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_bot_mjolnir_docker_image_registry_prefix_upstream_default }}"
  2528. matrix_bot_mjolnir_container_image_self_build: "{{ matrix_architecture != 'amd64' }}"
  2529. matrix_bot_mjolnir_container_network: "{{ matrix_addons_container_network }}"
  2530. matrix_bot_mjolnir_container_additional_networks_auto: |-
  2531. {{
  2532. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  2533. }}
  2534. matrix_bot_mjolnir_homeserver_url: "{{ 'http://matrix-pantalaimon:8009' if matrix_bot_mjolnir_pantalaimon_use else matrix_addons_homeserver_client_api_url }}"
  2535. matrix_bot_mjolnir_raw_homeserver_url: "{{ matrix_addons_homeserver_client_api_url }}"
  2536. ######################################################################
  2537. #
  2538. # /matrix-bot-mjolnir
  2539. #
  2540. ######################################################################
  2541. ######################################################################
  2542. #
  2543. # matrix-bot-draupnir
  2544. #
  2545. ######################################################################
  2546. # We don't enable bots by default.
  2547. matrix_bot_draupnir_enabled: false
  2548. 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 '' }}"
  2549. matrix_bot_draupnir_systemd_required_services_list_auto: |
  2550. {{
  2551. matrix_addons_homeserver_systemd_services_list
  2552. +
  2553. (['matrix-pantalaimon.service'] if matrix_bot_draupnir_pantalaimon_use else [])
  2554. }}
  2555. matrix_bot_draupnir_docker_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_bot_draupnir_docker_image_registry_prefix_upstream_default }}"
  2556. matrix_bot_draupnir_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm64'] }}"
  2557. matrix_bot_draupnir_container_network: "{{ matrix_addons_container_network }}"
  2558. matrix_bot_draupnir_container_additional_networks_auto: |-
  2559. {{
  2560. (
  2561. ([] if matrix_addons_homeserver_container_network == '' else
  2562. [matrix_addons_homeserver_container_network])
  2563. +
  2564. ([matrix_playbook_reverse_proxyable_services_additional_network] if
  2565. (matrix_playbook_reverse_proxyable_services_additional_network and matrix_bot_draupnir_container_labels_traefik_enabled) else [])
  2566. +
  2567. ([matrix_pantalaimon_container_network] if (matrix_bot_draupnir_pantalaimon_use and matrix_pantalaimon_container_network != matrix_bot_draupnir_container_network) else [])
  2568. ) | unique
  2569. }}
  2570. 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
  2571. matrix_bot_draupnir_config_rawHomeserverUrl: "{{ matrix_addons_homeserver_client_api_url }}" # noqa var-naming
  2572. 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'] }}"
  2573. matrix_bot_draupnir_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  2574. matrix_bot_draupnir_container_labels_web_abuseReporting_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  2575. matrix_bot_draupnir_container_labels_web_abuseReporting_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  2576. #The salt is size restricted here as a maximum salt size of 16 characters exists due to the functions used.
  2577. matrix_bot_draupnir_config_web_synapseHTTPAntispam_authorization: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'draupnir.httpmod', rounds=655555) | to_uuid }}" # noqa var-naming
  2578. ######################################################################
  2579. #
  2580. # /matrix-bot-draupnir
  2581. #
  2582. ######################################################################
  2583. ######################################################################
  2584. #
  2585. # matrix-appservice-draupnir-for-all
  2586. #
  2587. ######################################################################
  2588. # We don't enable bots by default.
  2589. matrix_appservice_draupnir_for_all_enabled: false
  2590. matrix_appservice_draupnir_for_all_systemd_required_services_list_auto: |
  2591. {{
  2592. matrix_addons_homeserver_systemd_services_list
  2593. +
  2594. ([postgres_identifier ~ '.service'] if (postgres_enabled and matrix_appservice_draupnir_for_all_database_hostname == postgres_connection_hostname) else [])
  2595. }}
  2596. matrix_appservice_draupnir_for_all_docker_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_appservice_draupnir_for_all_docker_image_registry_prefix_upstream_default }}"
  2597. matrix_appservice_draupnir_for_all_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm64'] }}"
  2598. matrix_appservice_draupnir_for_all_container_network: "{{ matrix_addons_container_network }}"
  2599. matrix_appservice_draupnir_for_all_container_additional_networks_auto: |-
  2600. {{
  2601. (
  2602. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  2603. +
  2604. ([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 [])
  2605. ) | unique
  2606. }}
  2607. matrix_appservice_draupnir_for_all_appservice_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'd4a.as.token', rounds=655555) | to_uuid }}"
  2608. matrix_appservice_draupnir_for_all_homeserver_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'd4a.hs.token', rounds=655555) | to_uuid }}"
  2609. matrix_appservice_draupnir_for_all_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  2610. matrix_appservice_draupnir_for_all_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'as.d4a.db', rounds=655555) | to_uuid }}"
  2611. ######################################################################
  2612. #
  2613. # /matrix-appservice-draupnir-for-all
  2614. #
  2615. ######################################################################
  2616. ######################################################################
  2617. #
  2618. # matrix-appservice-double-puppet
  2619. #
  2620. ######################################################################
  2621. matrix_appservice_double_puppet_enabled: false
  2622. matrix_appservice_double_puppet_registration_as_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'as.doub.pup', rounds=655555) | to_uuid }}"
  2623. matrix_appservice_double_puppet_registration_hs_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'hs.doub.pup', rounds=655555) | to_uuid }}"
  2624. ######################################################################
  2625. #
  2626. # /matrix-appservice-double-puppet
  2627. #
  2628. ######################################################################
  2629. ######################################################################
  2630. #
  2631. # matrix-pantalaimon
  2632. #
  2633. ######################################################################
  2634. matrix_pantalaimon_enabled: false
  2635. matrix_pantalaimon_systemd_required_services_list_auto: |
  2636. {{
  2637. matrix_addons_homeserver_systemd_services_list
  2638. }}
  2639. matrix_pantalaimon_docker_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_pantalaimon_docker_image_registry_prefix_upstream_default }}"
  2640. matrix_pantalaimon_container_network: "{{ matrix_homeserver_container_network }}"
  2641. matrix_pantalaimon_container_image_self_build: "{{ matrix_architecture not in ['amd64'] }}"
  2642. matrix_pantalaimon_homeserver_url: "{{ matrix_addons_homeserver_client_api_url }}"
  2643. ######################################################################
  2644. #
  2645. # /matrix-pantalaimon
  2646. #
  2647. ######################################################################
  2648. ######################################################################
  2649. #
  2650. # etke/backup_borg
  2651. #
  2652. ######################################################################
  2653. backup_borg_enabled: false
  2654. backup_borg_identifier: matrix-backup-borg
  2655. backup_borg_storage_archive_name_format: matrix-{now:%Y-%m-%d-%H%M%S}
  2656. backup_borg_base_path: "{{ matrix_base_data_path }}/backup-borg"
  2657. backup_borg_username: "{{ matrix_user_name }}"
  2658. backup_borg_uid: "{{ matrix_user_uid }}"
  2659. backup_borg_gid: "{{ matrix_user_gid }}"
  2660. backup_borg_docker_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else backup_borg_docker_image_registry_prefix_upstream_default }}"
  2661. backup_borg_container_network: "{{ postgres_container_network if postgres_enabled else backup_borg_identifier }}"
  2662. backup_borg_postgresql_version_detection_postgres_role_name: "{{ 'galaxy/postgres' if postgres_enabled else '' }}"
  2663. backup_borg_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm32', 'arm64'] }}"
  2664. backup_borg_postgresql_enabled: "{{ postgres_enabled }}"
  2665. backup_borg_postgresql_databases_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  2666. backup_borg_postgresql_databases_username: "{{ postgres_connection_username if postgres_enabled else '' }}"
  2667. backup_borg_postgresql_databases_password: "{{ postgres_connection_password if postgres_enabled else '' }}"
  2668. backup_borg_postgresql_databases_port: "{{ postgres_connection_port if postgres_enabled else 5432 }}"
  2669. backup_borg_postgresql_databases_auto: "{{ postgres_managed_databases | map(attribute='name') if postgres_enabled else [] }}"
  2670. backup_borg_location_source_directories:
  2671. - "{{ matrix_base_data_path }}"
  2672. backup_borg_location_exclude_patterns: |
  2673. {{
  2674. ([matrix_synapse_media_store_path + '/remote_content', matrix_synapse_media_store_path + '/local_thumbnails', 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 [])
  2675. +
  2676. ([postgres_data_path] if postgres_enabled else [])
  2677. }}
  2678. backup_borg_systemd_required_services_list: |
  2679. {{
  2680. [devture_systemd_docker_base_docker_service_name]
  2681. +
  2682. ([postgres_identifier ~ '.service'] if postgres_enabled else [])
  2683. }}
  2684. ######################################################################
  2685. #
  2686. # /etke/backup_borg
  2687. #
  2688. ######################################################################
  2689. ######################################################################
  2690. #
  2691. # matrix-cactus-comments
  2692. #
  2693. ######################################################################
  2694. matrix_cactus_comments_enabled: false
  2695. matrix_cactus_comments_systemd_required_services_list_auto: |
  2696. {{
  2697. matrix_addons_homeserver_systemd_services_list
  2698. }}
  2699. matrix_cactus_comments_docker_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_cactus_comments_docker_image_registry_prefix_upstream_default }}"
  2700. matrix_cactus_comments_container_image_self_build: "{{ matrix_architecture not in ['amd64'] }}"
  2701. matrix_cactus_comments_container_network: "{{ matrix_addons_container_network }}"
  2702. matrix_cactus_comments_container_additional_networks_auto: |-
  2703. {{
  2704. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  2705. }}
  2706. matrix_cactus_comments_as_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'cactus.as.token', rounds=655555) | to_uuid }}"
  2707. matrix_cactus_comments_hs_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'cactus.hs.token', rounds=655555) | to_uuid }}"
  2708. matrix_cactus_comments_homeserver_url: "{{ matrix_addons_homeserver_client_api_url }}"
  2709. ######################################################################
  2710. #
  2711. # /matrix-cactus-comments
  2712. #
  2713. ######################################################################
  2714. ######################################################################
  2715. #
  2716. # matrix-cactus-comments-client
  2717. #
  2718. ######################################################################
  2719. matrix_cactus_comments_client_enabled: "{{ matrix_cactus_comments_enabled }}"
  2720. matrix_cactus_comments_client_hostname: "{{ matrix_server_fqn_matrix }}"
  2721. 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 }}"
  2722. matrix_cactus_comments_client_container_network: "{{ matrix_addons_container_network }}"
  2723. matrix_cactus_comments_client_container_additional_networks_auto: |-
  2724. {{
  2725. (
  2726. ([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 [])
  2727. ) | unique
  2728. }}
  2729. matrix_cactus_comments_client_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  2730. matrix_cactus_comments_client_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  2731. matrix_cactus_comments_client_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  2732. matrix_cactus_comments_client_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  2733. ######################################################################
  2734. #
  2735. # /matrix-cactus-comments-client
  2736. #
  2737. ######################################################################
  2738. ######################################################################
  2739. #
  2740. # matrix-corporal
  2741. #
  2742. ######################################################################
  2743. matrix_corporal_enabled: false
  2744. matrix_corporal_systemd_required_services_list_auto: |
  2745. {{
  2746. (['matrix-' + matrix_homeserver_implementation + '.service'])
  2747. }}
  2748. matrix_corporal_docker_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_corporal_docker_image_registry_prefix_upstream_default }}"
  2749. matrix_corporal_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm64'] }}"
  2750. 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 '' }}"
  2751. 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 '' }}"
  2752. matrix_corporal_container_network: matrix-corporal
  2753. matrix_corporal_container_additional_networks: |
  2754. {{
  2755. (
  2756. ([matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network else [])
  2757. +
  2758. ([matrix_homeserver_container_network] if matrix_corporal_container_network != matrix_homeserver_container_network else [])
  2759. ) | unique
  2760. }}
  2761. matrix_corporal_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  2762. matrix_corporal_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  2763. matrix_corporal_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  2764. matrix_corporal_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  2765. matrix_corporal_matrix_homeserver_scheme: "{{ 'https' if matrix_playbook_ssl_enabled else 'http' }}"
  2766. matrix_corporal_matrix_homeserver_api_endpoint: "{{ matrix_homeserver_container_url }}"
  2767. matrix_corporal_matrix_auth_shared_secret: "{{ matrix_synapse_ext_password_provider_shared_secret_auth_shared_secret }}"
  2768. # This is only useful if there's REST auth provider to make use of it.
  2769. matrix_corporal_http_gateway_internal_rest_auth_enabled: "{{ matrix_synapse_ext_password_provider_rest_auth_enabled }}"
  2770. matrix_corporal_matrix_registration_shared_secret: "{{ matrix_synapse_registration_shared_secret }}"
  2771. ######################################################################
  2772. #
  2773. # /matrix-corporal
  2774. #
  2775. ######################################################################
  2776. ######################################################################
  2777. #
  2778. # matrix-rageshake
  2779. #
  2780. ######################################################################
  2781. # We don't enable rageshake by default.
  2782. matrix_rageshake_enabled: false
  2783. matrix_rageshake_container_image_self_build: "{{ matrix_architecture not in ['amd64'] }}"
  2784. matrix_rageshake_hostname: "{{ matrix_server_fqn_rageshake }}"
  2785. 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 }}"
  2786. matrix_rageshake_container_network: matrix-rageshake
  2787. matrix_rageshake_container_additional_networks: "{{ [matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network else [] }}"
  2788. matrix_rageshake_container_http_host_bind_port: "{{ (matrix_playbook_service_host_bind_interface_prefix ~ '9110') if matrix_playbook_service_host_bind_interface_prefix else '' }}"
  2789. matrix_rageshake_container_labels_traefik_enabled: "{{ matrix_playbook_traefik_labels_enabled }}"
  2790. matrix_rageshake_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  2791. matrix_rageshake_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  2792. matrix_rageshake_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  2793. ######################################################################
  2794. #
  2795. # /matrix-rageshake
  2796. #
  2797. ######################################################################
  2798. ######################################################################
  2799. #
  2800. # matrix-coturn
  2801. #
  2802. ######################################################################
  2803. matrix_coturn_enabled: true
  2804. matrix_coturn_docker_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_coturn_docker_image_registry_prefix_upstream_default }}"
  2805. matrix_coturn_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm32', 'arm64'] }}"
  2806. # We make the assumption that `ansible_host` points to an external IP address, which may not always be the case.
  2807. # Users are free to set `matrix_coturn_turn_external_ip_address` to an empty string
  2808. # to allow auto-detection (via an EchoIP service) to happen at runtime.
  2809. matrix_coturn_turn_external_ip_address: "{{ ansible_host }}"
  2810. matrix_coturn_turn_static_auth_secret: "{{ ('%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'coturn.sas', rounds=655555) | to_uuid) if matrix_coturn_authentication_method == 'auth-secret' else '' }}"
  2811. matrix_coturn_lt_cred_mech_username: "{{ ('%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'coturn.user', rounds=655555) | to_uuid) if matrix_coturn_authentication_method == 'lt-cred-mech' else '' }}"
  2812. matrix_coturn_lt_cred_mech_password: "{{ ('%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'coturn.pass', rounds=655555) | to_uuid) if matrix_coturn_authentication_method == 'lt-cred-mech' else '' }}"
  2813. matrix_coturn_tls_enabled: "{{ matrix_playbook_ssl_enabled }}"
  2814. matrix_coturn_tls_cert_path: |-
  2815. {{
  2816. {
  2817. 'playbook-managed-traefik': ('/certificate.crt' if traefik_certs_dumper_enabled else ''),
  2818. 'other-traefik-container': ('/certificate.crt' if traefik_certs_dumper_enabled else ''),
  2819. 'none': '',
  2820. }[matrix_playbook_reverse_proxy_type]
  2821. }}
  2822. matrix_coturn_tls_key_path: |-
  2823. {{
  2824. {
  2825. 'playbook-managed-traefik': ('/privatekey.key' if traefik_certs_dumper_enabled else ''),
  2826. 'other-traefik-container': ('/privatekey.key' if traefik_certs_dumper_enabled else ''),
  2827. 'none': '',
  2828. }[matrix_playbook_reverse_proxy_type]
  2829. }}
  2830. matrix_coturn_container_additional_volumes: |
  2831. {{
  2832. (
  2833. [
  2834. {
  2835. 'src': (traefik_certs_dumper_dumped_certificates_dir_path + '/' + matrix_server_fqn_matrix + '/certificate.crt'),
  2836. 'dst': '/certificate.crt',
  2837. 'options': 'ro',
  2838. },
  2839. {
  2840. 'src': (traefik_certs_dumper_dumped_certificates_dir_path + '/' + matrix_server_fqn_matrix + '/privatekey.key'),
  2841. 'dst': '/privatekey.key',
  2842. 'options': 'ro',
  2843. },
  2844. ] if (matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] and traefik_certs_dumper_enabled and matrix_coturn_tls_enabled and (matrix_coturn_tls_cert_path and matrix_coturn_tls_key_path)) else []
  2845. )
  2846. }}
  2847. matrix_coturn_systemd_required_services_list_auto: |
  2848. {{
  2849. ([traefik_certs_dumper_identifier + '-wait-for-domain@' + matrix_server_fqn_matrix + '.service'] if matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] and traefik_certs_dumper_enabled and matrix_coturn_tls_enabled else [])
  2850. }}
  2851. ######################################################################
  2852. #
  2853. # /matrix-coturn
  2854. #
  2855. ######################################################################
  2856. ######################################################################
  2857. #
  2858. # matrix-dimension
  2859. #
  2860. ######################################################################
  2861. matrix_dimension_enabled: false
  2862. matrix_dimension_scheme: "{{ 'https' if matrix_playbook_ssl_enabled else 'http' }}"
  2863. matrix_dimension_hostname: "{{ matrix_server_fqn_dimension }}"
  2864. matrix_dimension_docker_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_dimension_docker_image_registry_prefix_upstream_default }}"
  2865. matrix_dimension_container_image_self_build: "{{ matrix_architecture != 'amd64' }}"
  2866. matrix_dimension_container_network: "{{ matrix_addons_container_network }}"
  2867. # Dimension is connected both to `matrix_addons_homeserver_container_network` and `matrix_homeserver_container_network`,
  2868. # because `matrix_dimension_homeserver_clientServerUrl` and `matrix_dimension_homeserver_federationUrl` are potentially
  2869. # going to different places.
  2870. matrix_dimension_container_additional_networks: |
  2871. {{
  2872. (
  2873. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  2874. +
  2875. ([matrix_homeserver_container_network] if matrix_homeserver_container_network != matrix_dimension_container_network else [])
  2876. +
  2877. ([postgres_container_network] if (postgres_enabled and matrix_dimension_database_hostname == postgres_connection_hostname and postgres_container_network != matrix_dimension_container_network) else [])
  2878. +
  2879. ([matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network else [])
  2880. ) | unique
  2881. }}
  2882. matrix_dimension_container_http_host_bind_port: "{{ (matrix_playbook_service_host_bind_interface_prefix ~ '8184') if matrix_playbook_service_host_bind_interface_prefix else '' }}"
  2883. matrix_dimension_container_labels_traefik_enabled: "{{ matrix_playbook_traefik_labels_enabled }}"
  2884. matrix_dimension_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  2885. matrix_dimension_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  2886. matrix_dimension_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  2887. matrix_dimension_homeserver_clientServerUrl: "{{ matrix_addons_homeserver_client_api_url }}"
  2888. matrix_dimension_homeserver_federationUrl: "{{ matrix_homeserver_container_federation_url }}"
  2889. matrix_dimension_homeserver_mediaUrl: "{{ ('https' if matrix_playbook_ssl_enabled else 'http') }}://{{ matrix_server_fqn_matrix }}"
  2890. # Dimension depends both on `matrix_addons_homeserver_systemd_services_list` and on the homeserver service,
  2891. # because `matrix_dimension_homeserver_clientServerUrl` and `matrix_dimension_homeserver_federationUrl` are potentially
  2892. # going to different places.
  2893. matrix_dimension_systemd_required_services_list_auto: |
  2894. {{
  2895. (
  2896. matrix_addons_homeserver_systemd_services_list
  2897. +
  2898. ['matrix-' + matrix_homeserver_implementation + '.service']
  2899. +
  2900. ([postgres_identifier ~ '.service'] if (postgres_enabled and matrix_dimension_database_hostname == postgres_connection_hostname) else [])
  2901. ) | unique
  2902. }}
  2903. # Postgres is the default, except if not using internal Postgres server
  2904. matrix_dimension_database_engine: "{{ 'postgres' if postgres_enabled else 'sqlite' }}"
  2905. matrix_dimension_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  2906. matrix_dimension_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'dimension.db', rounds=655555) | to_uuid }}"
  2907. ######################################################################
  2908. #
  2909. # /matrix-dimension
  2910. #
  2911. ######################################################################
  2912. ######################################################################
  2913. #
  2914. # etherpad
  2915. #
  2916. ######################################################################
  2917. etherpad_enabled: false
  2918. etherpad_identifier: matrix-etherpad
  2919. etherpad_scheme: "{{ 'https' if matrix_playbook_ssl_enabled else 'http' }}"
  2920. etherpad_base_path: "{{ matrix_base_data_path }}/etherpad"
  2921. etherpad_framing_enabled: "{{ matrix_dimension_enabled or jitsi_enabled }}"
  2922. etherpad_hostname: "{{ matrix_server_fqn_etherpad }}"
  2923. 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 }}"
  2924. etherpad_container_image_self_build: "{{ matrix_architecture not in ['amd64'] }}"
  2925. etherpad_container_http_host_bind_port: "{{ (matrix_playbook_service_host_bind_interface_prefix ~ '9001') if matrix_playbook_service_host_bind_interface_prefix else '' }}"
  2926. etherpad_container_network: "{{ matrix_addons_container_network }}"
  2927. etherpad_container_additional_networks_auto: |
  2928. {{
  2929. (
  2930. ([matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network else [])
  2931. +
  2932. ([postgres_container_network] if postgres_enabled and postgres_container_network != etherpad_container_network else [])
  2933. ) | unique
  2934. }}
  2935. etherpad_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  2936. etherpad_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  2937. etherpad_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  2938. etherpad_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  2939. etherpad_systemd_required_services_list_auto: |
  2940. {{
  2941. ([postgres_identifier ~ '.service'] if postgres_enabled else [])
  2942. }}
  2943. etherpad_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  2944. etherpad_database_name: matrix_etherpad
  2945. etherpad_database_username: matrix_etherpad
  2946. etherpad_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'etherpad.db', rounds=655555) | to_uuid }}"
  2947. ######################################################################
  2948. #
  2949. # /etherpad
  2950. #
  2951. ######################################################################
  2952. ######################################################################
  2953. #
  2954. # matrix-dynamic-dns
  2955. #
  2956. ######################################################################
  2957. matrix_dynamic_dns_enabled: false
  2958. matrix_dynamic_dns_docker_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_dynamic_dns_docker_image_registry_prefix_upstream_default }}"
  2959. matrix_dynamic_dns_container_network: matrix-dynamic-dns
  2960. ######################################################################
  2961. #
  2962. # /matrix-dynamic-dns
  2963. #
  2964. ######################################################################
  2965. ######################################################################
  2966. #
  2967. # jitsi
  2968. #
  2969. ######################################################################
  2970. jitsi_enabled: false
  2971. jitsi_architecture: "{{ matrix_architecture }}"
  2972. jitsi_hostname: "{{ matrix_server_fqn_jitsi }}"
  2973. jitsi_identifier: matrix-jitsi
  2974. jitsi_base_path: "{{ matrix_base_data_path }}/jitsi"
  2975. jitsi_uid: "{{ matrix_user_uid }}"
  2976. jitsi_gid: "{{ matrix_user_gid }}"
  2977. jitsi_user_username: "{{ matrix_user_name }}"
  2978. 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 }}"
  2979. jitsi_web_container_http_host_bind_port: "{{ (matrix_playbook_service_host_bind_interface_prefix ~ '13080') if matrix_playbook_service_host_bind_interface_prefix else '' }}"
  2980. jitsi_web_container_additional_networks_auto: |
  2981. {{
  2982. ([matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network else [])
  2983. }}
  2984. 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 }}"
  2985. 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 '' }}"
  2986. jitsi_jvb_container_additional_networks_auto: |
  2987. {{
  2988. ([matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network else [])
  2989. }}
  2990. 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 }}"
  2991. jitsi_prosody_container_http_host_bind_port: "{{ (matrix_playbook_service_host_bind_interface_prefix ~ '5280') if matrix_playbook_service_host_bind_interface_prefix else '' }}"
  2992. jitsi_prosody_container_additional_networks_auto: |
  2993. {{
  2994. ([matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network else [])
  2995. }}
  2996. 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 }}"
  2997. jitsi_container_labels_traefik_enabled: "{{ matrix_playbook_traefik_labels_enabled }}"
  2998. jitsi_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  2999. jitsi_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  3000. jitsi_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  3001. jitsi_jibri_xmpp_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'jibri', rounds=655555) | to_uuid }}"
  3002. jitsi_jicofo_auth_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'jicofo', rounds=655555) | to_uuid }}"
  3003. jitsi_jvb_auth_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'jvb', rounds=655555) | to_uuid }}"
  3004. jitsi_web_stun_servers: |
  3005. {{
  3006. [
  3007. 'stun:' + matrix_server_fqn_matrix + ':5349',
  3008. 'stun:' + matrix_server_fqn_matrix + ':3478',
  3009. ]
  3010. if matrix_coturn_enabled
  3011. else [ 'stun:meet-jit-si-turnrelay.jitsi.net:443']
  3012. }}
  3013. # The Jitsi instance installed by this playbook is meant for embedding into Matrix clients, so framing is allowed.
  3014. jitsi_web_framing_enabled: true
  3015. # Jitsi (Prosody) only seems to support authenticating with coturn using `auth-secret`, not `lt-cred-mech`.
  3016. # See: https://prosody.im/doc/coturn
  3017. jitsi_turn_credentials: "{{ matrix_coturn_turn_static_auth_secret if (matrix_coturn_enabled and matrix_coturn_authentication_method == 'auth-secret') else '' }}"
  3018. jitsi_turn_host: "{{ ('turn.' + matrix_server_fqn_matrix) if matrix_coturn_enabled else '' }}"
  3019. jitsi_turns_host: "{{ ('turn.' + matrix_server_fqn_matrix) if matrix_coturn_enabled else '' }}"
  3020. jitsi_turn_port: "{{ matrix_coturn_container_stun_plain_host_bind_port_tcp.split(':')[-1] if matrix_coturn_enabled else '' }}"
  3021. jitsi_turns_port: "{{ matrix_coturn_container_stun_tls_host_bind_port_tcp.split(':')[-1] if matrix_coturn_enabled else '' }}"
  3022. # If the self-hosted Etherpad instance is available, it will also show up in Jitsi conferences,
  3023. # unless explicitly disabled by setting `jitsi_etherpad_enabled` to false.
  3024. # Falls back to the scalar.vector.im etherpad in case someone sets `jitsi_etherpad_enabled` to true,
  3025. # while also setting `etherpad_enabled` to false.
  3026. jitsi_etherpad_enabled: "{{ etherpad_enabled }}"
  3027. jitsi_etherpad_base: "{{ etherpad_base_url if etherpad_enabled else 'https://scalar.vector.im/etherpad' }}"
  3028. # Allow verification using JWT and matrix-UVS
  3029. jitsi_prosody_auth_matrix_uvs_sync_power_levels: "{{ matrix_user_verification_service_enabled }}"
  3030. jitsi_prosody_auth_matrix_uvs_auth_token: "{{ matrix_user_verification_service_uvs_auth_token }}"
  3031. jitsi_prosody_auth_matrix_uvs_location: "{{ matrix_user_verification_service_container_url }}"
  3032. jitsi_self_check_validate_certificates: "{{ matrix_playbook_ssl_enabled }}"
  3033. # Gravatar is enabled by default upstream, but there's no need to leak data there needlessly
  3034. # when embedding Jitsi in Matrix rooms.
  3035. jitsi_disable_gravatar: true
  3036. ######################################################################
  3037. #
  3038. # /jitsi
  3039. #
  3040. ######################################################################
  3041. ######################################################################
  3042. #
  3043. # matrix-ldap-registration-proxy
  3044. #
  3045. ######################################################################
  3046. # This is only for users with a specific LDAP setup
  3047. matrix_ldap_registration_proxy_enabled: false
  3048. matrix_ldap_registration_proxy_hostname: "{{ matrix_server_fqn_matrix }}"
  3049. matrix_ldap_registration_proxy_matrix_server_url: "{{ matrix_addons_homeserver_client_api_url }}"
  3050. matrix_ldap_registration_proxy_systemd_required_services_list_auto: |
  3051. {{
  3052. matrix_addons_homeserver_systemd_services_list
  3053. }}
  3054. matrix_ldap_registration_proxy_docker_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_ldap_registration_proxy_docker_image_registry_prefix_upstream_default }}"
  3055. matrix_ldap_registration_proxy_container_network: "{{ matrix_addons_container_network }}"
  3056. matrix_ldap_registration_proxy_container_additional_networks_auto: |-
  3057. {{
  3058. (
  3059. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  3060. +
  3061. ([matrix_playbook_reverse_proxyable_services_additional_network] if (matrix_playbook_reverse_proxyable_services_additional_network and matrix_ldap_registration_proxy_container_labels_traefik_enabled) else [])
  3062. ) | unique
  3063. }}
  3064. matrix_ldap_registration_proxy_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  3065. matrix_ldap_registration_proxy_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  3066. matrix_ldap_registration_proxy_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  3067. matrix_ldap_registration_proxy_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  3068. ######################################################################
  3069. #
  3070. # /matrix-ldap-registration-proxy
  3071. #
  3072. ######################################################################
  3073. ########################################################################
  3074. # #
  3075. # exim-relay #
  3076. # #
  3077. ########################################################################
  3078. # We set up an Exim email relay by default.
  3079. # This is so that the homeserver and various other services can send emails through it.
  3080. # To completely disable this service, use: `exim_relay_enabled: false`
  3081. exim_relay_identifier: "matrix-exim-relay"
  3082. exim_relay_base_path: "{{ matrix_base_data_path }}/exim-relay"
  3083. exim_relay_uid: "{{ matrix_user_uid }}"
  3084. exim_relay_gid: "{{ matrix_user_gid }}"
  3085. exim_relay_hostname: "{{ matrix_server_fqn_matrix }}"
  3086. exim_relay_sender_address: "matrix@{{ exim_relay_hostname }}"
  3087. 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 }}"
  3088. exim_relay_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm32', 'arm64'] }}"
  3089. ########################################################################
  3090. # #
  3091. # /exim-relay #
  3092. # #
  3093. ########################################################################
  3094. ######################################################################
  3095. #
  3096. # matrix-ma1sd
  3097. #
  3098. ######################################################################
  3099. # We no longer install the ma1sd identity server by default.
  3100. #
  3101. # The main reason we used to install ma1sd by default in the past was to
  3102. # prevent Element from talking to the `matrix.org` / `vector.im` identity servers,
  3103. # by forcing it to talk to our own self-hosted (but otherwise useless) identity server instead,
  3104. # thus preventing contact list leaks.
  3105. #
  3106. # Since Element no longer defaults to using a public identity server if another one is not provided,
  3107. # we can stop installing ma1sd.
  3108. matrix_ma1sd_enabled: false
  3109. matrix_ma1sd_scheme: "{{ 'https' if matrix_playbook_ssl_enabled else 'http' }}"
  3110. matrix_ma1sd_hostname: "{{ matrix_server_fqn_matrix }}"
  3111. matrix_ma1sd_docker_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_ma1sd_docker_image_registry_prefix_upstream_default }}"
  3112. matrix_ma1sd_container_image_self_build: "{{ matrix_architecture != 'amd64' }}"
  3113. matrix_ma1sd_container_http_host_bind_port: "{{ (matrix_playbook_service_host_bind_interface_prefix ~ '' ~ matrix_ma1sd_container_port | string) if matrix_playbook_service_host_bind_interface_prefix else '' }}"
  3114. matrix_ma1sd_container_network: "{{ matrix_homeserver_container_network }}"
  3115. matrix_ma1sd_container_additional_networks_auto: |
  3116. {{
  3117. (
  3118. ([matrix_homeserver_container_network] if (matrix_ma1sd_container_network != matrix_homeserver_container_network) else [])
  3119. +
  3120. ([postgres_container_network] if (postgres_enabled and matrix_ma1sd_database_hostname == postgres_connection_hostname and matrix_ma1sd_container_network != postgres_container_network) else [])
  3121. +
  3122. ([exim_relay_container_network] if (exim_relay_enabled and matrix_ma1sd_threepid_medium_email_connectors_smtp_host == exim_relay_identifier and matrix_ma1sd_container_network != exim_relay_container_network) else [])
  3123. +
  3124. ([matrix_playbook_reverse_proxyable_services_additional_network] if (matrix_playbook_reverse_proxyable_services_additional_network and matrix_ma1sd_container_labels_traefik_enabled) else [])
  3125. ) | unique
  3126. }}
  3127. matrix_ma1sd_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  3128. matrix_ma1sd_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  3129. matrix_ma1sd_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  3130. matrix_ma1sd_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  3131. # We enable Synapse integration via its Postgres database by default.
  3132. # When using another Identity store, you might wish to disable this and define
  3133. # your own configuration in `matrix_ma1sd_configuration_extension_yaml`.
  3134. matrix_ma1sd_synapsesql_enabled: true
  3135. matrix_ma1sd_synapsesql_type: postgresql
  3136. matrix_ma1sd_synapsesql_connection: //{{ matrix_synapse_database_host }}/{{ matrix_synapse_database_database }}?user={{ matrix_synapse_database_user | urlencode() }}&password={{ matrix_synapse_database_password | urlencode() }}
  3137. matrix_ma1sd_dns_overwrite_enabled: true
  3138. matrix_ma1sd_dns_overwrite_homeserver_client_name: "{{ matrix_server_fqn_matrix }}"
  3139. matrix_ma1sd_dns_overwrite_homeserver_client_value: "{{ matrix_addons_homeserver_client_api_url }}"
  3140. # By default, we send mail through the exim relay service.
  3141. matrix_ma1sd_threepid_medium_email_identity_from: "{{ exim_relay_sender_address }}"
  3142. matrix_ma1sd_threepid_medium_email_connectors_smtp_host: "{{ exim_relay_identifier }}"
  3143. matrix_ma1sd_threepid_medium_email_connectors_smtp_port: 8025
  3144. matrix_ma1sd_threepid_medium_email_connectors_smtp_tls: 0
  3145. matrix_ma1sd_self_check_validate_certificates: "{{ matrix_playbook_ssl_enabled }}"
  3146. matrix_ma1sd_systemd_required_services_list_auto: |
  3147. {{
  3148. matrix_addons_homeserver_systemd_services_list
  3149. +
  3150. ([postgres_identifier ~ '.service'] if (postgres_enabled and matrix_ma1sd_database_hostname == postgres_connection_hostname) else [])
  3151. }}
  3152. matrix_ma1sd_systemd_wanted_services_list_auto: |
  3153. {{
  3154. ([exim_relay_identifier ~ '.service'] if (exim_relay_enabled and matrix_ma1sd_threepid_medium_email_connectors_smtp_host == exim_relay_identifier) else [])
  3155. }}
  3156. # Postgres is the default, except if not using internal Postgres server
  3157. matrix_ma1sd_database_engine: "{{ 'postgres' if postgres_enabled else 'sqlite' }}"
  3158. matrix_ma1sd_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  3159. matrix_ma1sd_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'ma1sd.db', rounds=655555) | to_uuid }}"
  3160. ######################################################################
  3161. #
  3162. # /matrix-ma1sd
  3163. #
  3164. ######################################################################
  3165. ######################################################################
  3166. #
  3167. # matrix-media-repo
  3168. #
  3169. ######################################################################
  3170. matrix_media_repo_enabled: false
  3171. matrix_media_repo_docker_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_media_repo_docker_image_registry_prefix_upstream_default }}"
  3172. matrix_media_repo_container_network: "{{ matrix_homeserver_container_network }}"
  3173. matrix_media_repo_container_additional_networks: |
  3174. {{
  3175. (
  3176. ([matrix_homeserver_container_network] if (matrix_media_repo_container_network != matrix_homeserver_container_network) else [])
  3177. +
  3178. ([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 [])
  3179. +
  3180. ([matrix_playbook_reverse_proxyable_services_additional_network] if (matrix_playbook_reverse_proxyable_services_additional_network and matrix_media_repo_container_labels_traefik_enabled) else [])
  3181. ) | unique
  3182. }}
  3183. matrix_media_repo_container_labels_traefik_enabled: "{{ matrix_playbook_traefik_labels_enabled }}"
  3184. matrix_media_repo_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  3185. matrix_media_repo_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  3186. matrix_media_repo_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  3187. matrix_media_repo_container_labels_traefik_internal_media_enabled: "{{ matrix_playbook_internal_matrix_client_api_traefik_entrypoint_enabled }}"
  3188. matrix_media_repo_container_labels_traefik_internal_media_entrypoints: "{{ matrix_playbook_internal_matrix_client_api_traefik_entrypoint_name }}"
  3189. matrix_media_repo_container_labels_traefik_internal_matrix_client_media_enabled: "{{ matrix_playbook_internal_matrix_client_api_traefik_entrypoint_enabled }}"
  3190. matrix_media_repo_container_labels_traefik_internal_matrix_client_media_entrypoints: "{{ matrix_playbook_internal_matrix_client_api_traefik_entrypoint_name }}"
  3191. matrix_media_repo_metrics_proxying_enabled: "{{ matrix_media_repo_metrics_enabled and matrix_metrics_exposure_enabled }}"
  3192. matrix_media_repo_metrics_proxying_hostname: "{{ matrix_metrics_exposure_hostname }}"
  3193. matrix_media_repo_metrics_proxying_path: "{{ matrix_metrics_exposure_path_prefix }}/matrix-media-repo"
  3194. matrix_media_repo_container_labels_traefik_metrics_middleware_basic_auth_enabled: "{{ matrix_metrics_exposure_http_basic_auth_enabled }}"
  3195. matrix_media_repo_container_labels_traefik_metrics_middleware_basic_auth_users: "{{ matrix_metrics_exposure_http_basic_auth_users }}"
  3196. matrix_media_repo_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  3197. matrix_media_repo_database_username: matrix_media_repo
  3198. matrix_media_repo_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mediarepo.db', rounds=655555) | to_uuid }}"
  3199. matrix_media_repo_database_name: matrix_media_repo
  3200. matrix_media_repo_systemd_required_services_list_auto: |
  3201. {{
  3202. matrix_addons_homeserver_systemd_services_list
  3203. +
  3204. ([postgres_identifier ~ '.service'] if postgres_enabled and matrix_media_repo_database_hostname == postgres_connection_hostname else [])
  3205. }}
  3206. matrix_media_repo_generate_signing_key: "{{ matrix_homeserver_implementation == 'synapse' or matrix_homeserver_implementation == 'dendrite'}}"
  3207. 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 '') }}"
  3208. matrix_media_repo_synapse_signing_key: "{{ matrix_synapse_config_dir_path }}/{{ matrix_server_fqn_matrix }}.signing.key"
  3209. matrix_media_repo_dendrite_signing_key: "{{ matrix_dendrite_config_dir_path }}/{{ matrix_server_fqn_matrix }}.signing.pem"
  3210. # Auto configured server setup by the playbook
  3211. matrix_media_repo_homeservers_auto:
  3212. - # Keep the dash from this line.
  3213. # This should match the server_name of your homeserver, and the Host header
  3214. # provided to the media repo.
  3215. name: "{{ matrix_domain }}"
  3216. # The base URL to where the homeserver can actually be reached by MMR.
  3217. csApi: "{{ matrix_homeserver_container_url }}"
  3218. # The number of consecutive failures in calling this homeserver before the
  3219. # media repository will start backing off. This defaults to 10 if not given.
  3220. backoffAt: 10
  3221. # The admin API interface supported by the homeserver. MMR uses a subset of the admin API
  3222. # during certain operations, like attempting to purge media from a room or validating server
  3223. # admin status. This should be set to one of "synapse", "dendrite", or "matrix". When set
  3224. # to "matrix", most functionality requiring the admin API will not work.
  3225. adminApiKind: "{{ 'synapse' if matrix_homeserver_implementation == 'synapse' else ('dendrite' if matrix_homeserver_implementation == 'dendrite' else 'matrix') }}"
  3226. # The signing key to use for authorizing outbound federation requests. If not specified,
  3227. # requests will not be authorized. See https://docs.t2bot.io/matrix-media-repo/v1.3.5/installation/signing-key/
  3228. # for details.
  3229. signingKeyPath: "{{ '/config/' + matrix_media_repo_identifier + '.signing.key' if matrix_media_repo_generate_signing_key else '' }}"
  3230. matrix_media_repo_homeserver_federation_enabled: "{{ matrix_homeserver_federation_enabled }}"
  3231. ######################################################################
  3232. #
  3233. # /matrix-media-repo
  3234. #
  3235. ######################################################################
  3236. ########################################################################
  3237. # #
  3238. # postgres #
  3239. # #
  3240. ########################################################################
  3241. # To completely disable installing Postgres, use `postgres_enabled: false`.
  3242. postgres_identifier: matrix-postgres
  3243. postgres_architecture: "{{ matrix_architecture }}"
  3244. postgres_base_path: "{{ matrix_base_data_path }}/postgres"
  3245. postgres_uid: "{{ matrix_user_uid }}"
  3246. postgres_gid: "{{ matrix_user_gid }}"
  3247. postgres_connection_username: matrix
  3248. postgres_db_name: matrix
  3249. postgres_systemd_services_to_stop_for_maintenance_list_auto: "{{ devture_systemd_service_manager_services_list_auto | map(attribute='name') | reject('equalto', (postgres_identifier + '.service')) }}"
  3250. postgres_max_connections: "{{ 500 if matrix_synapse_workers_enabled else 200 }}"
  3251. 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 }}"
  3252. 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 }}"
  3253. postgres_managed_databases_auto: |
  3254. {{
  3255. ([{
  3256. 'name': matrix_synapse_database_database,
  3257. 'username': matrix_synapse_database_user,
  3258. 'password': matrix_synapse_database_password,
  3259. }] if (matrix_synapse_enabled and matrix_synapse_database_host == postgres_connection_hostname) else [])
  3260. +
  3261. ([{
  3262. 'name': matrix_dendrite_federation_api_database,
  3263. 'username': matrix_dendrite_database_user,
  3264. 'password': matrix_dendrite_database_password,
  3265. },{
  3266. 'name': matrix_dendrite_key_server_database,
  3267. 'username': matrix_dendrite_database_user,
  3268. 'password': matrix_dendrite_database_password,
  3269. },{
  3270. 'name': matrix_dendrite_media_api_database,
  3271. 'username': matrix_dendrite_database_user,
  3272. 'password': matrix_dendrite_database_password,
  3273. },{
  3274. 'name': matrix_dendrite_room_database,
  3275. 'username': matrix_dendrite_database_user,
  3276. 'password': matrix_dendrite_database_password,
  3277. },{
  3278. 'name': matrix_dendrite_sync_api_database,
  3279. 'username': matrix_dendrite_database_user,
  3280. 'password': matrix_dendrite_database_password,
  3281. },{
  3282. 'name': matrix_dendrite_user_api_database,
  3283. 'username': matrix_dendrite_database_user,
  3284. 'password': matrix_dendrite_database_password,
  3285. },{
  3286. 'name': matrix_dendrite_relay_api_database,
  3287. 'username': matrix_dendrite_database_user,
  3288. 'password': matrix_dendrite_database_password,
  3289. },{
  3290. 'name': matrix_dendrite_push_server_database,
  3291. 'username': matrix_dendrite_database_user,
  3292. 'password': matrix_dendrite_database_password,
  3293. },{
  3294. 'name': matrix_dendrite_mscs_database,
  3295. 'username': matrix_dendrite_database_user,
  3296. 'password': matrix_dendrite_database_password,
  3297. }] if (matrix_dendrite_enabled and matrix_dendrite_database_hostname == postgres_connection_hostname) else [])
  3298. +
  3299. ([{
  3300. 'name': matrix_authentication_service_config_database_database,
  3301. 'username': matrix_authentication_service_config_database_username,
  3302. 'password': matrix_authentication_service_config_database_password,
  3303. }] if (matrix_authentication_service_enabled and matrix_authentication_service_config_database_host == postgres_connection_hostname) else [])
  3304. +
  3305. ([{
  3306. 'name': matrix_sliding_sync_database_name,
  3307. 'username': matrix_sliding_sync_database_username,
  3308. 'password': matrix_sliding_sync_database_password,
  3309. }] if (matrix_sliding_sync_enabled) else [])
  3310. +
  3311. ([{
  3312. 'name': matrix_ma1sd_database_name,
  3313. 'username': matrix_ma1sd_database_username,
  3314. 'password': matrix_ma1sd_database_password,
  3315. }] if (matrix_ma1sd_enabled and matrix_ma1sd_database_engine == 'postgres' and matrix_ma1sd_database_hostname == postgres_connection_hostname) else [])
  3316. +
  3317. ([{
  3318. 'name': matrix_bot_matrix_reminder_bot_database_name,
  3319. 'username': matrix_bot_matrix_reminder_bot_database_username,
  3320. 'password': matrix_bot_matrix_reminder_bot_database_password,
  3321. }] 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 [])
  3322. +
  3323. ([{
  3324. 'name': matrix_bot_honoroit_database_name,
  3325. 'username': matrix_bot_honoroit_database_username,
  3326. 'password': matrix_bot_honoroit_database_password,
  3327. }] if (matrix_bot_honoroit_enabled and matrix_bot_honoroit_database_engine == 'postgres' and matrix_bot_honoroit_database_hostname == postgres_connection_hostname) else [])
  3328. +
  3329. ([{
  3330. 'name': matrix_postmoogle_database_name,
  3331. 'username': matrix_postmoogle_database_username,
  3332. 'password': matrix_postmoogle_database_password,
  3333. }] if (matrix_postmoogle_enabled and matrix_postmoogle_database_engine == 'postgres' and matrix_postmoogle_database_hostname == postgres_connection_hostname) else [])
  3334. +
  3335. ([{
  3336. 'name': matrix_bot_maubot_database_name,
  3337. 'username': matrix_bot_maubot_database_username,
  3338. 'password': matrix_bot_maubot_database_password,
  3339. }] if (matrix_bot_maubot_enabled and matrix_bot_maubot_database_engine == 'postgres' and matrix_bot_maubot_database_hostname == postgres_connection_hostname) else [])
  3340. +
  3341. ([{
  3342. 'name': matrix_bot_buscarron_database_name,
  3343. 'username': matrix_bot_buscarron_database_username,
  3344. 'password': matrix_bot_buscarron_database_password,
  3345. }] if (matrix_bot_buscarron_enabled and matrix_bot_buscarron_database_engine == 'postgres' and matrix_bot_buscarron_database_hostname == postgres_connection_hostname) else [])
  3346. +
  3347. ([{
  3348. 'name': matrix_registration_database_name,
  3349. 'username': matrix_registration_database_username,
  3350. 'password': matrix_registration_database_password,
  3351. }] if (matrix_registration_enabled and matrix_registration_database_engine == 'postgres' and matrix_registration_database_hostname == postgres_connection_hostname) else [])
  3352. +
  3353. ([{
  3354. 'name': matrix_appservice_discord_database_name,
  3355. 'username': matrix_appservice_discord_database_username,
  3356. 'password': matrix_appservice_discord_database_password,
  3357. }] if (matrix_appservice_discord_enabled and matrix_appservice_discord_database_engine == 'postgres' and matrix_appservice_discord_database_hostname == postgres_connection_hostname) else [])
  3358. +
  3359. ([{
  3360. 'name': matrix_appservice_draupnir_for_all_database_name,
  3361. 'username': matrix_appservice_draupnir_for_all_database_username,
  3362. 'password': matrix_appservice_draupnir_for_all_database_password,
  3363. }] if (matrix_appservice_draupnir_for_all_enabled and matrix_appservice_draupnir_for_all_database_hostname == postgres_connection_hostname) else [])
  3364. +
  3365. ([{
  3366. 'name': matrix_appservice_slack_database_name,
  3367. 'username': matrix_appservice_slack_database_username,
  3368. 'password': matrix_appservice_slack_database_password,
  3369. }] if (matrix_appservice_slack_enabled and matrix_appservice_slack_database_engine == 'postgres' and matrix_appservice_slack_database_hostname == postgres_connection_hostname) else [])
  3370. +
  3371. ([{
  3372. 'name': matrix_appservice_irc_database_name,
  3373. 'username': matrix_appservice_irc_database_username,
  3374. 'password': matrix_appservice_irc_database_password,
  3375. }] if (matrix_appservice_irc_enabled and matrix_appservice_irc_database_engine == 'postgres' and matrix_appservice_irc_database_hostname == postgres_connection_hostname) else [])
  3376. +
  3377. ([{
  3378. 'name': matrix_appservice_kakaotalk_database_name,
  3379. 'username': matrix_appservice_kakaotalk_database_username,
  3380. 'password': matrix_appservice_kakaotalk_database_password,
  3381. }] if (matrix_appservice_kakaotalk_enabled and matrix_appservice_kakaotalk_database_engine == 'postgres' and matrix_appservice_kakaotalk_database_hostname == postgres_connection_hostname) else [])
  3382. +
  3383. ([{
  3384. 'name': matrix_beeper_linkedin_database_name,
  3385. 'username': matrix_beeper_linkedin_database_username,
  3386. 'password': matrix_beeper_linkedin_database_password,
  3387. }] if (matrix_beeper_linkedin_enabled and matrix_beeper_linkedin_database_engine == 'postgres' and matrix_beeper_linkedin_database_hostname == postgres_connection_hostname) else [])
  3388. +
  3389. ([{
  3390. 'name': matrix_go_skype_bridge_database_name,
  3391. 'username': matrix_go_skype_bridge_database_username,
  3392. 'password': matrix_go_skype_bridge_database_password,
  3393. }] if (matrix_go_skype_bridge_enabled and matrix_go_skype_bridge_database_engine == 'postgres' and matrix_go_skype_bridge_database_hostname == postgres_connection_hostname) else [])
  3394. +
  3395. ([{
  3396. 'name': matrix_wechat_database_name,
  3397. 'username': matrix_wechat_database_username,
  3398. 'password': matrix_wechat_database_password,
  3399. }] if (matrix_wechat_enabled and matrix_wechat_database_engine == 'postgres' and matrix_wechat_database_hostname == postgres_connection_hostname) else [])
  3400. +
  3401. ([{
  3402. 'name': matrix_mautrix_bluesky_database_name,
  3403. 'username': matrix_mautrix_bluesky_database_username,
  3404. 'password': matrix_mautrix_bluesky_database_password,
  3405. }] if (matrix_mautrix_bluesky_enabled and matrix_mautrix_bluesky_database_engine == 'postgres' and matrix_mautrix_bluesky_database_hostname == postgres_connection_hostname) else [])
  3406. +
  3407. ([{
  3408. 'name': matrix_mautrix_facebook_database_name,
  3409. 'username': matrix_mautrix_facebook_database_username,
  3410. 'password': matrix_mautrix_facebook_database_password,
  3411. }] if (matrix_mautrix_facebook_enabled and matrix_mautrix_facebook_database_engine == 'postgres' and matrix_mautrix_facebook_database_hostname == postgres_connection_hostname) else [])
  3412. +
  3413. ([{
  3414. 'name': matrix_mautrix_googlechat_database_name,
  3415. 'username': matrix_mautrix_googlechat_database_username,
  3416. 'password': matrix_mautrix_googlechat_database_password,
  3417. }] if (matrix_mautrix_googlechat_enabled and matrix_mautrix_googlechat_database_engine == 'postgres' and matrix_mautrix_googlechat_database_hostname == postgres_connection_hostname) else [])
  3418. +
  3419. ([{
  3420. 'name': matrix_mautrix_instagram_database_name,
  3421. 'username': matrix_mautrix_instagram_database_username,
  3422. 'password': matrix_mautrix_instagram_database_password,
  3423. }] if (matrix_mautrix_instagram_enabled and matrix_mautrix_instagram_database_engine == 'postgres' and matrix_mautrix_instagram_database_hostname == postgres_connection_hostname) else [])
  3424. +
  3425. ([{
  3426. 'name': matrix_mautrix_signal_database_name,
  3427. 'username': matrix_mautrix_signal_database_username,
  3428. 'password': matrix_mautrix_signal_database_password,
  3429. }] if (matrix_mautrix_signal_enabled and matrix_mautrix_signal_database_engine == 'postgres' and matrix_mautrix_signal_database_hostname == postgres_connection_hostname) else [])
  3430. +
  3431. ([{
  3432. 'name': matrix_mautrix_meta_messenger_database_name,
  3433. 'username': matrix_mautrix_meta_messenger_database_username,
  3434. 'password': matrix_mautrix_meta_messenger_database_password,
  3435. }] if (matrix_mautrix_meta_messenger_enabled and matrix_mautrix_meta_messenger_database_engine == 'postgres' and matrix_mautrix_meta_messenger_database_hostname == postgres_connection_hostname) else [])
  3436. +
  3437. ([{
  3438. 'name': matrix_mautrix_meta_instagram_database_name,
  3439. 'username': matrix_mautrix_meta_instagram_database_username,
  3440. 'password': matrix_mautrix_meta_instagram_database_password,
  3441. }] if (matrix_mautrix_meta_instagram_enabled and matrix_mautrix_meta_instagram_database_engine == 'postgres' and matrix_mautrix_meta_instagram_database_hostname == postgres_connection_hostname) else [])
  3442. +
  3443. ([{
  3444. 'name': matrix_mautrix_wsproxy_syncproxy_database_name,
  3445. 'username': matrix_mautrix_wsproxy_syncproxy_database_username,
  3446. 'password': matrix_mautrix_wsproxy_syncproxy_database_password,
  3447. }] if (matrix_mautrix_wsproxy_enabled and matrix_mautrix_wsproxy_syncproxy_database_engine == 'postgres' and matrix_mautrix_wsproxy_syncproxy_database_hostname == 'matrix-postgres') else [])
  3448. +
  3449. ([{
  3450. 'name': matrix_mautrix_telegram_database_name,
  3451. 'username': matrix_mautrix_telegram_database_username,
  3452. 'password': matrix_mautrix_telegram_database_password,
  3453. }] if (matrix_mautrix_telegram_enabled and matrix_mautrix_telegram_database_engine == 'postgres' and matrix_mautrix_telegram_database_hostname == postgres_connection_hostname) else [])
  3454. +
  3455. ([{
  3456. 'name': matrix_mautrix_twitter_database_name,
  3457. 'username': matrix_mautrix_twitter_database_username,
  3458. 'password': matrix_mautrix_twitter_database_password,
  3459. }] if (matrix_mautrix_twitter_enabled and matrix_mautrix_twitter_database_engine == 'postgres' and matrix_mautrix_twitter_database_hostname == postgres_connection_hostname) else [])
  3460. +
  3461. ([{
  3462. 'name': matrix_mautrix_gmessages_database_name,
  3463. 'username': matrix_mautrix_gmessages_database_username,
  3464. 'password': matrix_mautrix_gmessages_database_password,
  3465. }] if (matrix_mautrix_gmessages_enabled and matrix_mautrix_gmessages_database_engine == 'postgres' and matrix_mautrix_gmessages_database_hostname == postgres_connection_hostname) else [])
  3466. +
  3467. ([{
  3468. 'name': matrix_mautrix_whatsapp_database_name,
  3469. 'username': matrix_mautrix_whatsapp_database_username,
  3470. 'password': matrix_mautrix_whatsapp_database_password,
  3471. }] if (matrix_mautrix_whatsapp_enabled and matrix_mautrix_whatsapp_database_engine == 'postgres' and matrix_mautrix_whatsapp_database_hostname == postgres_connection_hostname) else [])
  3472. +
  3473. ([{
  3474. 'name': matrix_mautrix_discord_database_name,
  3475. 'username': matrix_mautrix_discord_database_username,
  3476. 'password': matrix_mautrix_discord_database_password,
  3477. }] if (matrix_mautrix_discord_enabled and matrix_mautrix_discord_database_engine == 'postgres' and matrix_mautrix_discord_database_hostname == postgres_connection_hostname) else [])
  3478. +
  3479. ([{
  3480. 'name': matrix_mautrix_slack_database_name,
  3481. 'username': matrix_mautrix_slack_database_username,
  3482. 'password': matrix_mautrix_slack_database_password,
  3483. }] if (matrix_mautrix_slack_enabled and matrix_mautrix_slack_database_engine == 'postgres' and matrix_mautrix_slack_database_hostname == postgres_connection_hostname) else [])
  3484. +
  3485. ([{
  3486. 'name': matrix_mx_puppet_slack_database_name,
  3487. 'username': matrix_mx_puppet_slack_database_username,
  3488. 'password': matrix_mx_puppet_slack_database_password,
  3489. }] if (matrix_mx_puppet_slack_enabled and matrix_mx_puppet_slack_database_engine == 'postgres' and matrix_mx_puppet_slack_database_hostname == postgres_connection_hostname) else [])
  3490. +
  3491. ([{
  3492. 'name': matrix_mx_puppet_twitter_database_name,
  3493. 'username': matrix_mx_puppet_twitter_database_username,
  3494. 'password': matrix_mx_puppet_twitter_database_password,
  3495. }] if (matrix_mx_puppet_twitter_enabled and matrix_mx_puppet_twitter_database_engine == 'postgres' and matrix_mx_puppet_twitter_database_hostname == postgres_connection_hostname) else [])
  3496. +
  3497. ([{
  3498. 'name': matrix_mx_puppet_instagram_database_name,
  3499. 'username': matrix_mx_puppet_instagram_database_username,
  3500. 'password': matrix_mx_puppet_instagram_database_password,
  3501. }] if (matrix_mx_puppet_instagram_enabled and matrix_mx_puppet_instagram_database_engine == 'postgres' and matrix_mx_puppet_instagram_database_hostname == postgres_connection_hostname) else [])
  3502. +
  3503. ([{
  3504. 'name': matrix_mx_puppet_discord_database_name,
  3505. 'username': matrix_mx_puppet_discord_database_username,
  3506. 'password': matrix_mx_puppet_discord_database_password,
  3507. }] if (matrix_mx_puppet_discord_enabled and matrix_mx_puppet_discord_database_engine == 'postgres' and matrix_mx_puppet_discord_database_hostname == postgres_connection_hostname) else [])
  3508. +
  3509. ([{
  3510. 'name': matrix_mx_puppet_steam_database_name,
  3511. 'username': matrix_mx_puppet_steam_database_username,
  3512. 'password': matrix_mx_puppet_steam_database_password,
  3513. }] if (matrix_mx_puppet_steam_enabled and matrix_mx_puppet_steam_database_engine == 'postgres' and matrix_mx_puppet_steam_database_hostname == postgres_connection_hostname) else [])
  3514. +
  3515. ([{
  3516. 'name': matrix_mx_puppet_groupme_database_name,
  3517. 'username': matrix_mx_puppet_groupme_database_username,
  3518. 'password': matrix_mx_puppet_groupme_database_password,
  3519. }] if (matrix_mx_puppet_groupme_enabled and matrix_mx_puppet_groupme_database_engine == 'postgres' and matrix_mx_puppet_groupme_database_hostname == postgres_connection_hostname) else [])
  3520. +
  3521. ([{
  3522. 'name': matrix_steam_bridge_database_name,
  3523. 'username': matrix_steam_bridge_database_username,
  3524. 'password': matrix_steam_bridge_database_password,
  3525. }] if (matrix_steam_bridge_enabled and matrix_steam_bridge_database_engine == 'postgres' and matrix_steam_bridge_database_hostname == postgres_connection_hostname) else [])
  3526. +
  3527. ([{
  3528. 'name': matrix_dimension_database_name,
  3529. 'username': matrix_dimension_database_username,
  3530. 'password': matrix_dimension_database_password,
  3531. }] if (matrix_dimension_enabled and matrix_dimension_database_engine == 'postgres' and matrix_dimension_database_hostname == postgres_connection_hostname) else [])
  3532. +
  3533. ([{
  3534. 'name': etherpad_database_name,
  3535. 'username': etherpad_database_username,
  3536. 'password': etherpad_database_password,
  3537. }] if (etherpad_enabled and etherpad_database_type == 'postgres' and etherpad_database_hostname == postgres_connection_hostname) else [])
  3538. +
  3539. ([{
  3540. 'name': prometheus_postgres_exporter_database_name,
  3541. 'username': prometheus_postgres_exporter_database_username,
  3542. 'password': prometheus_postgres_exporter_database_password,
  3543. }] if (prometheus_postgres_exporter_enabled and prometheus_postgres_exporter_database_hostname == postgres_connection_hostname) else [])
  3544. +
  3545. ([{
  3546. 'name': matrix_media_repo_database_name,
  3547. 'username': matrix_media_repo_database_username,
  3548. 'password': matrix_media_repo_database_password,
  3549. }] if (matrix_media_repo_enabled and matrix_media_repo_database_hostname == postgres_connection_hostname) else [])
  3550. }}
  3551. ########################################################################
  3552. # #
  3553. # /postgres #
  3554. # #
  3555. ########################################################################
  3556. ########################################################################
  3557. # #
  3558. # postgres_backup #
  3559. # #
  3560. ########################################################################
  3561. postgres_backup_enabled: false
  3562. postgres_backup_identifier: matrix-postgres-backup
  3563. postgres_backup_architecture: "{{ matrix_architecture }}"
  3564. postgres_backup_base_path: "{{ matrix_base_data_path }}/postgres-backup"
  3565. postgres_backup_systemd_required_services_list_auto: |
  3566. {{
  3567. ([(postgres_identifier + '.service')] if (postgres_enabled and postgres_backup_connection_hostname == postgres_connection_hostname) else [])
  3568. }}
  3569. 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 }}"
  3570. postgres_backup_container_network: "{{ (postgres_container_network if (postgres_enabled and postgres_backup_connection_hostname == postgres_connection_hostname) else postgres_backup_identifier) }}"
  3571. postgres_backup_container_additional_networks_auto: |-
  3572. {{
  3573. ([postgres_container_network] if (postgres_enabled and postgres_backup_connection_hostname == postgres_connection_hostname and postgres_backup_container_network != postgres_container_network) else [])
  3574. }}
  3575. postgres_backup_uid: "{{ matrix_user_uid }}"
  3576. postgres_backup_gid: "{{ matrix_user_gid }}"
  3577. postgres_backup_connection_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  3578. postgres_backup_connection_port: "{{ postgres_connection_port if postgres_enabled else 5432 }}"
  3579. postgres_backup_connection_username: "{{ postgres_connection_username if postgres_enabled else '' }}"
  3580. postgres_backup_connection_password: "{{ postgres_connection_password if postgres_enabled else '' }}"
  3581. postgres_backup_postgres_data_path: "{{ postgres_data_path if postgres_enabled else '' }}"
  3582. postgres_backup_postgres_role_include_name: galaxy/postgres
  3583. postgres_backup_databases_auto: "{{ postgres_managed_databases | map(attribute='name') if postgres_enabled else [] }}"
  3584. ########################################################################
  3585. # #
  3586. # /postgres_backup #
  3587. # #
  3588. ########################################################################
  3589. ######################################################################
  3590. #
  3591. # matrix-sygnal
  3592. #
  3593. ######################################################################
  3594. # Most people don't need their own push-server, because they also need their own app to utilize it from.
  3595. matrix_sygnal_enabled: false
  3596. matrix_sygnal_metrics_prometheus_enabled: "{{ prometheus_enabled or matrix_metrics_exposure_enabled }}"
  3597. matrix_sygnal_hostname: "{{ matrix_server_fqn_sygnal }}"
  3598. matrix_sygnal_docker_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_sygnal_docker_image_registry_prefix_upstream_default }}"
  3599. matrix_sygnal_container_network: "{{ matrix_homeserver_container_network }}"
  3600. matrix_sygnal_container_additional_networks: "{{ [matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network else [] }}"
  3601. matrix_sygnal_container_http_host_bind_port: "{{ (matrix_playbook_service_host_bind_interface_prefix ~ '6000') if matrix_playbook_service_host_bind_interface_prefix else '' }}"
  3602. matrix_sygnal_container_labels_traefik_enabled: "{{ matrix_playbook_traefik_labels_enabled }}"
  3603. matrix_sygnal_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  3604. matrix_sygnal_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  3605. matrix_sygnal_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  3606. ######################################################################
  3607. #
  3608. # /matrix-sygnal
  3609. #
  3610. ######################################################################
  3611. ######################################################################
  3612. #
  3613. # ntfy
  3614. #
  3615. ######################################################################
  3616. ntfy_enabled: false
  3617. ntfy_identifier: matrix-ntfy
  3618. ntfy_base_path: "{{ matrix_base_data_path }}/ntfy"
  3619. ntfy_uid: "{{ matrix_user_uid }}"
  3620. ntfy_gid: "{{ matrix_user_gid }}"
  3621. ntfy_hostname: "{{ matrix_server_fqn_ntfy }}"
  3622. 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 }}"
  3623. ntfy_container_additional_networks_auto: "{{ [matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network else [] }}"
  3624. ntfy_container_http_host_bind_port: "{{ (matrix_playbook_service_host_bind_interface_prefix ~ '2586') if matrix_playbook_service_host_bind_interface_prefix else '' }}"
  3625. ntfy_container_labels_traefik_enabled: "{{ matrix_playbook_traefik_labels_enabled }}"
  3626. ntfy_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  3627. ntfy_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  3628. ntfy_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  3629. ntfy_visitor_request_limit_exempt_hosts_hostnames_auto: |
  3630. {{
  3631. [matrix_server_fqn_matrix]
  3632. }}
  3633. ######################################################################
  3634. #
  3635. # /ntfy
  3636. #
  3637. ######################################################################
  3638. ######################################################################
  3639. #
  3640. # valkey
  3641. #
  3642. ######################################################################
  3643. valkey_enabled: "{{ matrix_synapse_workers_enabled or (matrix_hookshot_enabled and matrix_hookshot_encryption_enabled) }}"
  3644. valkey_identifier: matrix-valkey
  3645. valkey_uid: "{{ matrix_user_uid }}"
  3646. valkey_gid: "{{ matrix_user_gid }}"
  3647. valkey_base_path: "{{ matrix_base_data_path }}/valkey"
  3648. valkey_arch: "{{ matrix_architecture }}"
  3649. 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 }}"
  3650. ######################################################################
  3651. #
  3652. # valkey
  3653. #
  3654. ######################################################################
  3655. ######################################################################
  3656. #
  3657. # matrix-client-element
  3658. #
  3659. ######################################################################
  3660. # By default, this playbook installs the Element Web on the `matrix_server_fqn_element` domain.
  3661. # If you wish to connect to your Matrix server by other means, you may wish to disable this.
  3662. matrix_client_element_enabled: true
  3663. matrix_client_element_scheme: "{{ 'https' if matrix_playbook_ssl_enabled else 'http' }}"
  3664. matrix_client_element_docker_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_client_element_docker_image_registry_prefix_upstream_default }}"
  3665. matrix_client_element_container_image_self_build: "{{ matrix_architecture not in ['arm64', 'amd64'] }}"
  3666. 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 '' }}"
  3667. matrix_client_element_container_network: "{{ matrix_addons_container_network }}"
  3668. 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 [] }}"
  3669. matrix_client_element_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  3670. matrix_client_element_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  3671. matrix_client_element_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  3672. matrix_client_element_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  3673. matrix_client_element_container_labels_traefik_compression_middleware_enabled: "{{ matrix_playbook_reverse_proxy_traefik_middleware_compression_enabled }}"
  3674. 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 '' }}"
  3675. matrix_client_element_default_hs_url: "{{ matrix_homeserver_url }}"
  3676. matrix_client_element_default_is_url: "{{ matrix_identity_server_url }}"
  3677. # Use Dimension if enabled, otherwise fall back to Scalar
  3678. matrix_client_element_integrations_ui_url: "{{ matrix_dimension_integrations_ui_url if matrix_dimension_enabled else 'https://scalar.vector.im/' }}"
  3679. matrix_client_element_integrations_rest_url: "{{ matrix_dimension_integrations_rest_url if matrix_dimension_enabled else 'https://scalar.vector.im/api' }}"
  3680. matrix_client_element_integrations_widgets_urls: "{{ matrix_dimension_integrations_widgets_urls if matrix_dimension_enabled else ['https://scalar.vector.im/api'] }}"
  3681. matrix_client_element_integrations_jitsi_widget_url: "{{ matrix_dimension_integrations_jitsi_widget_url if matrix_dimension_enabled else 'https://scalar.vector.im/api/widgets/jitsi.html' }}"
  3682. matrix_client_element_self_check_validate_certificates: "{{ matrix_playbook_ssl_enabled }}"
  3683. matrix_client_element_registration_enabled: "{{ matrix_synapse_enable_registration }}"
  3684. matrix_client_element_enable_presence_by_hs_url: |-
  3685. {{
  3686. none
  3687. if matrix_synapse_presence_enabled
  3688. else {matrix_client_element_default_hs_url: false}
  3689. }}
  3690. matrix_client_element_jitsi_preferred_domain: "{{ matrix_server_fqn_jitsi if jitsi_enabled else '' }}"
  3691. matrix_client_element_features_feature_video_rooms: "{{ matrix_rtc_enabled }}"
  3692. matrix_client_element_features_feature_group_calls: "{{ matrix_rtc_enabled }}"
  3693. matrix_client_element_features_feature_element_call_video_rooms: "{{ matrix_rtc_enabled }}"
  3694. matrix_client_element_features_feature_oidc_native_flow: "{{ matrix_authentication_service_enabled }}"
  3695. matrix_client_element_element_call_enabled: "{{ matrix_element_call_enabled }}"
  3696. matrix_client_element_element_call_url: "{{ matrix_element_call_public_url if matrix_element_call_enabled else '' }}"
  3697. ######################################################################
  3698. #
  3699. # /matrix-client-element
  3700. #
  3701. ######################################################################
  3702. ######################################################################
  3703. #
  3704. # matrix-client-hydrogen
  3705. #
  3706. ######################################################################
  3707. matrix_client_hydrogen_enabled: false
  3708. matrix_client_hydrogen_docker_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_client_hydrogen_docker_image_registry_prefix_upstream_default }}"
  3709. matrix_client_hydrogen_container_image_self_build: "{{ matrix_architecture not in ['arm64', 'amd64'] }}"
  3710. matrix_client_hydrogen_container_http_host_bind_port: "{{ (matrix_playbook_service_host_bind_interface_prefix ~ '8768') if matrix_playbook_service_host_bind_interface_prefix else '' }}"
  3711. matrix_client_hydrogen_container_network: "{{ matrix_addons_container_network }}"
  3712. matrix_client_hydrogen_container_additional_networks: "{{ [matrix_playbook_reverse_proxyable_services_additional_network] if (matrix_client_hydrogen_container_labels_traefik_enabled and matrix_playbook_reverse_proxyable_services_additional_network) else [] }}"
  3713. matrix_client_hydrogen_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  3714. matrix_client_hydrogen_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  3715. matrix_client_hydrogen_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  3716. matrix_client_hydrogen_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  3717. matrix_client_hydrogen_container_labels_traefik_compression_middleware_enabled: "{{ matrix_playbook_reverse_proxy_traefik_middleware_compression_enabled }}"
  3718. matrix_client_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 '' }}"
  3719. matrix_client_hydrogen_scheme: "{{ 'https' if matrix_playbook_ssl_enabled else 'http' }}"
  3720. matrix_client_hydrogen_default_hs_url: "{{ matrix_homeserver_url }}"
  3721. matrix_client_hydrogen_self_check_validate_certificates: "{{ matrix_playbook_ssl_enabled }}"
  3722. ######################################################################
  3723. #
  3724. # /matrix-client-hydrogen
  3725. #
  3726. ######################################################################
  3727. ######################################################################
  3728. #
  3729. # matrix-client-cinny
  3730. #
  3731. ######################################################################
  3732. matrix_client_cinny_enabled: false
  3733. matrix_client_cinny_docker_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_client_cinny_docker_image_registry_prefix_upstream_default }}"
  3734. matrix_client_cinny_container_image_self_build: "{{ matrix_architecture not in ['arm64', 'amd64'] }}"
  3735. matrix_client_cinny_container_http_host_bind_port: "{{ (matrix_playbook_service_host_bind_interface_prefix ~ '8080') if matrix_playbook_service_host_bind_interface_prefix else '' }}"
  3736. matrix_client_cinny_container_network: "{{ matrix_addons_container_network }}"
  3737. matrix_client_cinny_container_additional_networks: "{{ [matrix_playbook_reverse_proxyable_services_additional_network] if (matrix_client_cinny_container_labels_traefik_enabled and matrix_playbook_reverse_proxyable_services_additional_network) else [] }}"
  3738. matrix_client_cinny_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  3739. matrix_client_cinny_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  3740. matrix_client_cinny_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  3741. matrix_client_cinny_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  3742. matrix_client_cinny_container_labels_traefik_compression_middleware_enabled: "{{ matrix_playbook_reverse_proxy_traefik_middleware_compression_enabled }}"
  3743. matrix_client_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 '' }}"
  3744. matrix_client_cinny_scheme: "{{ 'https' if matrix_playbook_ssl_enabled else 'http' }}"
  3745. matrix_client_cinny_default_hs_url: "{{ matrix_homeserver_url }}"
  3746. matrix_client_cinny_self_check_validate_certificates: "{{ matrix_playbook_ssl_enabled }}"
  3747. ######################################################################
  3748. #
  3749. # /matrix-client-cinny
  3750. #
  3751. ######################################################################
  3752. ######################################################################
  3753. #
  3754. # matrix-client-schildichat
  3755. #
  3756. ######################################################################
  3757. matrix_client_schildichat_enabled: false
  3758. matrix_client_schildichat_scheme: "{{ 'https' if matrix_playbook_ssl_enabled else 'http' }}"
  3759. matrix_client_schildichat_docker_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_client_schildichat_docker_image_registry_prefix_upstream_default }}"
  3760. matrix_client_schildichat_container_image_self_build: "{{ matrix_architecture not in ['arm64', 'amd64'] }}"
  3761. 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 '' }}"
  3762. matrix_client_schildichat_container_network: "{{ matrix_addons_container_network }}"
  3763. 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 [] }}"
  3764. matrix_client_schildichat_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  3765. matrix_client_schildichat_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  3766. matrix_client_schildichat_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  3767. matrix_client_schildichat_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  3768. matrix_client_schildichat_default_hs_url: "{{ matrix_homeserver_url }}"
  3769. matrix_client_schildichat_default_is_url: "{{ matrix_identity_server_url }}"
  3770. # Use Dimension if enabled, otherwise fall back to Scalar
  3771. matrix_client_schildichat_integrations_ui_url: "{{ matrix_dimension_integrations_ui_url if matrix_dimension_enabled else 'https://scalar.vector.im/' }}"
  3772. matrix_client_schildichat_integrations_rest_url: "{{ matrix_dimension_integrations_rest_url if matrix_dimension_enabled else 'https://scalar.vector.im/api' }}"
  3773. matrix_client_schildichat_integrations_widgets_urls: "{{ matrix_dimension_integrations_widgets_urls if matrix_dimension_enabled else ['https://scalar.vector.im/api'] }}"
  3774. matrix_client_schildichat_integrations_jitsi_widget_url: "{{ matrix_dimension_integrations_jitsi_widget_url if matrix_dimension_enabled else 'https://scalar.vector.im/api/widgets/jitsi.html' }}"
  3775. matrix_client_schildichat_self_check_validate_certificates: "{{ matrix_playbook_ssl_enabled }}"
  3776. matrix_client_schildichat_registration_enabled: "{{ matrix_synapse_enable_registration }}"
  3777. matrix_client_schildichat_enable_presence_by_hs_url: |-
  3778. {{
  3779. none
  3780. if matrix_synapse_presence_enabled
  3781. else {matrix_client_schildichat_default_hs_url: false}
  3782. }}
  3783. matrix_client_schildichat_jitsi_preferred_domain: "{{ matrix_server_fqn_jitsi if jitsi_enabled else '' }}"
  3784. ######################################################################
  3785. #
  3786. # /matrix-client-schildichat
  3787. #
  3788. ######################################################################
  3789. ######################################################################
  3790. #
  3791. # matrix-client-fluffychat
  3792. #
  3793. ######################################################################
  3794. matrix_client_fluffychat_enabled: false
  3795. matrix_client_fluffychat_scheme: "{{ 'https' if matrix_playbook_ssl_enabled else 'http' }}"
  3796. matrix_client_fluffychat_docker_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_client_fluffychat_docker_image_registry_prefix_upstream_default }}"
  3797. matrix_client_fluffychat_container_image_self_build: "{{ matrix_architecture not in ['arm64', 'amd64'] }}"
  3798. 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 '' }}"
  3799. matrix_client_fluffychat_container_network: "{{ matrix_addons_container_network }}"
  3800. 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 [] }}"
  3801. matrix_client_fluffychat_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  3802. matrix_client_fluffychat_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  3803. matrix_client_fluffychat_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  3804. matrix_client_fluffychat_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  3805. matrix_client_fluffychat_self_check_validate_certificates: "{{ matrix_playbook_ssl_enabled }}"
  3806. ######################################################################
  3807. #
  3808. # /matrix-client-fluffychat
  3809. #
  3810. ######################################################################
  3811. ######################################################################
  3812. #
  3813. # matrix-synapse
  3814. #
  3815. ######################################################################
  3816. matrix_synapse_enabled: "{{ matrix_homeserver_implementation == 'synapse' }}"
  3817. matrix_synapse_username: "{{ matrix_user_name }}"
  3818. matrix_synapse_uid: "{{ matrix_user_uid }}"
  3819. matrix_synapse_gid: "{{ matrix_user_gid }}"
  3820. matrix_synapse_federation_enabled: "{{ matrix_homeserver_federation_enabled }}"
  3821. matrix_synapse_docker_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_synapse_docker_image_registry_prefix_upstream_default }}"
  3822. matrix_s3_goofys_docker_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_s3_goofys_docker_image_registry_prefix_upstream_default }}"
  3823. matrix_synapse_rust_synapse_compress_state_docker_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_synapse_rust_synapse_compress_state_docker_image_registry_prefix_upstream_default }}"
  3824. matrix_synapse_container_image_self_build: "{{ matrix_architecture not in ['arm64', 'amd64'] }}"
  3825. matrix_synapse_account_threepid_delegates_msisdn_mas1sd_url: "{{ ('http://matrix-ma1sd:' + matrix_ma1sd_container_port| string) }}"
  3826. # When ma1sd is enabled, we can use it to validate phone numbers. It's something that the homeserver cannot do by itself.
  3827. matrix_synapse_account_threepid_delegates_msisdn: "{{ matrix_synapse_account_threepid_delegates_msisdn_mas1sd_url if matrix_ma1sd_enabled else '' }}"
  3828. # For exposing the Matrix Federation API's TLS port (HTTPS) to the internet on all network interfaces.
  3829. 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 '' }}"
  3830. #
  3831. # For exposing the Synapse Metrics API's port (plain HTTP) to the local host.
  3832. 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 '' }}"
  3833. #
  3834. # For exposing the Synapse Manhole port (plain HTTP) to the local host.
  3835. 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 '' }}"
  3836. matrix_synapse_container_network: "{{ matrix_homeserver_container_network }}"
  3837. matrix_synapse_container_additional_networks_auto: |
  3838. {{
  3839. (
  3840. ([matrix_playbook_reverse_proxyable_services_additional_network] if matrix_synapse_container_labels_traefik_enabled and matrix_playbook_reverse_proxyable_services_additional_network else [])
  3841. +
  3842. ([postgres_container_network] if (postgres_enabled and postgres_container_network != matrix_synapse_container_network and matrix_synapse_database_host == postgres_connection_hostname) else [])
  3843. +
  3844. ([valkey_container_network] if matrix_synapse_redis_enabled and matrix_synapse_redis_host == valkey_identifier else [])
  3845. +
  3846. ([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 [])
  3847. +
  3848. ([matrix_ma1sd_container_network] if (matrix_ma1sd_enabled and matrix_synapse_account_threepid_delegates_msisdn == matrix_synapse_account_threepid_delegates_msisdn_mas1sd_url and matrix_synapse_container_network != matrix_ma1sd_container_network) else [])
  3849. +
  3850. ([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 [])
  3851. ) | unique
  3852. }}
  3853. matrix_synapse_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  3854. matrix_synapse_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  3855. matrix_synapse_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  3856. matrix_synapse_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  3857. matrix_synapse_container_labels_traefik_hostname: "{{ matrix_server_fqn_matrix }}"
  3858. matrix_synapse_container_labels_traefik_compression_middleware_enabled: "{{ matrix_playbook_reverse_proxy_traefik_middleware_compression_enabled }}"
  3859. 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 '' }}"
  3860. matrix_synapse_container_labels_matrix_labels_enabled: "{{ not matrix_synapse_workers_enabled }}"
  3861. matrix_synapse_container_labels_public_client_root_redirection_enabled: "{{ matrix_synapse_container_labels_public_client_root_redirection_url != '' }}"
  3862. 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 '' }}"
  3863. matrix_synapse_container_labels_public_client_synapse_admin_api_enabled: "{{ matrix_synapse_admin_enabled }}"
  3864. matrix_synapse_container_labels_internal_client_synapse_admin_api_enabled: "{{ (matrix_bot_draupnir_enabled and matrix_bot_draupnir_admin_api_enabled) }}"
  3865. matrix_synapse_container_labels_internal_client_synapse_admin_api_traefik_entrypoints: "{{ matrix_playbook_internal_matrix_client_api_traefik_entrypoint_name }}"
  3866. matrix_synapse_container_labels_public_federation_api_traefik_hostname: "{{ matrix_server_fqn_matrix_federation }}"
  3867. matrix_synapse_container_labels_public_federation_api_traefik_entrypoints: "{{ matrix_federation_traefik_entrypoint_name }}"
  3868. matrix_synapse_container_labels_public_federation_api_traefik_tls: "{{ matrix_federation_traefik_entrypoint_tls }}"
  3869. matrix_synapse_container_labels_public_federation_api_traefik_tls_certResolver: "{{ matrix_synapse_container_labels_traefik_tls_certResolver }}" # noqa var-naming
  3870. matrix_synapse_container_labels_public_metrics_middleware_basic_auth_enabled: "{{ matrix_metrics_exposure_http_basic_auth_enabled }}"
  3871. matrix_synapse_container_labels_public_metrics_middleware_basic_auth_users: "{{ matrix_metrics_exposure_http_basic_auth_users }}"
  3872. matrix_synapse_container_labels_internal_client_api_enabled: "{{ matrix_playbook_internal_matrix_client_api_traefik_entrypoint_enabled }}"
  3873. matrix_synapse_container_labels_internal_client_api_traefik_entrypoints: "{{ matrix_playbook_internal_matrix_client_api_traefik_entrypoint_name }}"
  3874. # For exposing the Synapse worker (and metrics) ports to the local host.
  3875. 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 '' }}"
  3876. matrix_synapse_database_host: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  3877. matrix_synapse_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'synapse.db', rounds=655555) | to_uuid }}"
  3878. matrix_synapse_macaroon_secret_key: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'synapse.mac', rounds=655555) | to_uuid }}"
  3879. # We do not enable TLS in Synapse by default, since it's handled by Traefik.
  3880. matrix_synapse_tls_federation_listener_enabled: false
  3881. matrix_synapse_tls_certificate_path: ~
  3882. matrix_synapse_tls_private_key_path: ~
  3883. matrix_synapse_federation_port_openid_resource_required: "{{ not matrix_synapse_federation_enabled and (matrix_dimension_enabled or matrix_ma1sd_enabled or matrix_user_verification_service_enabled or matrix_livekit_jwt_service_enabled) }}"
  3884. matrix_synapse_metrics_enabled: "{{ prometheus_enabled or matrix_metrics_exposure_enabled }}"
  3885. matrix_synapse_metrics_proxying_enabled: "{{ matrix_synapse_metrics_enabled and matrix_metrics_exposure_enabled }}"
  3886. matrix_synapse_metrics_proxying_hostname: "{{ matrix_metrics_exposure_hostname }}"
  3887. matrix_synapse_metrics_proxying_path_prefix: "{{ matrix_metrics_exposure_path_prefix }}/synapse"
  3888. matrix_synapse_email_enabled: "{{ exim_relay_enabled }}"
  3889. matrix_synapse_email_smtp_host: "{{ exim_relay_identifier }}"
  3890. matrix_synapse_email_smtp_port: 8025
  3891. matrix_synapse_email_smtp_require_transport_security: false
  3892. matrix_synapse_email_notif_from: "Matrix <{{ exim_relay_sender_address }}>"
  3893. matrix_synapse_turn_uris: "{{ matrix_coturn_turn_uris if matrix_coturn_enabled else [] }}"
  3894. matrix_synapse_turn_shared_secret: "{{ matrix_coturn_turn_static_auth_secret if (matrix_coturn_enabled and matrix_coturn_authentication_method == 'auth-secret') else '' }}"
  3895. matrix_synapse_turn_username: "{{ matrix_coturn_lt_cred_mech_username if (matrix_coturn_enabled and matrix_coturn_authentication_method == 'lt-cred-mech') else '' }}"
  3896. matrix_synapse_turn_password: "{{ matrix_coturn_lt_cred_mech_password if (matrix_coturn_enabled and matrix_coturn_authentication_method == 'lt-cred-mech') else '' }}"
  3897. matrix_synapse_self_check_validate_certificates: "{{ matrix_playbook_ssl_enabled }}"
  3898. matrix_synapse_systemd_required_services_list_auto: |
  3899. {{
  3900. ([postgres_identifier ~ '.service'] if (postgres_enabled and postgres_container_network != matrix_synapse_container_network and matrix_synapse_database_host == postgres_connection_hostname) else [])
  3901. +
  3902. ([valkey_identifier ~ '.service'] if matrix_synapse_redis_enabled and matrix_synapse_redis_host == valkey_identifier else [])
  3903. +
  3904. (['matrix-goofys.service'] if matrix_s3_media_store_enabled else [])
  3905. +
  3906. (['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 [])
  3907. }}
  3908. matrix_synapse_systemd_wanted_services_list_auto: |
  3909. {{
  3910. (['matrix-coturn.service'] if matrix_coturn_enabled else [])
  3911. +
  3912. ([exim_relay_identifier ~ '.service'] if exim_relay_enabled else [])
  3913. }}
  3914. # Synapse workers (used for parallel load-scaling) need Redis for IPC.
  3915. matrix_synapse_redis_enabled: "{{ valkey_enabled }}"
  3916. matrix_synapse_redis_host: "{{ valkey_identifier if valkey_enabled else '' }}"
  3917. matrix_synapse_redis_password: "{{ valkey_connection_password if valkey_enabled else '' }}"
  3918. matrix_synapse_container_extra_arguments_auto: "{{ matrix_homeserver_container_extra_arguments_auto }}"
  3919. matrix_synapse_app_service_config_files_auto: "{{ matrix_homeserver_app_service_config_files_auto }}"
  3920. # Disable creation of media repository Synapse worker when using media-repo
  3921. matrix_synapse_ext_media_repo_enabled: "{{ matrix_media_repo_enabled }}"
  3922. matrix_synapse_ext_synapse_http_antispam_enabled: "{{ matrix_bot_draupnir_config_web_synapseHTTPAntispam_enabled }}"
  3923. 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 '' }}"
  3924. matrix_synapse_ext_synapse_http_antispam_config_authorization: "{{ matrix_bot_draupnir_config_web_synapseHTTPAntispam_authorization if matrix_bot_draupnir_config_web_synapseHTTPAntispam_enabled else '' }}"
  3925. 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 [] }}"
  3926. 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 {} }}"
  3927. 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 {} }}"
  3928. # Enable Synapse statistics reporting when using synapse-usage-exporter
  3929. matrix_synapse_report_stats: "{{ matrix_synapse_usage_exporter_enabled }}"
  3930. 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 '') }}"
  3931. matrix_synapse_experimental_features_msc3266_enabled: "{{ matrix_rtc_enabled }}"
  3932. matrix_synapse_matrix_authentication_service_enabled: "{{ matrix_authentication_service_enabled }}"
  3933. matrix_synapse_matrix_authentication_service_endpoint: "{{ matrix_authentication_service_http_base_container_url if matrix_authentication_service_enabled else '' }}"
  3934. matrix_synapse_matrix_authentication_service_secret: "{{ matrix_authentication_service_config_matrix_secret if matrix_authentication_service_enabled else '' }}"
  3935. matrix_synapse_experimental_features_msc4108_enabled: "{{ matrix_authentication_service_enabled and not matrix_authentication_service_migration_in_progress }}"
  3936. matrix_synapse_experimental_features_msc4140_enabled: "{{ matrix_rtc_enabled }}"
  3937. matrix_synapse_experimental_features_msc4222_enabled: "{{ matrix_rtc_enabled }}"
  3938. # Disable password authentication when delegating authentication to Matrix Authentication Service.
  3939. # Unless this is done, Synapse fails on startup with:
  3940. # > Error in configuration at 'password_config.enabled':
  3941. # > Password auth cannot be enabled when OAuth delegation is enabled
  3942. matrix_synapse_password_config_enabled: "{{ not matrix_synapse_matrix_authentication_service_enabled }}"
  3943. matrix_synapse_register_user_script_matrix_authentication_service_path: "{{ matrix_authentication_service_bin_path }}/register-user"
  3944. ######################################################################
  3945. #
  3946. # /matrix-synapse
  3947. #
  3948. ######################################################################
  3949. ######################################################################
  3950. #
  3951. # matrix-synapse-auto-compressor
  3952. #
  3953. ######################################################################
  3954. # Not enabled by default, for now
  3955. matrix_synapse_auto_compressor_enabled: false
  3956. matrix_synapse_auto_compressor_uid: "{{ matrix_user_uid }}"
  3957. matrix_synapse_auto_compressor_gid: "{{ matrix_user_gid }}"
  3958. matrix_synapse_auto_compressor_postgres_image: "{{ postgres_container_image_to_use }}"
  3959. 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 }}"
  3960. matrix_synapse_auto_compressor_container_image_self_build: "{{ matrix_architecture not in ['arm64', 'amd64'] }}"
  3961. matrix_synapse_auto_compressor_container_network: "{{ (postgres_container_network if (postgres_enabled and matrix_synapse_auto_compressor_database_hostname == matrix_synapse_database_host and matrix_synapse_database_host == postgres_connection_hostname) else 'matrix-synapse-auto-compressor') }}"
  3962. matrix_synapse_auto_compressor_database_username: "{{ matrix_synapse_database_user if matrix_synapse_enabled else '' }}"
  3963. matrix_synapse_auto_compressor_database_password: "{{ matrix_synapse_database_password if matrix_synapse_enabled else '' }}"
  3964. matrix_synapse_auto_compressor_database_hostname: "{{ matrix_synapse_database_host if matrix_synapse_enabled else '' }}"
  3965. matrix_synapse_auto_compressor_database_port: "{{ matrix_synapse_database_port if matrix_synapse_enabled else '5432' }}"
  3966. matrix_synapse_auto_compressor_database_name: "{{ matrix_synapse_database_database if matrix_synapse_enabled else '' }}"
  3967. matrix_synapse_auto_compressor_systemd_required_services_list_auto: |
  3968. {{
  3969. ([postgres_identifier ~ '.service'] if (matrix_synapse_auto_compressor_container_network == postgres_container_network) else [])
  3970. }}
  3971. ######################################################################
  3972. #
  3973. # /matrix-synapse-auto-compressor
  3974. #
  3975. ######################################################################
  3976. ######################################################################
  3977. #
  3978. # matrix-synapse-reverse-proxy-companion
  3979. #
  3980. ######################################################################
  3981. matrix_synapse_reverse_proxy_companion_enabled: "{{ matrix_synapse_enabled and matrix_synapse_workers_enabled }}"
  3982. 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 }}"
  3983. matrix_synapse_reverse_proxy_companion_container_network: "{{ matrix_synapse_container_network }}"
  3984. matrix_synapse_reverse_proxy_companion_container_additional_networks_auto: |
  3985. {{
  3986. (
  3987. ([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 [])
  3988. +
  3989. ([matrix_prometheus_nginxlog_exporter_container_network] if (matrix_prometheus_nginxlog_exporter_enabled and matrix_prometheus_nginxlog_exporter_container_network != matrix_synapse_reverse_proxy_companion_container_network) else [])
  3990. +
  3991. ([] if matrix_homeserver_container_network in ['', matrix_synapse_reverse_proxy_companion_container_network] else [matrix_homeserver_container_network])
  3992. ) | unique
  3993. }}
  3994. matrix_synapse_reverse_proxy_companion_client_api_client_max_body_size_mb: "{{ matrix_synapse_max_upload_size_mb }}"
  3995. 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 '' }}"
  3996. 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 '' }}"
  3997. matrix_synapse_reverse_proxy_companion_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  3998. matrix_synapse_reverse_proxy_companion_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  3999. matrix_synapse_reverse_proxy_companion_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  4000. matrix_synapse_reverse_proxy_companion_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  4001. matrix_synapse_reverse_proxy_companion_container_labels_traefik_hostname: "{{ matrix_server_fqn_matrix }}"
  4002. matrix_synapse_reverse_proxy_companion_container_labels_traefik_compression_middleware_enabled: "{{ matrix_playbook_reverse_proxy_traefik_middleware_compression_enabled }}"
  4003. 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 '' }}"
  4004. matrix_synapse_reverse_proxy_companion_container_labels_public_client_synapse_client_api_enabled: "{{ matrix_synapse_container_labels_public_client_synapse_client_api_enabled }}"
  4005. matrix_synapse_reverse_proxy_companion_container_labels_public_client_synapse_admin_api_enabled: "{{ matrix_synapse_container_labels_public_client_synapse_admin_api_enabled }}"
  4006. matrix_synapse_reverse_proxy_companion_container_labels_internal_client_synapse_admin_api_enabled: "{{ matrix_synapse_container_labels_internal_client_synapse_admin_api_enabled }}"
  4007. matrix_synapse_reverse_proxy_companion_container_labels_internal_client_synapse_admin_api_traefik_entrypoints: "{{ matrix_playbook_internal_matrix_client_api_traefik_entrypoint_name }}"
  4008. matrix_synapse_reverse_proxy_companion_container_labels_public_federation_api_traefik_entrypoints: "{{ matrix_synapse_container_labels_public_federation_api_traefik_entrypoints }}"
  4009. matrix_synapse_reverse_proxy_companion_container_labels_public_federation_api_traefik_tls: "{{ matrix_synapse_container_labels_public_federation_api_traefik_tls }}"
  4010. matrix_synapse_reverse_proxy_companion_container_labels_internal_client_api_enabled: "{{ matrix_synapse_container_labels_internal_client_api_enabled }}"
  4011. matrix_synapse_reverse_proxy_companion_container_labels_internal_client_api_traefik_entrypoints: "{{ matrix_synapse_container_labels_internal_client_api_traefik_entrypoints }}"
  4012. matrix_synapse_reverse_proxy_companion_synapse_workers_enabled: "{{ matrix_synapse_workers_enabled }}"
  4013. matrix_synapse_reverse_proxy_companion_synapse_workers_list: "{{ matrix_synapse_workers_enabled_list }}"
  4014. matrix_synapse_reverse_proxy_companion_synapse_room_worker_client_server_locations: "{{ matrix_synapse_workers_room_worker_client_server_endpoints }}"
  4015. matrix_synapse_reverse_proxy_companion_synapse_room_worker_federation_locations: "{{ matrix_synapse_workers_room_worker_federation_endpoints }}"
  4016. matrix_synapse_reverse_proxy_companion_synapse_sync_worker_client_server_locations: "{{ matrix_synapse_workers_sync_worker_client_server_endpoints }}"
  4017. matrix_synapse_reverse_proxy_companion_synapse_client_reader_client_server_locations: "{{ matrix_synapse_workers_client_reader_client_server_endpoints }}"
  4018. matrix_synapse_reverse_proxy_companion_synapse_federation_reader_federation_locations: "{{ matrix_synapse_workers_federation_reader_federation_endpoints }}"
  4019. matrix_synapse_reverse_proxy_companion_synapse_generic_worker_client_server_locations: "{{ matrix_synapse_workers_generic_worker_client_server_endpoints }}"
  4020. matrix_synapse_reverse_proxy_companion_synapse_generic_worker_federation_locations: "{{ matrix_synapse_workers_generic_worker_federation_endpoints }}"
  4021. matrix_synapse_reverse_proxy_companion_synapse_stream_writer_typing_stream_worker_client_server_locations: "{{ matrix_synapse_workers_stream_writer_typing_stream_worker_client_server_endpoints }}"
  4022. matrix_synapse_reverse_proxy_companion_synapse_stream_writer_to_device_stream_worker_client_server_locations: "{{ matrix_synapse_workers_stream_writer_to_device_stream_worker_client_server_endpoints }}"
  4023. matrix_synapse_reverse_proxy_companion_synapse_stream_writer_account_data_stream_worker_client_server_locations: "{{ matrix_synapse_workers_stream_writer_account_data_stream_worker_client_server_endpoints }}"
  4024. matrix_synapse_reverse_proxy_companion_synapse_stream_writer_receipts_stream_worker_client_server_locations: "{{ matrix_synapse_workers_stream_writer_receipts_stream_worker_client_server_endpoints }}"
  4025. matrix_synapse_reverse_proxy_companion_synapse_stream_writer_presence_stream_worker_client_server_locations: "{{ matrix_synapse_workers_stream_writer_presence_stream_worker_client_server_endpoints }}"
  4026. matrix_synapse_reverse_proxy_companion_synapse_media_repository_locations: "{{matrix_synapse_workers_media_repository_endpoints|default([]) }}"
  4027. matrix_synapse_reverse_proxy_companion_synapse_user_dir_locations: "{{ matrix_synapse_workers_user_dir_worker_client_server_endpoints|default([]) }}"
  4028. matrix_synapse_reverse_proxy_companion_access_log_syslog_integration_enabled: "{{ matrix_prometheus_nginxlog_exporter_enabled }}"
  4029. matrix_synapse_reverse_proxy_companion_access_log_syslog_integration_server_port: "{{ (matrix_prometheus_nginxlog_exporter_identifier | string +':'+ matrix_prometheus_nginxlog_exporter_container_syslog_port | string) | default('') }}"
  4030. ######################################################################
  4031. #
  4032. # /matrix-synapse-reverse-proxy-companion
  4033. #
  4034. ######################################################################
  4035. ######################################################################
  4036. #
  4037. # matrix-synapse-admin
  4038. #
  4039. ######################################################################
  4040. matrix_synapse_admin_enabled: false
  4041. matrix_synapse_admin_docker_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_synapse_admin_docker_image_registry_prefix_upstream_default }}"
  4042. matrix_synapse_admin_container_http_host_bind_port: "{{ (matrix_playbook_service_host_bind_interface_prefix ~ '8766') if matrix_playbook_service_host_bind_interface_prefix else '' }}"
  4043. matrix_synapse_admin_container_image_self_build: "{{ matrix_architecture not in ['arm64', 'amd64'] }}"
  4044. matrix_synapse_admin_container_network: "{{ matrix_addons_container_network }}"
  4045. matrix_synapse_admin_container_additional_networks: "{{ [matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network else [] }}"
  4046. matrix_synapse_admin_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  4047. matrix_synapse_admin_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  4048. matrix_synapse_admin_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  4049. matrix_synapse_admin_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  4050. matrix_synapse_admin_config_externalAuthProvider: "{{ matrix_authentication_service_enabled | default(false) or matrix_synapse_ext_password_provider_ldap_enabled | default(false) }}"
  4051. matrix_synapse_admin_config_asManagedUsers_auto: |
  4052. {{
  4053. ([
  4054. '^@'+(matrix_alertmanager_receiver_config_matrix_user_id_localpart | default('') | regex_escape) +':'+(matrix_domain | regex_escape)+'$',
  4055. ] if matrix_alertmanager_receiver_enabled else [])
  4056. +
  4057. ([
  4058. '^@'+(matrix_appservice_draupnir_for_all_user_prefix | default('') | regex_escape) +'_[a-zA-Z0-9]+:'+(matrix_domain | regex_escape)+'$',
  4059. ] if matrix_appservice_draupnir_for_all_enabled else [])
  4060. +
  4061. ([
  4062. '^@'+(matrix_bot_baibot_config_user_mxid_localpart | default('') | regex_escape) +':'+(matrix_domain | regex_escape)+'$',
  4063. ] if matrix_bot_baibot_enabled else [])
  4064. +
  4065. ([
  4066. '^@'+(matrix_bot_buscarron_login | default('') | regex_escape) +':'+(matrix_domain | regex_escape)+'$',
  4067. ] if matrix_bot_buscarron_enabled else [])
  4068. +
  4069. ([
  4070. '^@'+(matrix_bot_draupnir_login | default('') | regex_escape) +':'+(matrix_domain | regex_escape)+'$',
  4071. ] if matrix_bot_draupnir_enabled else [])
  4072. +
  4073. ([
  4074. '^@'+(matrix_bot_chatgpt_matrix_bot_username_localpart | default('') | regex_escape) +':'+(matrix_domain | regex_escape)+'$',
  4075. ] if matrix_bot_chatgpt_enabled else [])
  4076. +
  4077. ([
  4078. '^@'+(matrix_bot_honoroit_login | default('') | regex_escape) +':'+(matrix_domain | regex_escape)+'$',
  4079. ] if matrix_bot_honoroit_enabled else [])
  4080. +
  4081. ([
  4082. '^@'+(matrix_bot_matrix_registration_bot_matrix_user_id_localpart | default('') | regex_escape) +':'+(matrix_domain | regex_escape)+'$',
  4083. ] if matrix_bot_matrix_registration_bot_enabled else [])
  4084. +
  4085. ([
  4086. '^@'+(matrix_bot_matrix_reminder_bot_matrix_user_id_localpart | default('') | regex_escape) +':'+(matrix_domain | regex_escape)+'$',
  4087. ] if matrix_bot_matrix_reminder_bot_enabled else [])
  4088. +
  4089. ([
  4090. '^@'+(matrix_bot_maubot_login | default('') | regex_escape) +':'+(matrix_domain | regex_escape)+'$',
  4091. ] if matrix_bot_maubot_enabled else [])
  4092. +
  4093. ([
  4094. '^@'+(matrix_postmoogle_login | default('') | regex_escape) +':'+(matrix_domain | regex_escape)+'$',
  4095. ] if matrix_postmoogle_enabled else [])
  4096. +
  4097. ([
  4098. '^@_discord_[a-zA-Z0-9]+:'+(matrix_domain | regex_escape)+'$',
  4099. ] if matrix_appservice_discord_enabled else [])
  4100. +
  4101. ([
  4102. '^@'+(matrix_appservice_slack_bot_name | default('') | regex_escape)+':'+(matrix_domain | regex_escape)+'$',
  4103. '^@'+(matrix_appservice_slack_user_prefix | default('') | regex_escape)+'[a-zA-Z0-9]+:'+(matrix_domain | regex_escape)+'$',
  4104. ] if matrix_appservice_slack_enabled else [])
  4105. +
  4106. ([
  4107. '^@'+(matrix_appservice_webhooks_bot_name | default('') | regex_escape)+':'+(matrix_domain | regex_escape)+'$',
  4108. '^@'+(matrix_appservice_webhooks_user_prefix | default('') | regex_escape)+'[a-zA-Z0-9]+:'+(matrix_domain | regex_escape)+'$',
  4109. ] if matrix_appservice_webhooks_enabled else [])
  4110. +
  4111. ([
  4112. '^@'+(matrix_beeper_linkedin_appservice_bot_username | default('') | regex_escape)+':'+(matrix_domain | regex_escape)+'$',
  4113. '^@linkedin_[a-zA-Z0-9]+:'+(matrix_domain | regex_escape)+'$',
  4114. ] if matrix_beeper_linkedin_enabled else [])
  4115. +
  4116. ([
  4117. '^@'+(matrix_go_skype_bridge_appservice_bot_username | default('') | regex_escape)+':'+(matrix_domain | regex_escape)+'$',
  4118. '^@skype_[a-zA-Z0-9]+:'+(matrix_domain | regex_escape)+'$',
  4119. ] if matrix_go_skype_bridge_enabled else [])
  4120. +
  4121. ([
  4122. '^@heisenbridge:'+(matrix_domain | regex_escape)+'$',
  4123. '^@hbirc_[a-zA-Z0-9]+:'+(matrix_domain | regex_escape)+'$',
  4124. ] if matrix_heisenbridge_enabled else [])
  4125. +
  4126. ([
  4127. '^@hookshot:'+(matrix_domain | regex_escape)+'$',
  4128. '^@_github_[a-zA-Z0-9]+:'+(matrix_domain | regex_escape)+'$',
  4129. '^@_gitlab_[a-zA-Z0-9]+:'+(matrix_domain | regex_escape)+'$',
  4130. '^@_jira_[a-zA-Z0-9]+:'+(matrix_domain | regex_escape)+'$',
  4131. '^@'+(matrix_hookshot_generic_userIdPrefix | default('') | regex_escape)+'[a-zA-Z0-9]+:'+(matrix_domain | regex_escape)+'$',
  4132. ] if matrix_hookshot_enabled else [])
  4133. +
  4134. ([
  4135. '^@'+(matrix_mautrix_bluesky_appservice_bot_username | default('') | regex_escape)+':'+(matrix_domain | regex_escape)+'$',
  4136. '^@bluesky_[a-zA-Z0-9]+:'+(matrix_domain | regex_escape)+'$',
  4137. ] if matrix_mautrix_bluesky_enabled else [])
  4138. +
  4139. ([
  4140. '^@'+(matrix_mautrix_discord_appservice_bot_username | default('') | regex_escape)+':'+(matrix_domain | regex_escape)+'$',
  4141. '^@discord_[0-9]+:'+(matrix_domain | regex_escape)+'$',
  4142. ] if matrix_mautrix_discord_enabled else [])
  4143. +
  4144. ([
  4145. '^@'+(matrix_mautrix_facebook_appservice_bot_username | default('') | regex_escape)+':'+(matrix_domain | regex_escape)+'$',
  4146. '^@facebook_[a-zA-Z0-9]+:'+(matrix_domain | regex_escape)+'$',
  4147. ] if matrix_mautrix_facebook_enabled else [])
  4148. +
  4149. ([
  4150. '^@'+(matrix_mautrix_gmessages_appservice_bot_username | default('') | regex_escape)+':'+(matrix_domain | regex_escape)+'$',
  4151. '^@gmessages_[a-zA-Z0-9]+:'+(matrix_domain | regex_escape)+'$',
  4152. ] if matrix_mautrix_gmessages_enabled else [])
  4153. +
  4154. ([
  4155. '^@'+(matrix_mautrix_googlechat_appservice_bot_username | default('') | regex_escape)+':'+(matrix_domain | regex_escape)+'$',
  4156. '^@googlechat_[a-zA-Z0-9]+:'+(matrix_domain | regex_escape)+'$',
  4157. ] if matrix_mautrix_googlechat_enabled else [])
  4158. +
  4159. ([
  4160. '^@'+(matrix_mautrix_instagram_appservice_bot_username | default('') | regex_escape)+':'+(matrix_domain | regex_escape)+'$',
  4161. '^@instagram_[a-zA-Z0-9]+:'+(matrix_domain | regex_escape)+'$',
  4162. ] if matrix_mautrix_instagram_enabled else [])
  4163. +
  4164. ([
  4165. '^@'+(matrix_mautrix_meta_instagram_appservice_username | default('') | regex_escape)+':'+(matrix_domain | regex_escape)+'$',
  4166. '^@'+(matrix_mautrix_meta_instagram_bridge_username_prefix | default('') | regex_escape)+'[a-zA-Z0-9]+:'+(matrix_domain | regex_escape)+'$',
  4167. ] if matrix_mautrix_meta_instagram_enabled else [])
  4168. +
  4169. ([
  4170. '^@'+(matrix_mautrix_meta_messenger_appservice_username | default('') | regex_escape)+':'+(matrix_domain | regex_escape)+'$',
  4171. '^@'+(matrix_mautrix_meta_messenger_bridge_username_prefix | default('') | regex_escape)+'[a-zA-Z0-9]+:'+(matrix_domain | regex_escape)+'$',
  4172. ] if matrix_mautrix_meta_messenger_enabled else [])
  4173. +
  4174. ([
  4175. '^@'+(matrix_mautrix_signal_appservice_bot_username | default('') | regex_escape)+':'+(matrix_domain | regex_escape)+'$',
  4176. '^@signal_[a-zA-Z0-9]+:'+(matrix_domain | regex_escape)+'$',
  4177. ] if matrix_mautrix_signal_enabled else [])
  4178. +
  4179. ([
  4180. '^@'+(matrix_mautrix_slack_appservice_bot_username | default('') | regex_escape)+':'+(matrix_domain | regex_escape)+'$',
  4181. '^@slack_[a-zA-Z0-9\-]+:'+(matrix_domain | regex_escape)+'$',
  4182. ] if matrix_mautrix_slack_enabled else [])
  4183. +
  4184. ([
  4185. '^@'+(matrix_mautrix_telegram_appservice_bot_username | default('') | regex_escape)+':'+(matrix_domain | regex_escape)+'$',
  4186. '^@'+(matrix_mautrix_telegram_username_template | regex_escape | replace('{userid}', '.+'))+':'+(matrix_domain | regex_escape)+'$',
  4187. ] if matrix_mautrix_telegram_enabled else [])
  4188. +
  4189. ([
  4190. '^@'+(matrix_mautrix_twitter_appservice_bot_username | default('') | regex_escape)+':'+(matrix_domain | regex_escape)+'$',
  4191. '^@twitter_[a-zA-Z0-9]+:'+(matrix_domain | regex_escape)+'$',
  4192. ] if matrix_mautrix_twitter_enabled else [])
  4193. +
  4194. ([
  4195. '^@'+(matrix_mautrix_whatsapp_appservice_bot_username | default('') | regex_escape)+':'+(matrix_domain | regex_escape)+'$',
  4196. '^@whatsapp_[0-9]+:'+(matrix_domain | regex_escape)+'$',
  4197. ] if matrix_mautrix_whatsapp_enabled else [])
  4198. +
  4199. ([
  4200. '^@'+(matrix_mautrix_imessage_appservice_bot_username | default('') | regex_escape)+':'+(matrix_domain | regex_escape)+'$',
  4201. '^@imessage_[a-zA-Z0-9]+:'+(matrix_domain | regex_escape)+'$',
  4202. ] if matrix_mautrix_wsproxy_enabled else [])
  4203. +
  4204. ([
  4205. '^@_discordpuppet_[a-zA-Z0-9]+:'+(matrix_domain | regex_escape)+'$',
  4206. ] if matrix_mx_puppet_discord_enabled else [])
  4207. +
  4208. ([
  4209. '^@_groupmepuppet_[a-zA-Z0-9]+:'+(matrix_domain | regex_escape)+'$',
  4210. ] if matrix_mx_puppet_groupme_enabled else [])
  4211. +
  4212. ([
  4213. '^@_instagrampuppet_[a-zA-Z0-9]+:'+(matrix_domain | regex_escape)+'$',
  4214. ] if matrix_mx_puppet_instagram_enabled else [])
  4215. +
  4216. ([
  4217. '^@_slackpuppet_[a-zA-Z0-9]+:'+(matrix_domain | regex_escape)+'$',
  4218. ] if matrix_mx_puppet_slack_enabled else [])
  4219. +
  4220. ([
  4221. '^@_steampuppet_[a-zA-Z0-9]+:'+(matrix_domain | regex_escape)+'$',
  4222. ] if matrix_mx_puppet_steam_enabled else [])
  4223. +
  4224. ([
  4225. '^@'+(matrix_mx_puppet_twitter_bot_localpart | default('') | regex_escape)+':'+ (matrix_domain | regex_escape)+'$',
  4226. '^@'+(matrix_mx_puppet_twitter_namespace_prefix | default('') | regex_escape)+'[a-zA-Z0-9]+:'+(matrix_domain | regex_escape)+'$',
  4227. ] if matrix_mx_puppet_twitter_enabled else [])
  4228. +
  4229. ([
  4230. '^@smsbot:'+(matrix_domain | regex_escape)+'$',
  4231. '^@sms_[a-zA-Z0-9]+:'+(matrix_domain | regex_escape)+'$',
  4232. ] if matrix_sms_bridge_enabled else [])
  4233. +
  4234. ([
  4235. '^@'+(matrix_wechat_appservice_bot_username | default('') | regex_escape)+':'+(matrix_domain | regex_escape)+'$',
  4236. '^@_wechat_[a-zA-Z0-9]+:'+(matrix_domain | regex_escape)+'$',
  4237. ] if matrix_wechat_enabled else [])
  4238. +
  4239. ([
  4240. '^@'+(matrix_steam_bridge_appservice_bot_username | default('') | regex_escape)+':'+(matrix_domain | regex_escape)+'$',
  4241. '^@steam_[a-zA-Z0-9]+:'+(matrix_domain | regex_escape)+'$',
  4242. ] if matrix_steam_bridge_enabled else [])
  4243. }}
  4244. ######################################################################
  4245. #
  4246. # /matrix-synapse-admin
  4247. #
  4248. ######################################################################
  4249. ######################################################################
  4250. #
  4251. # matrix-synapse-usage-exporter
  4252. #
  4253. ######################################################################
  4254. matrix_synapse_usage_exporter_enabled: false
  4255. 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 }}"
  4256. matrix_synapse_usage_exporter_container_network: "{{ matrix_monitoring_container_network }}"
  4257. matrix_synapse_usage_exporter_container_additional_networks: "{{ [matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network else [] }}"
  4258. matrix_synapse_usage_exporter_container_labels_traefik_enabled: "{{ matrix_synapse_usage_exporter_proxying_enabled }}"
  4259. matrix_synapse_usage_exporter_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  4260. matrix_synapse_usage_exporter_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  4261. matrix_synapse_usage_exporter_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  4262. ######################################################################
  4263. #
  4264. # /matrix-synapse-usage-exporter
  4265. #
  4266. ######################################################################
  4267. ######################################################################
  4268. #
  4269. # prometheus_node_exporter
  4270. #
  4271. ######################################################################
  4272. prometheus_node_exporter_enabled: false
  4273. prometheus_node_exporter_identifier: matrix-prometheus-node-exporter
  4274. prometheus_node_exporter_base_path: "{{ matrix_base_data_path }}/prometheus-node-exporter"
  4275. prometheus_node_exporter_uid: "{{ matrix_user_uid }}"
  4276. prometheus_node_exporter_gid: "{{ matrix_user_gid }}"
  4277. prometheus_node_exporter_hostname: "{{ matrix_server_fqn_matrix }}"
  4278. 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 }}"
  4279. prometheus_node_exporter_container_network: "{{ matrix_monitoring_container_network }}"
  4280. prometheus_node_exporter_container_additional_networks_auto: "{{ [matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network else [] }}"
  4281. prometheus_node_exporter_container_labels_traefik_enabled: "{{ matrix_metrics_exposure_enabled }}"
  4282. prometheus_node_exporter_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  4283. prometheus_node_exporter_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  4284. prometheus_node_exporter_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  4285. prometheus_node_exporter_container_labels_metrics_middleware_basic_auth_enabled: "{{ matrix_metrics_exposure_http_basic_auth_enabled }}"
  4286. prometheus_node_exporter_container_labels_metrics_middleware_basic_auth_users: "{{ matrix_metrics_exposure_http_basic_auth_users }}"
  4287. ######################################################################
  4288. #
  4289. # /prometheus_node_exporter
  4290. #
  4291. ######################################################################
  4292. ######################################################################
  4293. #
  4294. # prometheus_postgres_exporter
  4295. #
  4296. ######################################################################
  4297. prometheus_postgres_exporter_enabled: false
  4298. prometheus_postgres_exporter_identifier: matrix-prometheus-postgres-exporter
  4299. prometheus_postgres_exporter_base_path: "{{ matrix_base_data_path }}/prometheus-postgres-exporter"
  4300. prometheus_postgres_exporter_uid: "{{ matrix_user_uid }}"
  4301. prometheus_postgres_exporter_gid: "{{ matrix_user_gid }}"
  4302. prometheus_postgres_exporter_hostname: "{{ matrix_server_fqn_matrix }}"
  4303. 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 }}"
  4304. prometheus_postgres_exporter_container_network: "{{ matrix_monitoring_container_network }}"
  4305. prometheus_postgres_exporter_container_additional_networks: |
  4306. {{
  4307. ([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 [])
  4308. +
  4309. ([matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network and prometheus_postgres_exporter_container_labels_traefik_enabled else [])
  4310. }}
  4311. prometheus_postgres_exporter_container_labels_traefik_enabled: "{{ matrix_metrics_exposure_enabled }}"
  4312. prometheus_postgres_exporter_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  4313. prometheus_postgres_exporter_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  4314. prometheus_postgres_exporter_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  4315. prometheus_postgres_exporter_container_labels_metrics_middleware_basic_auth_enabled: "{{ matrix_metrics_exposure_http_basic_auth_enabled }}"
  4316. prometheus_postgres_exporter_container_labels_metrics_middleware_basic_auth_users: "{{ matrix_metrics_exposure_http_basic_auth_users }}"
  4317. prometheus_postgres_exporter_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  4318. prometheus_postgres_exporter_database_username: matrix_prometheus_postgres_exporter
  4319. prometheus_postgres_exporter_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'prometheus.pg.db', rounds=655555) | to_uuid }}"
  4320. prometheus_postgres_exporter_database_name: matrix_prometheus_postgres_exporter
  4321. prometheus_postgres_exporter_systemd_required_services_list_auto: |
  4322. {{
  4323. ([postgres_identifier ~ '.service'] if (postgres_enabled and prometheus_postgres_exporter_database_hostname == postgres_connection_hostname) else [])
  4324. }}
  4325. ######################################################################
  4326. #
  4327. # /prometheus_postgres_exporter
  4328. #
  4329. ######################################################################
  4330. ######################################################################
  4331. #
  4332. # matrix-prometheus-nginxlog-exporter
  4333. #
  4334. ######################################################################
  4335. matrix_prometheus_nginxlog_exporter_enabled: false
  4336. matrix_prometheus_nginxlog_exporter_identifier: matrix-prometheus-nginxlog-exporter
  4337. matrix_prometheus_nginxlog_exporter_hostname: "{{ matrix_server_fqn_matrix }}"
  4338. matrix_prometheus_nginxlog_exporter_docker_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_prometheus_nginxlog_exporter_docker_image_registry_prefix_upstream_default }}"
  4339. matrix_prometheus_nginxlog_exporter_container_network: "{{ matrix_monitoring_container_network }}"
  4340. matrix_prometheus_nginxlog_exporter_container_additional_networks_auto: |-
  4341. {{
  4342. ([matrix_playbook_reverse_proxyable_services_additional_network] if (matrix_playbook_reverse_proxyable_services_additional_network and matrix_prometheus_nginxlog_exporter_container_labels_traefik_enabled) else [])
  4343. }}
  4344. matrix_prometheus_nginxlog_exporter_container_labels_traefik_enabled: "{{ matrix_metrics_exposure_enabled }}"
  4345. matrix_prometheus_nginxlog_exporter_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  4346. matrix_prometheus_nginxlog_exporter_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  4347. matrix_prometheus_nginxlog_exporter_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  4348. matrix_prometheus_nginxlog_exporter_container_labels_metrics_middleware_basic_auth_enabled: "{{ matrix_metrics_exposure_http_basic_auth_enabled }}"
  4349. matrix_prometheus_nginxlog_exporter_container_labels_metrics_middleware_basic_auth_users: "{{ matrix_metrics_exposure_http_basic_auth_users }}"
  4350. matrix_prometheus_nginxlog_exporter_config_namespaces_matrix_source_tags_auto: |
  4351. {{
  4352. ([matrix_synapse_reverse_proxy_companion_access_log_syslog_integration_tag] if matrix_synapse_reverse_proxy_companion_access_log_syslog_integration_enabled else [])
  4353. }}
  4354. ######################################################################
  4355. #
  4356. # /matrix-prometheus-nginxlog-exporter
  4357. #
  4358. ######################################################################
  4359. ######################################################################
  4360. #
  4361. # prometheus
  4362. #
  4363. ######################################################################
  4364. prometheus_enabled: false
  4365. prometheus_identifier: matrix-prometheus
  4366. prometheus_base_path: "{{ matrix_base_data_path }}/prometheus"
  4367. prometheus_uid: "{{ matrix_user_uid }}"
  4368. prometheus_gid: "{{ matrix_user_gid }}"
  4369. 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 }}"
  4370. prometheus_container_network: "{{ matrix_monitoring_container_network }}"
  4371. prometheus_container_additional_networks_auto: |
  4372. {{
  4373. (
  4374. ([prometheus_node_exporter_container_network] if prometheus_self_node_scraper_enabled and prometheus_node_exporter_container_network != prometheus_container_network else [])
  4375. +
  4376. ([matrix_synapse_container_network] if matrix_prometheus_services_connect_scraper_synapse_enabled and matrix_synapse_container_network != prometheus_container_network else [])
  4377. +
  4378. ([prometheus_postgres_exporter_container_network] if matrix_prometheus_services_connect_scraper_postgres_enabled and prometheus_postgres_exporter_container_network != prometheus_container_network else [])
  4379. +
  4380. ([matrix_hookshot_container_network] if matrix_prometheus_services_connect_scraper_hookshot_enabled and matrix_hookshot_container_network != prometheus_container_network else [])
  4381. +
  4382. ([matrix_prometheus_nginxlog_exporter_container_network] if matrix_prometheus_services_connect_scraper_nginxlog_enabled and matrix_prometheus_nginxlog_exporter_container_network != prometheus_container_network else [])
  4383. +
  4384. ([matrix_media_repo_container_network] if matrix_prometheus_services_connect_scraper_media_repo_enabled and matrix_media_repo_container_network != prometheus_container_network else [])
  4385. +
  4386. ([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 [])
  4387. ) | unique
  4388. }}
  4389. prometheus_container_http_host_bind_port: "{{ (matrix_playbook_service_host_bind_interface_prefix ~ '9090') if matrix_playbook_service_host_bind_interface_prefix else '' }}"
  4390. prometheus_config_rule_files_auto: |
  4391. {{
  4392. (['synapse-v2.rules'] if matrix_prometheus_services_connect_synapse_rules_enabled else [])
  4393. }}
  4394. prometheus_self_node_scraper_enabled: "{{ prometheus_node_exporter_enabled }}"
  4395. prometheus_self_node_scraper_static_configs_target: "{{ (prometheus_node_exporter_identifier + ':9100') if prometheus_node_exporter_enabled else '' }}"
  4396. prometheus_config_scrape_configs_auto: |
  4397. {{
  4398. (matrix_prometheus_services_connect_scraper_synapse_configs if matrix_prometheus_services_connect_scraper_synapse_enabled else [])
  4399. +
  4400. (matrix_prometheus_services_connect_scraper_postgres_scrape_configs if matrix_prometheus_services_connect_scraper_postgres_enabled else [])
  4401. +
  4402. (matrix_prometheus_services_connect_scraper_hookshot_scrape_configs if matrix_prometheus_services_connect_scraper_hookshot_enabled else [])
  4403. +
  4404. (matrix_prometheus_services_connect_scraper_nginxlog_scrape_configs if matrix_prometheus_services_connect_scraper_nginxlog_enabled else [])
  4405. +
  4406. (matrix_prometheus_services_connect_scraper_media_repo_scrape_configs if matrix_prometheus_services_connect_scraper_media_repo_enabled else [])
  4407. +
  4408. (matrix_prometheus_services_connect_scraper_synapse_usage_exporter_scrape_configs if matrix_prometheus_services_connect_scraper_synapse_usage_exporter_enabled else [])
  4409. }}
  4410. ######################################################################
  4411. #
  4412. # /prometheus
  4413. #
  4414. ######################################################################
  4415. ######################################################################
  4416. #
  4417. # matrix-prometheus-services-connect
  4418. #
  4419. ######################################################################
  4420. matrix_prometheus_services_connect_synapse_enabled: "{{ prometheus_enabled and matrix_synapse_enabled }}"
  4421. matrix_prometheus_services_connect_synapse_rules_download_synapse_tag: "{{ matrix_synapse_docker_image_tag }}"
  4422. matrix_prometheus_services_connect_synapse_rules_download_dir_path: "{{ prometheus_config_path }}"
  4423. matrix_prometheus_services_connect_synapse_rules_download_owner: "{{ prometheus_uid }}"
  4424. matrix_prometheus_services_connect_synapse_rules_download_group: "{{ prometheus_gid }}"
  4425. matrix_prometheus_services_connect_scraper_synapse_enabled: "{{ matrix_synapse_enabled and matrix_synapse_metrics_enabled }}"
  4426. matrix_prometheus_services_connect_scraper_synapse_main_process_static_configs_target: "matrix-synapse:{{ matrix_synapse_metrics_port }}"
  4427. matrix_prometheus_services_connect_scraper_synapse_workers_enabled_list: "{{ matrix_synapse_workers_enabled_list }}"
  4428. matrix_prometheus_services_connect_scraper_postgres_enabled: "{{ prometheus_postgres_exporter_enabled }}"
  4429. matrix_prometheus_services_connect_scraper_postgres_static_configs_target: "{{ prometheus_postgres_exporter_identifier }}:{{ prometheus_postgres_exporter_port | string }}"
  4430. matrix_prometheus_services_connect_scraper_hookshot_enabled: "{{ matrix_hookshot_enabled and matrix_hookshot_metrics_enabled }}"
  4431. matrix_prometheus_services_connect_scraper_hookshot_static_configs_target: "{{ matrix_hookshot_container_url }}:{{ matrix_hookshot_metrics_port | string }}"
  4432. matrix_prometheus_services_connect_scraper_nginxlog_enabled: "{{ matrix_prometheus_nginxlog_exporter_enabled }}"
  4433. matrix_prometheus_services_connect_scraper_nginxlog_static_configs_target: "{{ matrix_prometheus_nginxlog_exporter_identifier }}:{{ matrix_prometheus_nginxlog_exporter_container_metrics_port | string }}"
  4434. matrix_prometheus_services_connect_scraper_media_repo_enabled: "{{ matrix_media_repo_enabled and matrix_media_repo_metrics_enabled }}"
  4435. matrix_prometheus_services_connect_scraper_media_repo_static_configs_target: "{{ matrix_media_repo_identifier }}:{{ matrix_media_repo_metrics_port }}"
  4436. matrix_prometheus_services_connect_scraper_synapse_usage_exporter_enabled: "{{ matrix_synapse_usage_exporter_enabled }}"
  4437. matrix_prometheus_services_connect_scraper_synapse_usage_exporter_static_configs_target: "{{ matrix_synapse_usage_exporter_identifier }}:{{ matrix_synapse_usage_exporter_container_port | string }}"
  4438. ######################################################################
  4439. #
  4440. # /matrix-prometheus-services-connect
  4441. #
  4442. ######################################################################
  4443. ######################################################################
  4444. #
  4445. # grafana
  4446. #
  4447. ######################################################################
  4448. grafana_enabled: false
  4449. grafana_identifier: matrix-grafana
  4450. grafana_uid: "{{ matrix_user_uid }}"
  4451. grafana_gid: "{{ matrix_user_gid }}"
  4452. grafana_hostname: "{{ matrix_server_fqn_grafana }}"
  4453. grafana_base_path: "{{ matrix_base_data_path }}/grafana"
  4454. 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 }}"
  4455. grafana_container_network: "{{ matrix_monitoring_container_network }}"
  4456. grafana_container_additional_networks_auto: |
  4457. {{
  4458. (
  4459. ([matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network and grafana_container_labels_traefik_enabled else [])
  4460. +
  4461. ([prometheus_container_network] if prometheus_enabled and prometheus_container_network != grafana_container_network else [])
  4462. ) | unique
  4463. }}
  4464. grafana_container_labels_traefik_enabled: "{{ matrix_playbook_traefik_labels_enabled }}"
  4465. grafana_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  4466. grafana_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  4467. grafana_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  4468. grafana_container_http_host_bind_port: "{{ (matrix_playbook_service_host_bind_interface_prefix ~ '3000') if matrix_playbook_service_host_bind_interface_prefix else '' }}"
  4469. grafana_provisioning_datasources_datasources: |
  4470. {{
  4471. ([{
  4472. 'name': (matrix_server_fqn_matrix + ' - Prometheus'),
  4473. 'type': 'prometheus',
  4474. 'access': 'proxy',
  4475. 'url': ('http://' + prometheus_identifier + ':9090'),
  4476. 'jsonData': {
  4477. 'timeInterval': prometheus_config_global_scrape_interval,
  4478. }
  4479. }] if prometheus_enabled else [])
  4480. }}
  4481. grafana_dashboard_download_urls: |
  4482. {{
  4483. (matrix_synapse_grafana_dashboard_urls if matrix_homeserver_implementation == 'synapse' and matrix_synapse_metrics_enabled else [])
  4484. +
  4485. (prometheus_node_exporter_dashboard_urls if prometheus_node_exporter_enabled else [])
  4486. +
  4487. (prometheus_postgres_exporter_dashboard_urls if prometheus_postgres_exporter_enabled else [])
  4488. +
  4489. (matrix_prometheus_nginxlog_exporter_dashboard_urls if matrix_prometheus_nginxlog_exporter_enabled else [])
  4490. +
  4491. (matrix_media_repo_dashboard_urls if matrix_media_repo_metrics_enabled else [])
  4492. +
  4493. (matrix_synapse_usage_exporter_dashboard_urls if matrix_synapse_usage_exporter_enabled else [])
  4494. }}
  4495. grafana_provisioning_dashboard_template_files: |
  4496. {{
  4497. ([{
  4498. 'path': 'roles/custom/matrix-prometheus-nginxlog-exporter/templates/grafana/nginx-proxy.json',
  4499. 'name': 'nginx-proxy.json',
  4500. }] if matrix_prometheus_nginxlog_exporter_enabled else [])
  4501. }}
  4502. grafana_default_home_dashboard_path: |-
  4503. {{
  4504. {
  4505. '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 '')),
  4506. 'dendrite': ('/etc/grafana/dashboards/node-exporter-full.json' if prometheus_node_exporter_enabled else ''),
  4507. 'conduit': ('/etc/grafana/dashboards/node-exporter-full.json' if prometheus_node_exporter_enabled else ''),
  4508. 'conduwuit': ('/etc/grafana/dashboards/node-exporter-full.json' if prometheus_node_exporter_enabled else ''),
  4509. 'continuwuity': ('/etc/grafana/dashboards/node-exporter-full.json' if prometheus_node_exporter_enabled else ''),
  4510. }[matrix_homeserver_implementation]
  4511. }}
  4512. ######################################################################
  4513. #
  4514. # /grafana
  4515. #
  4516. ######################################################################
  4517. ######################################################################
  4518. #
  4519. # matrix-registration
  4520. #
  4521. ######################################################################
  4522. matrix_registration_enabled: false
  4523. matrix_registration_scheme: "{{ 'https' if matrix_playbook_ssl_enabled else 'http' }}"
  4524. matrix_registration_hostname: "{{ matrix_server_fqn_matrix }}"
  4525. matrix_registration_path_prefix: /matrix-registration
  4526. matrix_registration_systemd_required_services_list_auto: |
  4527. {{
  4528. ([postgres_identifier ~ '.service'] if (postgres_enabled and matrix_registration_database_hostname == postgres_connection_hostname) else [])
  4529. }}
  4530. matrix_registration_docker_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_registration_docker_image_registry_prefix_upstream_default }}"
  4531. matrix_registration_container_image_self_build: "{{ matrix_architecture != 'amd64' }}"
  4532. matrix_registration_container_http_host_bind_port: "{{ (matrix_playbook_service_host_bind_interface_prefix ~ '8767') if matrix_playbook_service_host_bind_interface_prefix else '' }}"
  4533. matrix_registration_container_network: "{{ matrix_addons_container_network }}"
  4534. matrix_registration_container_additional_networks_auto: |-
  4535. {{
  4536. (
  4537. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  4538. +
  4539. ([postgres_container_network] if (postgres_enabled and matrix_registration_database_hostname == postgres_connection_hostname and matrix_mautrix_facebook_container_network != postgres_container_network) else [])
  4540. +
  4541. ([matrix_playbook_reverse_proxyable_services_additional_network] if (matrix_playbook_reverse_proxyable_services_additional_network and matrix_registration_container_labels_traefik_enabled) else [])
  4542. ) | unique
  4543. }}
  4544. matrix_registration_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  4545. matrix_registration_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  4546. matrix_registration_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  4547. matrix_registration_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  4548. matrix_registration_riot_instance: "{{ (('https://' if matrix_playbook_ssl_enabled else 'http://') + matrix_server_fqn_element) if matrix_client_element_enabled else 'https://element.io/app/' }}"
  4549. matrix_registration_shared_secret: |-
  4550. {{
  4551. {
  4552. 'synapse': matrix_synapse_registration_shared_secret | default (''),
  4553. 'dendrite': matrix_dendrite_client_api_registration_shared_secret | default (''),
  4554. 'conduit': '',
  4555. 'conduwuit': '',
  4556. 'continuwuity': '',
  4557. }[matrix_homeserver_implementation]
  4558. }}
  4559. matrix_registration_server_location: "{{ matrix_addons_homeserver_client_api_url }}"
  4560. matrix_registration_api_validate_certs: "{{ matrix_playbook_ssl_enabled }}"
  4561. # Postgres is the default, except if not using internal Postgres server
  4562. matrix_registration_database_engine: "{{ 'postgres' if postgres_enabled else 'sqlite' }}"
  4563. matrix_registration_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  4564. matrix_registration_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mx.registr.db', rounds=655555) | to_uuid }}"
  4565. ######################################################################
  4566. #
  4567. # /matrix-registration
  4568. #
  4569. ######################################################################
  4570. ######################################################################
  4571. #
  4572. # matrix-sliding-sync
  4573. #
  4574. ######################################################################
  4575. # We don't enable the sliding sync proxy by default.
  4576. matrix_sliding_sync_enabled: false
  4577. matrix_sliding_sync_scheme: "{{ 'https' if matrix_playbook_ssl_enabled else 'http' }}"
  4578. matrix_sliding_sync_hostname: "{{ matrix_server_fqn_matrix }}"
  4579. matrix_sliding_sync_path_prefix: /sliding-sync
  4580. matrix_sliding_sync_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_sliding_sync_container_image_registry_prefix_upstream_default }}"
  4581. matrix_sliding_sync_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm64'] }}"
  4582. matrix_sliding_sync_container_network: "{{ matrix_homeserver_container_network }}"
  4583. matrix_sliding_sync_container_additional_networks: |
  4584. {{
  4585. (
  4586. ([matrix_playbook_reverse_proxyable_services_additional_network] if matrix_sliding_sync_container_labels_traefik_enabled and matrix_playbook_reverse_proxyable_services_additional_network else [])
  4587. +
  4588. ([] if matrix_homeserver_container_network in ['', matrix_sliding_sync_container_network] else [matrix_homeserver_container_network])
  4589. +
  4590. ([postgres_container_network] if postgres_enabled and postgres_container_network != matrix_sliding_sync_container_network else [])
  4591. ) | unique
  4592. }}
  4593. matrix_sliding_sync_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  4594. matrix_sliding_sync_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  4595. matrix_sliding_sync_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  4596. matrix_sliding_sync_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  4597. matrix_sliding_sync_container_labels_public_metrics_middleware_basic_auth_enabled: "{{ matrix_metrics_exposure_http_basic_auth_enabled }}"
  4598. matrix_sliding_sync_container_labels_public_metrics_middleware_basic_auth_users: "{{ matrix_metrics_exposure_http_basic_auth_users }}"
  4599. matrix_sliding_sync_systemd_required_services_list_auto: |
  4600. {{
  4601. matrix_homeserver_systemd_services_list
  4602. +
  4603. ([postgres_identifier ~ '.service'] if (postgres_enabled and matrix_sliding_sync_database_hostname == postgres_connection_hostname) else [])
  4604. }}
  4605. matrix_sliding_sync_environment_variable_syncv3_server: "{{ matrix_homeserver_container_url }}"
  4606. matrix_sliding_sync_environment_variable_syncv3_secret: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'ss.secret', rounds=655555) | to_uuid }}"
  4607. matrix_sliding_sync_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  4608. matrix_sliding_sync_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'ss.db', rounds=655555) | to_uuid }}"
  4609. matrix_sliding_sync_metrics_enabled: "{{ prometheus_enabled or matrix_metrics_exposure_enabled }}"
  4610. matrix_sliding_sync_metrics_proxying_enabled: "{{ matrix_sliding_sync_metrics_enabled and matrix_metrics_exposure_enabled }}"
  4611. matrix_sliding_sync_metrics_proxying_hostname: "{{ matrix_metrics_exposure_hostname }}"
  4612. matrix_sliding_sync_metrics_proxying_path_prefix: "{{ matrix_metrics_exposure_path_prefix }}/sliding-sync"
  4613. #####################################################################
  4614. #
  4615. # /matrix-sliding-sync
  4616. #
  4617. ######################################################################
  4618. ######################################################################
  4619. #
  4620. # matrix-dendrite
  4621. #
  4622. ######################################################################
  4623. matrix_dendrite_enabled: "{{ matrix_homeserver_implementation == 'dendrite' }}"
  4624. matrix_dendrite_hostname: "{{ matrix_server_fqn_matrix }}"
  4625. matrix_dendrite_federation_enabled: "{{ matrix_homeserver_federation_enabled }}"
  4626. matrix_dendrite_docker_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_dendrite_docker_image_registry_prefix_upstream_default }}"
  4627. matrix_dendrite_container_network: "{{ matrix_homeserver_container_network }}"
  4628. matrix_dendrite_container_additional_networks_auto: |
  4629. {{
  4630. (
  4631. ([matrix_playbook_reverse_proxyable_services_additional_network] if matrix_dendrite_container_labels_traefik_enabled and matrix_playbook_reverse_proxyable_services_additional_network else [])
  4632. +
  4633. ([postgres_container_network] if (postgres_enabled and matrix_dendrite_database_hostname == postgres_connection_hostname and postgres_container_network != matrix_dendrite_container_network) else [])
  4634. ) | unique
  4635. }}
  4636. 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 '' }}"
  4637. 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) }}"
  4638. matrix_dendrite_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] and not matrix_synapse_workers_enabled }}"
  4639. matrix_dendrite_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  4640. matrix_dendrite_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  4641. matrix_dendrite_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  4642. matrix_dendrite_container_labels_public_client_synapse_admin_api_enabled: "{{ matrix_synapse_admin_enabled }}"
  4643. matrix_dendrite_container_labels_public_client_root_redirection_enabled: "{{ matrix_dendrite_container_labels_public_client_root_redirection_url != '' }}"
  4644. 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 '' }}"
  4645. matrix_dendrite_container_labels_public_federation_api_traefik_hostname: "{{ matrix_server_fqn_matrix_federation }}"
  4646. matrix_dendrite_container_labels_public_federation_api_traefik_entrypoints: "{{ matrix_federation_traefik_entrypoint_name }}"
  4647. matrix_dendrite_container_labels_public_federation_api_traefik_tls: "{{ matrix_federation_traefik_entrypoint_tls }}"
  4648. matrix_dendrite_container_labels_public_metrics_middleware_basic_auth_enabled: "{{ matrix_metrics_exposure_http_basic_auth_enabled }}"
  4649. matrix_dendrite_container_labels_public_metrics_middleware_basic_auth_users: "{{ matrix_metrics_exposure_http_basic_auth_users }}"
  4650. matrix_dendrite_metrics_enabled: "{{ prometheus_enabled or matrix_metrics_exposure_enabled }}"
  4651. matrix_dendrite_metrics_proxying_enabled: "{{ matrix_dendrite_metrics_enabled and matrix_metrics_exposure_enabled }}"
  4652. matrix_dendrite_metrics_proxying_hostname: "{{ matrix_metrics_exposure_hostname }}"
  4653. matrix_dendrite_metrics_proxying_path_prefix: "{{ matrix_metrics_exposure_path_prefix }}/dendrite"
  4654. matrix_dendrite_client_api_registration_shared_secret: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'dendrite.rss', rounds=655555) | to_uuid }}"
  4655. matrix_dendrite_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  4656. matrix_dendrite_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'dendrite.db', rounds=655555) | to_uuid }}"
  4657. matrix_dendrite_client_api_turn_uris: "{{ matrix_coturn_turn_uris if matrix_coturn_enabled else [] }}"
  4658. matrix_dendrite_client_api_turn_shared_secret: "{{ matrix_coturn_turn_static_auth_secret if (matrix_coturn_enabled and matrix_coturn_authentication_method == 'auth-secret') else '' }}"
  4659. matrix_dendrite_client_api_turn_username: "{{ matrix_coturn_lt_cred_mech_username if (matrix_coturn_enabled and matrix_coturn_authentication_method == 'lt-cred-mech') else '' }}"
  4660. matrix_dendrite_client_api_turn_password: "{{ matrix_coturn_lt_cred_mech_password if (matrix_coturn_enabled and matrix_coturn_authentication_method == 'lt-cred-mech') else '' }}"
  4661. matrix_dendrite_disable_tls_validation: "{{ not matrix_playbook_ssl_enabled }}"
  4662. matrix_dendrite_self_check_validate_certificates: "{{ matrix_playbook_ssl_enabled }}"
  4663. matrix_dendrite_trusted_id_servers: "{{ [matrix_server_fqn_matrix] if matrix_ma1sd_enabled else ['matrix.org', 'vector.im'] }}"
  4664. matrix_dendrite_systemd_required_services_list_auto: |
  4665. {{
  4666. ([postgres_identifier ~ '.service'] if (postgres_enabled and matrix_dendrite_database_hostname == postgres_connection_hostname) else [])
  4667. +
  4668. (['matrix-goofys.service'] if matrix_s3_media_store_enabled else [])
  4669. }}
  4670. matrix_dendrite_systemd_wanted_services_list_auto: |
  4671. {{
  4672. (['matrix-coturn.service'] if matrix_coturn_enabled else [])
  4673. }}
  4674. matrix_dendrite_container_extra_arguments_auto: "{{ matrix_homeserver_container_extra_arguments_auto }}"
  4675. matrix_dendrite_app_service_config_files_auto: "{{ matrix_homeserver_app_service_config_files_auto }}"
  4676. ######################################################################
  4677. #
  4678. # /matrix-dendrite
  4679. #
  4680. ######################################################################
  4681. ######################################################################
  4682. #
  4683. # matrix-conduit
  4684. #
  4685. ######################################################################
  4686. matrix_conduit_enabled: "{{ matrix_homeserver_implementation == 'conduit' }}"
  4687. matrix_conduit_hostname: "{{ matrix_server_fqn_matrix }}"
  4688. matrix_conduit_allow_federation: "{{ matrix_homeserver_federation_enabled }}"
  4689. matrix_conduit_docker_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_conduit_docker_image_registry_prefix_upstream_default }}"
  4690. matrix_conduit_container_network: "{{ matrix_homeserver_container_network }}"
  4691. matrix_conduit_container_additional_networks_auto: |
  4692. {{
  4693. (
  4694. ([matrix_playbook_reverse_proxyable_services_additional_network] if matrix_conduit_container_labels_traefik_enabled and matrix_playbook_reverse_proxyable_services_additional_network else [])
  4695. ) | unique
  4696. }}
  4697. matrix_conduit_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] and not matrix_synapse_workers_enabled }}"
  4698. matrix_conduit_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  4699. matrix_conduit_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  4700. matrix_conduit_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  4701. matrix_conduit_container_labels_public_client_root_redirection_enabled: "{{ matrix_conduit_container_labels_public_client_root_redirection_url != '' }}"
  4702. 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 '' }}"
  4703. matrix_conduit_container_labels_public_federation_api_traefik_hostname: "{{ matrix_server_fqn_matrix_federation }}"
  4704. matrix_conduit_container_labels_public_federation_api_traefik_entrypoints: "{{ matrix_federation_traefik_entrypoint_name }}"
  4705. matrix_conduit_container_labels_public_federation_api_traefik_tls: "{{ matrix_federation_traefik_entrypoint_tls }}"
  4706. matrix_conduit_container_labels_internal_client_api_enabled: "{{ matrix_playbook_internal_matrix_client_api_traefik_entrypoint_enabled }}"
  4707. matrix_conduit_container_labels_internal_client_api_traefik_entrypoints: "{{ matrix_playbook_internal_matrix_client_api_traefik_entrypoint_name }}"
  4708. matrix_conduit_turn_uris: "{{ matrix_coturn_turn_uris if matrix_coturn_enabled else [] }}"
  4709. matrix_conduit_turn_secret: "{{ matrix_coturn_turn_static_auth_secret if (matrix_coturn_enabled and matrix_coturn_authentication_method == 'auth-secret') else '' }}"
  4710. matrix_conduit_turn_username: "{{ matrix_coturn_lt_cred_mech_username if (matrix_coturn_enabled and matrix_coturn_authentication_method == 'lt-cred-mech') else '' }}"
  4711. matrix_conduit_turn_password: "{{ matrix_coturn_lt_cred_mech_password if (matrix_coturn_enabled and matrix_coturn_authentication_method == 'lt-cred-mech') else '' }}"
  4712. ######################################################################
  4713. #
  4714. # /matrix-conduit
  4715. #
  4716. ######################################################################
  4717. ######################################################################
  4718. #
  4719. # matrix-conduwuit
  4720. #
  4721. ######################################################################
  4722. matrix_conduwuit_enabled: "{{ matrix_homeserver_implementation == 'conduwuit' }}"
  4723. matrix_conduwuit_hostname: "{{ matrix_server_fqn_matrix }}"
  4724. matrix_conduwuit_config_allow_federation: "{{ matrix_homeserver_federation_enabled }}"
  4725. matrix_conduwuit_docker_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_conduwuit_docker_image_registry_prefix_upstream_default }}"
  4726. matrix_conduwuit_container_network: "{{ matrix_homeserver_container_network }}"
  4727. matrix_conduwuit_container_additional_networks_auto: |
  4728. {{
  4729. (
  4730. ([matrix_playbook_reverse_proxyable_services_additional_network] if matrix_conduwuit_container_labels_traefik_enabled and matrix_playbook_reverse_proxyable_services_additional_network else [])
  4731. ) | unique
  4732. }}
  4733. matrix_conduwuit_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] and not matrix_synapse_workers_enabled }}"
  4734. matrix_conduwuit_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  4735. matrix_conduwuit_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  4736. matrix_conduwuit_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  4737. matrix_conduwuit_container_labels_public_client_root_redirection_enabled: "{{ matrix_conduwuit_container_labels_public_client_root_redirection_url != '' }}"
  4738. matrix_conduwuit_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 '' }}"
  4739. matrix_conduwuit_container_labels_public_federation_api_traefik_hostname: "{{ matrix_server_fqn_matrix_federation }}"
  4740. matrix_conduwuit_container_labels_public_federation_api_traefik_entrypoints: "{{ matrix_federation_traefik_entrypoint_name }}"
  4741. matrix_conduwuit_container_labels_public_federation_api_traefik_tls: "{{ matrix_federation_traefik_entrypoint_tls }}"
  4742. matrix_conduwuit_container_labels_internal_client_api_enabled: "{{ matrix_playbook_internal_matrix_client_api_traefik_entrypoint_enabled }}"
  4743. matrix_conduwuit_container_labels_internal_client_api_traefik_entrypoints: "{{ matrix_playbook_internal_matrix_client_api_traefik_entrypoint_name }}"
  4744. matrix_conduwuit_config_turn_uris: "{{ matrix_coturn_turn_uris if matrix_coturn_enabled else [] }}"
  4745. matrix_conduwuit_config_turn_secret: "{{ matrix_coturn_turn_static_auth_secret if (matrix_coturn_enabled and matrix_coturn_authentication_method == 'auth-secret') else '' }}"
  4746. matrix_conduwuit_config_turn_username: "{{ matrix_coturn_lt_cred_mech_username if (matrix_coturn_enabled and matrix_coturn_authentication_method == 'lt-cred-mech') else '' }}"
  4747. matrix_conduwuit_config_turn_password: "{{ matrix_coturn_lt_cred_mech_password if (matrix_coturn_enabled and matrix_coturn_authentication_method == 'lt-cred-mech') else '' }}"
  4748. matrix_conduwuit_self_check_validate_certificates: "{{ matrix_playbook_ssl_enabled }}"
  4749. ######################################################################
  4750. #
  4751. # /matrix-conduwuit
  4752. #
  4753. ######################################################################
  4754. ######################################################################
  4755. #
  4756. # matrix-continuwuity
  4757. #
  4758. ######################################################################
  4759. matrix_continuwuity_enabled: "{{ matrix_homeserver_implementation == 'continuwuity' }}"
  4760. matrix_continuwuity_hostname: "{{ matrix_server_fqn_matrix }}"
  4761. matrix_continuwuity_config_allow_federation: "{{ matrix_homeserver_federation_enabled }}"
  4762. matrix_continuwuity_docker_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_continuwuity_docker_image_registry_prefix_upstream_default }}"
  4763. matrix_continuwuity_container_network: "{{ matrix_homeserver_container_network }}"
  4764. matrix_continuwuity_container_additional_networks_auto: |
  4765. {{
  4766. (
  4767. ([matrix_playbook_reverse_proxyable_services_additional_network] if matrix_continuwuity_container_labels_traefik_enabled and matrix_playbook_reverse_proxyable_services_additional_network else [])
  4768. ) | unique
  4769. }}
  4770. matrix_continuwuity_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] and not matrix_synapse_workers_enabled }}"
  4771. matrix_continuwuity_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  4772. matrix_continuwuity_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  4773. matrix_continuwuity_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  4774. matrix_continuwuity_container_labels_public_client_root_redirection_enabled: "{{ matrix_continuwuity_container_labels_public_client_root_redirection_url != '' }}"
  4775. 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 '' }}"
  4776. matrix_continuwuity_container_labels_public_federation_api_traefik_hostname: "{{ matrix_server_fqn_matrix_federation }}"
  4777. matrix_continuwuity_container_labels_public_federation_api_traefik_entrypoints: "{{ matrix_federation_traefik_entrypoint_name }}"
  4778. matrix_continuwuity_container_labels_public_federation_api_traefik_tls: "{{ matrix_federation_traefik_entrypoint_tls }}"
  4779. matrix_continuwuity_container_labels_internal_client_api_enabled: "{{ matrix_playbook_internal_matrix_client_api_traefik_entrypoint_enabled }}"
  4780. matrix_continuwuity_container_labels_internal_client_api_traefik_entrypoints: "{{ matrix_playbook_internal_matrix_client_api_traefik_entrypoint_name }}"
  4781. matrix_continuwuity_config_turn_uris: "{{ matrix_coturn_turn_uris if matrix_coturn_enabled else [] }}"
  4782. matrix_continuwuity_config_turn_secret: "{{ matrix_coturn_turn_static_auth_secret if (matrix_coturn_enabled and matrix_coturn_authentication_method == 'auth-secret') else '' }}"
  4783. matrix_continuwuity_config_turn_username: "{{ matrix_coturn_lt_cred_mech_username if (matrix_coturn_enabled and matrix_coturn_authentication_method == 'lt-cred-mech') else '' }}"
  4784. matrix_continuwuity_config_turn_password: "{{ matrix_coturn_lt_cred_mech_password if (matrix_coturn_enabled and matrix_coturn_authentication_method == 'lt-cred-mech') else '' }}"
  4785. matrix_continuwuity_self_check_validate_certificates: "{{ matrix_playbook_ssl_enabled }}"
  4786. ######################################################################
  4787. #
  4788. # /matrix-continuwuity
  4789. #
  4790. ######################################################################
  4791. ######################################################################
  4792. #
  4793. # matrix-user-creator
  4794. #
  4795. ######################################################################
  4796. matrix_user_creator_users_auto: |
  4797. {{
  4798. ([{
  4799. 'username': matrix_bot_matrix_registration_bot_matrix_user_id_localpart,
  4800. 'initial_password': matrix_bot_matrix_registration_bot_bot_password,
  4801. 'initial_type': 'admin',
  4802. }] if matrix_bot_matrix_registration_bot_enabled else [])
  4803. +
  4804. ([{
  4805. 'username': matrix_bot_baibot_config_user_mxid_localpart,
  4806. 'initial_password': matrix_bot_baibot_config_user_password,
  4807. 'initial_type': 'bot',
  4808. }] if matrix_bot_baibot_enabled else [])
  4809. +
  4810. ([{
  4811. 'username': matrix_bot_chatgpt_matrix_bot_username_localpart,
  4812. 'initial_password': matrix_bot_chatgpt_matrix_bot_password,
  4813. 'initial_type': 'bot',
  4814. }] if matrix_bot_chatgpt_enabled and matrix_bot_chatgpt_matrix_bot_password | length > 0 else [])
  4815. +
  4816. ([{
  4817. 'username': matrix_bot_matrix_reminder_bot_matrix_user_id_localpart,
  4818. 'initial_password': matrix_bot_matrix_reminder_bot_matrix_user_password,
  4819. 'initial_type': 'bot',
  4820. }] if matrix_bot_matrix_reminder_bot_enabled else [])
  4821. +
  4822. ([{
  4823. 'username': matrix_bot_honoroit_login,
  4824. 'initial_password': matrix_bot_honoroit_password,
  4825. 'initial_type': 'bot',
  4826. }] if matrix_bot_honoroit_enabled else [])
  4827. +
  4828. ([{
  4829. 'username': matrix_postmoogle_login,
  4830. 'initial_password': matrix_postmoogle_password,
  4831. 'initial_type': 'bot',
  4832. }] if matrix_postmoogle_enabled else [])
  4833. +
  4834. ([{
  4835. 'username': matrix_bot_buscarron_login,
  4836. 'initial_password': matrix_bot_buscarron_password,
  4837. 'initial_type': 'bot',
  4838. }] if matrix_bot_buscarron_enabled else [])
  4839. +
  4840. ([{
  4841. 'username': matrix_bot_maubot_login,
  4842. 'initial_password': matrix_bot_maubot_initial_password,
  4843. 'initial_type': 'bot',
  4844. }] if matrix_bot_maubot_enabled else [])
  4845. +
  4846. ([{
  4847. 'username': matrix_bot_draupnir_login,
  4848. 'initial_password': matrix_bot_draupnir_password,
  4849. 'initial_type': ('admin' if matrix_bot_draupnir_admin_api_enabled else 'bot'),
  4850. }] if matrix_bot_draupnir_enabled and matrix_bot_draupnir_password else [])
  4851. }}
  4852. ######################################################################
  4853. #
  4854. # /matrix-user-creator
  4855. #
  4856. ######################################################################
  4857. ######################################################################
  4858. #
  4859. # matrix-user-verification-service
  4860. #
  4861. ######################################################################
  4862. matrix_user_verification_service_enabled: false
  4863. matrix_user_verification_service_systemd_required_services_list: |
  4864. {{
  4865. [devture_systemd_docker_base_docker_service_name]
  4866. +
  4867. (['matrix-' + matrix_homeserver_implementation + '.service'])
  4868. }}
  4869. matrix_user_verification_service_docker_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_user_verification_service_docker_image_registry_prefix_upstream_default }}"
  4870. matrix_user_verification_service_container_network: "{{ matrix_addons_container_network }}"
  4871. matrix_user_verification_service_container_additional_networks: |
  4872. {{
  4873. (
  4874. ([matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network else [])
  4875. +
  4876. ([matrix_homeserver_container_network] if matrix_homeserver_container_network != matrix_user_verification_service_container_network else [])
  4877. ) | unique
  4878. }}
  4879. # If Jitsi is managed by this playbook we can use the docker network — no need to expose a port.
  4880. # If Jitsi is not managed by this playbook, or you otherwise have a need for it, you can expose
  4881. # matrix-user-verfification-services's client-server port to port 3003.
  4882. # By default Matrix-User-Verification-Service binds to port 3000, which collides with grafana, therefore this uses port 3003.
  4883. 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' }}"
  4884. # URL exposed in the docker network
  4885. matrix_user_verification_service_container_url: "http://{{ matrix_user_verification_service_container_name }}:3000"
  4886. matrix_user_verification_service_uvs_homeserver_url: "{{ matrix_addons_homeserver_client_api_url }}"
  4887. # We connect via the container network (private IPs), so we need to disable IP checks
  4888. matrix_user_verification_service_uvs_disable_ip_blacklist: "{{ matrix_synapse_enabled }}"
  4889. matrix_user_verification_service_uvs_auth_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'uvs.auth.token', rounds=655555) | to_uuid }}"
  4890. ######################################################################
  4891. #
  4892. # /matrix-user-verification-service
  4893. #
  4894. ######################################################################
  4895. ########################################################################
  4896. # #
  4897. # matrix-static-files #
  4898. # #
  4899. ########################################################################
  4900. matrix_static_files_enabled: true
  4901. 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 }}"
  4902. matrix_static_files_container_network: "{{ (matrix_static_files_identifier if matrix_playbook_reverse_proxy_type == 'none' else matrix_playbook_reverse_proxy_container_network) }}"
  4903. matrix_static_files_container_labels_traefik_enabled: "{{ matrix_playbook_traefik_labels_enabled }}"
  4904. matrix_static_files_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  4905. matrix_static_files_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  4906. matrix_static_files_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  4907. matrix_static_files_container_labels_well_known_matrix_endpoint_traefik_hostname: "{{ matrix_server_fqn_matrix }}"
  4908. # Base domain serving is not enabled by default (see `matrix_static_files_container_labels_base_domain_enabled`),
  4909. # but we pass the hostname, so that enabling it is easy.
  4910. matrix_static_files_container_labels_base_domain_traefik_hostname: "{{ matrix_domain }}"
  4911. # If we're not serving a static webpage, serve a redirect instead of a 404.
  4912. matrix_static_files_container_labels_base_domain_root_path_redirection_enabled: "{{ not matrix_static_files_file_index_html_enabled }}"
  4913. matrix_static_files_container_labels_base_domain_root_path_redirection_url: "{{ ('https://' if matrix_playbook_ssl_enabled else 'http://') + matrix_server_fqn_matrix }}/${1}"
  4914. matrix_static_files_file_matrix_client_property_io_element_jitsi_preferred_domain: "{{ matrix_server_fqn_jitsi if jitsi_enabled else '' }}"
  4915. matrix_static_files_file_matrix_client_property_org_matrix_msc3575_proxy_url: "{{ matrix_homeserver_sliding_sync_url }}"
  4916. matrix_static_files_file_matrix_client_property_org_matrix_msc2965_authentication_enabled: "{{ matrix_authentication_service_enabled }}"
  4917. matrix_static_files_file_matrix_client_property_org_matrix_msc2965_authentication_issuer: "{{ matrix_authentication_service_config_http_issuer if matrix_authentication_service_enabled else '' }}"
  4918. matrix_static_files_file_matrix_client_property_org_matrix_msc2965_authentication_account: "{{ matrix_authentication_service_account_management_url if matrix_authentication_service_enabled else '' }}"
  4919. matrix_static_files_file_matrix_client_property_m_tile_server_entries_enabled: "{{ matrix_client_element_location_sharing_enabled }}"
  4920. 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"
  4921. # We set this regardless of whether synapse-admin is enabled, because people may wish to use a hosted (externally) synapse-admin installation and still have it auto-configured.
  4922. # See: https://github.com/etkecc/synapse-admin/pull/126
  4923. matrix_static_files_file_matrix_client_property_cc_etke_synapse_admin_auto: "{{ matrix_synapse_admin_configuration if matrix_homeserver_implementation == 'synapse' else {} }}"
  4924. matrix_static_files_file_matrix_client_property_org_matrix_msc4143_rtc_foci_enabled: "{{ matrix_livekit_jwt_service_enabled }}"
  4925. matrix_static_files_file_matrix_client_property_org_matrix_msc4143_rtc_foci_auto: |-
  4926. {{
  4927. (
  4928. [{'type': 'livekit', 'livekit_service_url': matrix_livekit_jwt_service_public_url}] if matrix_livekit_jwt_service_enabled else []
  4929. )
  4930. }}
  4931. matrix_static_files_file_matrix_server_property_m_server: "{{ matrix_server_fqn_matrix_federation }}:{{ matrix_federation_public_port }}"
  4932. matrix_static_files_scheme: "{{ 'https' if matrix_playbook_ssl_enabled else 'http' }}"
  4933. matrix_static_files_self_check_hostname_matrix: "{{ matrix_server_fqn_matrix }}"
  4934. matrix_static_files_self_check_hostname_identity: "{{ matrix_domain }}"
  4935. ########################################################################
  4936. # #
  4937. # /matrix-static-files #
  4938. # #
  4939. ########################################################################
  4940. ########################################################################
  4941. # #
  4942. # container-socket-proxy #
  4943. # #
  4944. ########################################################################
  4945. container_socket_proxy_enabled: "{{ matrix_playbook_reverse_proxy_type == 'playbook-managed-traefik' }}"
  4946. container_socket_proxy_identifier: matrix-container-socket-proxy
  4947. container_socket_proxy_base_path: "{{ matrix_base_data_path }}/container-socket-proxy"
  4948. container_socket_proxy_uid: "{{ matrix_user_uid }}"
  4949. container_socket_proxy_gid: "{{ matrix_user_gid }}"
  4950. # Traefik requires read access to the containers APIs to do its job
  4951. container_socket_proxy_api_containers_enabled: true
  4952. 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 }}"
  4953. ########################################################################
  4954. # #
  4955. # /container-socket-proxy #
  4956. # #
  4957. ########################################################################
  4958. ########################################################################
  4959. # #
  4960. # traefik #
  4961. # #
  4962. ########################################################################
  4963. traefik_enabled: "{{ matrix_playbook_reverse_proxy_type == 'playbook-managed-traefik' }}"
  4964. traefik_identifier: matrix-traefik
  4965. traefik_base_path: "{{ matrix_base_data_path }}/traefik"
  4966. traefik_uid: "{{ matrix_user_uid }}"
  4967. traefik_gid: "{{ matrix_user_gid }}"
  4968. # It's common for setups to deal with large file uploads which may take longer than the default readTimeout (60s).
  4969. # This override (for the `web` entrypoint) also cascades to overriding the `web-secure` entrypoint and the `matrix-federation` entrypoint.
  4970. traefik_config_entrypoint_web_transport_respondingTimeouts_readTimeout: 300s
  4971. traefik_additional_entrypoints_auto: |
  4972. {{
  4973. ([matrix_playbook_public_matrix_federation_api_traefik_entrypoint_definition] if matrix_playbook_public_matrix_federation_api_traefik_entrypoint_enabled else [])
  4974. +
  4975. ([matrix_playbook_internal_matrix_client_api_traefik_entrypoint_definition] if matrix_playbook_internal_matrix_client_api_traefik_entrypoint_enabled else [])
  4976. }}
  4977. traefik_config_providers_docker_endpoint: "{{ container_socket_proxy_endpoint if container_socket_proxy_enabled else 'unix:///var/run/docker.sock' }}"
  4978. 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 }}"
  4979. traefik_container_additional_networks_auto: |
  4980. {{
  4981. ([container_socket_proxy_container_network] if container_socket_proxy_enabled else [])
  4982. }}
  4983. traefik_systemd_required_services_list: |
  4984. {{
  4985. ([devture_systemd_docker_base_docker_service_name])
  4986. +
  4987. ([container_socket_proxy_identifier + '.service'] if container_socket_proxy_enabled else [])
  4988. }}
  4989. ########################################################################
  4990. # #
  4991. # /traefik #
  4992. # #
  4993. ########################################################################
  4994. ########################################################################
  4995. # #
  4996. # traefik_certs_dumper #
  4997. # #
  4998. ########################################################################
  4999. 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' }}"
  5000. traefik_certs_dumper_identifier: matrix-traefik-certs-dumper
  5001. traefik_certs_dumper_base_path: "{{ matrix_base_data_path }}/traefik-certs-dumper"
  5002. traefik_certs_dumper_uid: "{{ matrix_user_uid }}"
  5003. traefik_certs_dumper_gid: "{{ matrix_user_gid }}"
  5004. traefik_certs_dumper_ssl_dir_path: "{{ traefik_ssl_dir_path if traefik_enabled else '' }}"
  5005. 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 }}"
  5006. ########################################################################
  5007. # #
  5008. # /traefik_certs_dumper #
  5009. # #
  5010. ########################################################################
  5011. ########################################################################
  5012. # #
  5013. # matrix-element-call #
  5014. # #
  5015. ########################################################################
  5016. matrix_element_call_enabled: false
  5017. matrix_element_call_scheme: "{{ 'https' if matrix_playbook_ssl_enabled else 'http' }}"
  5018. matrix_element_call_container_network: "{{ matrix_addons_container_network }}"
  5019. 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 }}"
  5020. 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 [] }}"
  5021. matrix_element_call_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  5022. matrix_element_call_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  5023. matrix_element_call_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  5024. matrix_element_call_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  5025. matrix_element_call_config_livekit_livekit_service_url: "{{ matrix_livekit_jwt_service_public_url if matrix_livekit_jwt_service_enabled else '' }}"
  5026. ########################################################################
  5027. # #
  5028. # /matrix-element-call #
  5029. # #
  5030. ########################################################################
  5031. ########################################################################
  5032. # #
  5033. # livekit-server #
  5034. # #
  5035. ########################################################################
  5036. livekit_server_enabled: "{{ matrix_rtc_enabled }}"
  5037. livekit_server_identifier: matrix-livekit-server
  5038. livekit_server_uid: "{{ matrix_user_uid }}"
  5039. livekit_server_gid: "{{ matrix_user_gid }}"
  5040. livekit_server_base_path: "{{ matrix_base_data_path }}/livekit-server"
  5041. livekit_server_hostname: "{{ matrix_server_fqn_matrix }}"
  5042. livekit_server_path_prefix: "/livekit-server"
  5043. livekit_server_container_image_self_build: "{{ matrix_architecture not in ['arm64', 'amd64'] }}"
  5044. 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 }}"
  5045. livekit_server_container_network: "{{ matrix_addons_container_network }}"
  5046. 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 [] }}"
  5047. livekit_server_container_additional_volumes_auto: |
  5048. {{
  5049. (
  5050. [
  5051. {
  5052. 'src': (traefik_certs_dumper_dumped_certificates_dir_path + '/' + livekit_server_config_turn_domain + '/certificate.crt'),
  5053. 'dst': livekit_server_config_turn_cert_file,
  5054. 'options': 'ro',
  5055. },
  5056. {
  5057. 'src': (traefik_certs_dumper_dumped_certificates_dir_path + '/' + livekit_server_config_turn_domain + '/privatekey.key'),
  5058. 'dst': livekit_server_config_turn_key_file,
  5059. 'options': 'ro',
  5060. },
  5061. ] 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 (livekit_server_config_turn_cert_file and livekit_server_config_turn_key_file)) else []
  5062. )
  5063. }}
  5064. livekit_server_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  5065. livekit_server_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  5066. livekit_server_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  5067. livekit_server_container_labels_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. # LiveKit's TURN implementation requires SSL certificates.
  5099. # We only enable it if we can provide them automatically via Traefik + Traefik Certs Dumper.
  5100. livekit_server_config_turn_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] and traefik_certs_dumper_enabled }}"
  5101. livekit_server_config_turn_cert_file: |-
  5102. {{
  5103. {
  5104. 'playbook-managed-traefik': ('/certificate.crt' if traefik_certs_dumper_enabled else ''),
  5105. 'other-traefik-container': ('/certificate.crt' if traefik_certs_dumper_enabled else ''),
  5106. 'none': '',
  5107. }[matrix_playbook_reverse_proxy_type]
  5108. }}
  5109. livekit_server_config_turn_key_file: |-
  5110. {{
  5111. {
  5112. 'playbook-managed-traefik': ('/privatekey.key' if traefik_certs_dumper_enabled else ''),
  5113. 'other-traefik-container': ('/privatekey.key' if traefik_certs_dumper_enabled else ''),
  5114. 'none': '',
  5115. }[matrix_playbook_reverse_proxy_type]
  5116. }}
  5117. livekit_server_systemd_required_services_list_auto: |
  5118. {{
  5119. ([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 else [])
  5120. }}
  5121. ########################################################################
  5122. # #
  5123. # /livekit-server #
  5124. # #
  5125. ########################################################################
  5126. ########################################################################
  5127. # #
  5128. # matrix-livekit-jwt-service #
  5129. # #
  5130. ########################################################################
  5131. matrix_livekit_jwt_service_enabled: "{{ matrix_rtc_enabled and livekit_server_enabled }}"
  5132. matrix_livekit_jwt_service_scheme: "{{ 'https' if matrix_playbook_ssl_enabled else 'http' }}"
  5133. matrix_livekit_jwt_service_hostname: "{{ matrix_server_fqn_matrix }}"
  5134. matrix_livekit_jwt_service_path_prefix: "/livekit-jwt-service"
  5135. matrix_livekit_jwt_service_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm64'] }}"
  5136. 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 }}"
  5137. matrix_livekit_jwt_service_container_network: "{{ matrix_addons_container_network }}"
  5138. matrix_livekit_jwt_service_container_additional_networks_auto: |
  5139. {{
  5140. ([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 [])
  5141. }}
  5142. matrix_livekit_jwt_service_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  5143. matrix_livekit_jwt_service_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  5144. matrix_livekit_jwt_service_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  5145. matrix_livekit_jwt_service_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  5146. matrix_livekit_jwt_service_environment_variable_livekit_url: "{{ livekit_server_websocket_public_url }}"
  5147. matrix_livekit_jwt_service_environment_variable_livekit_key: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'lk.key', rounds=655555) | to_uuid }}"
  5148. matrix_livekit_jwt_service_environment_variable_livekit_secret: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'lk.secret', rounds=655555) | to_uuid }}"
  5149. matrix_livekit_jwt_service_environment_variable_livekit_full_access_homeservers_list: ["{{ matrix_domain }}"]
  5150. ########################################################################
  5151. # #
  5152. # /matrix-livekit-jwt-service #
  5153. # #
  5154. ########################################################################