Matrix Docker Ansible eploy
25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

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