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

6674 line
377 KiB

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