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

6735 rivejä
380 KiB

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