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

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