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

6732 строки
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-bridge-zulip.service', 'priority': 2000, 'groups': ['matrix', 'bridges', 'matrixzulipbridge']}] 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. matrix_zulip_bridge_systemd_required_services_list_auto: |
  1893. {{
  1894. matrix_addons_homeserver_systemd_services_list
  1895. }}
  1896. 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 }}"
  1897. matrix_zulip_bridge_container_network: "{{ matrix_addons_container_network }}"
  1898. matrix_zulip_bridge_container_additional_networks_auto: |-
  1899. {{
  1900. (
  1901. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  1902. +
  1903. [matrix_playbook_reverse_proxyable_services_additional_network] if (matrix_zulip_bridge_container_labels_traefik_enabled and matrix_playbook_reverse_proxyable_services_additional_network) else []
  1904. ) | unique
  1905. }}
  1906. matrix_zulip_bridge_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  1907. matrix_zulip_bridge_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  1908. matrix_zulip_bridge_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  1909. matrix_zulip_bridge_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  1910. matrix_zulip_bridge_appservice_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'zulip.as.tok', rounds=655555) | to_uuid }}"
  1911. matrix_zulip_bridge_homeserver_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'zulip.hs.tok', rounds=655555) | to_uuid }}"
  1912. matrix_zulip_bridge_homeserver_url: "{{ matrix_addons_homeserver_client_api_url }}"
  1913. ######################################################################
  1914. #
  1915. # /matrix-bridge-zulip
  1916. #
  1917. ######################################################################
  1918. ######################################################################
  1919. #
  1920. # matrix-bridge-mx-puppet-slack
  1921. #
  1922. ######################################################################
  1923. # We don't enable bridges by default.
  1924. matrix_mx_puppet_slack_enabled: false
  1925. matrix_mx_puppet_slack_hostname: "{{ matrix_server_fqn_matrix }}"
  1926. matrix_mx_puppet_slack_systemd_required_services_list_auto: |
  1927. {{
  1928. matrix_addons_homeserver_systemd_services_list
  1929. +
  1930. ([postgres_identifier ~ '.service'] if (postgres_enabled and matrix_mx_puppet_slack_database_hostname == postgres_connection_hostname) else [])
  1931. }}
  1932. 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 }}"
  1933. matrix_mx_puppet_slack_container_image_self_build: "{{ matrix_architecture != 'amd64' }}"
  1934. matrix_mx_puppet_slack_container_network: "{{ matrix_addons_container_network }}"
  1935. matrix_mx_puppet_slack_container_additional_networks_auto: |-
  1936. {{
  1937. (
  1938. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  1939. +
  1940. ([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 [])
  1941. +
  1942. ([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 [])
  1943. ) | unique
  1944. }}
  1945. matrix_mx_puppet_slack_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  1946. matrix_mx_puppet_slack_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  1947. matrix_mx_puppet_slack_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  1948. matrix_mx_puppet_slack_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  1949. matrix_mx_puppet_slack_appservice_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mxslk.as.tok', rounds=655555) | to_uuid }}"
  1950. matrix_mx_puppet_slack_homeserver_address: "{{ matrix_addons_homeserver_client_api_url }}"
  1951. matrix_mx_puppet_slack_homeserver_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mxslk.hs.tok', rounds=655555) | to_uuid }}"
  1952. 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 '' }}"
  1953. matrix_mx_puppet_slack_presence_enabled: "{{ matrix_homeserver_implementation != 'synapse' or matrix_synapse_presence_enabled }}"
  1954. # Postgres is the default, except if not using internal Postgres server
  1955. matrix_mx_puppet_slack_database_engine: "{{ 'postgres' if postgres_enabled else 'sqlite' }}"
  1956. matrix_mx_puppet_slack_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  1957. matrix_mx_puppet_slack_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mxpup.slack.db', rounds=655555) | to_uuid }}"
  1958. ######################################################################
  1959. #
  1960. # /matrix-bridge-mx-puppet-slack
  1961. #
  1962. ######################################################################
  1963. ######################################################################
  1964. #
  1965. # matrix-bridge-mx-puppet-twitter
  1966. #
  1967. ######################################################################
  1968. # We don't enable bridges by default.
  1969. matrix_mx_puppet_twitter_enabled: false
  1970. matrix_mx_puppet_twitter_hostname: "{{ matrix_server_fqn_matrix }}"
  1971. matrix_mx_puppet_twitter_systemd_required_services_list_auto: |
  1972. {{
  1973. matrix_addons_homeserver_systemd_services_list
  1974. +
  1975. ([postgres_identifier ~ '.service'] if (postgres_enabled and matrix_mx_puppet_twitter_database_hostname == postgres_connection_hostname) else [])
  1976. }}
  1977. 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 }}"
  1978. matrix_mx_puppet_twitter_container_image_self_build: "{{ matrix_architecture != 'amd64' }}"
  1979. 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 '' }}"
  1980. matrix_mx_puppet_twitter_container_network: "{{ matrix_addons_container_network }}"
  1981. matrix_mx_puppet_twitter_container_additional_networks_auto: |-
  1982. {{
  1983. (
  1984. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  1985. +
  1986. ([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 [])
  1987. +
  1988. ([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 [])
  1989. ) | unique
  1990. }}
  1991. matrix_mx_puppet_twitter_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  1992. matrix_mx_puppet_twitter_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  1993. matrix_mx_puppet_twitter_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  1994. matrix_mx_puppet_twitter_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  1995. matrix_mx_puppet_twitter_appservice_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mxtwt.as.tok', rounds=655555) | to_uuid }}"
  1996. matrix_mx_puppet_twitter_homeserver_address: "{{ matrix_addons_homeserver_client_api_url }}"
  1997. matrix_mx_puppet_twitter_homeserver_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mxtwt.hs.tok', rounds=655555) | to_uuid }}"
  1998. 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 '' }}"
  1999. matrix_mx_puppet_twitter_presence_enabled: "{{ matrix_homeserver_implementation != 'synapse' or matrix_synapse_presence_enabled }}"
  2000. # Postgres is the default, except if not using internal Postgres server
  2001. matrix_mx_puppet_twitter_database_engine: "{{ 'postgres' if postgres_enabled else 'sqlite' }}"
  2002. matrix_mx_puppet_twitter_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  2003. matrix_mx_puppet_twitter_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mxpup.twitter.db', rounds=655555) | to_uuid }}"
  2004. ######################################################################
  2005. #
  2006. # /matrix-bridge-mx-puppet-twitter
  2007. #
  2008. ######################################################################
  2009. ######################################################################
  2010. #
  2011. # matrix-bridge-mx-puppet-instagram
  2012. #
  2013. ######################################################################
  2014. # We don't enable bridges by default.
  2015. matrix_mx_puppet_instagram_enabled: false
  2016. matrix_mx_puppet_instagram_systemd_required_services_list_auto: |
  2017. {{
  2018. matrix_addons_homeserver_systemd_services_list
  2019. +
  2020. ([postgres_identifier ~ '.service'] if (postgres_enabled and matrix_mx_puppet_instagram_database_hostname == postgres_connection_hostname) else [])
  2021. }}
  2022. 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 }}"
  2023. matrix_mx_puppet_instagram_container_image_self_build: "{{ matrix_architecture != 'amd64' }}"
  2024. matrix_mx_puppet_instagram_container_network: "{{ matrix_addons_container_network }}"
  2025. matrix_mx_puppet_instagram_container_additional_networks_auto: |-
  2026. {{
  2027. (
  2028. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  2029. +
  2030. ([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 [])
  2031. ) | unique
  2032. }}
  2033. matrix_mx_puppet_instagram_appservice_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mxig.as.tok', rounds=655555) | to_uuid }}"
  2034. matrix_mx_puppet_instagram_homeserver_address: "{{ matrix_addons_homeserver_client_api_url }}"
  2035. matrix_mx_puppet_instagram_homeserver_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mxig.hs.tok', rounds=655555) | to_uuid }}"
  2036. 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 '' }}"
  2037. matrix_mx_puppet_instagram_presence_enabled: "{{ matrix_homeserver_implementation != 'synapse' or matrix_synapse_presence_enabled }}"
  2038. # Postgres is the default, except if not using internal Postgres server
  2039. matrix_mx_puppet_instagram_database_engine: "{{ 'postgres' if postgres_enabled else 'sqlite' }}"
  2040. matrix_mx_puppet_instagram_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  2041. matrix_mx_puppet_instagram_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mxpup.ig.db', rounds=655555) | to_uuid }}"
  2042. ######################################################################
  2043. #
  2044. # /matrix-bridge-mx-puppet-instagram
  2045. #
  2046. ######################################################################
  2047. ######################################################################
  2048. #
  2049. # matrix-bridge-mx-puppet-discord
  2050. #
  2051. ######################################################################
  2052. # We don't enable bridges by default.
  2053. matrix_mx_puppet_discord_enabled: false
  2054. matrix_mx_puppet_discord_systemd_required_services_list_auto: |
  2055. {{
  2056. matrix_addons_homeserver_systemd_services_list
  2057. +
  2058. ([postgres_identifier ~ '.service'] if (postgres_enabled and matrix_mx_puppet_discord_database_hostname == postgres_connection_hostname) else [])
  2059. }}
  2060. 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 }}"
  2061. matrix_mx_puppet_discord_container_image_self_build: "{{ matrix_architecture != 'amd64' }}"
  2062. matrix_mx_puppet_discord_container_network: "{{ matrix_addons_container_network }}"
  2063. matrix_mx_puppet_discord_container_additional_networks_auto: |-
  2064. {{
  2065. (
  2066. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  2067. +
  2068. ([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 [])
  2069. ) | unique
  2070. }}
  2071. matrix_mx_puppet_discord_appservice_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mxdsc.as.tok', rounds=655555) | to_uuid }}"
  2072. matrix_mx_puppet_discord_homeserver_address: "{{ matrix_addons_homeserver_client_api_url }}"
  2073. matrix_mx_puppet_discord_homeserver_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mxdsc.hs.tok', rounds=655555) | to_uuid }}"
  2074. 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 '' }}"
  2075. matrix_mx_puppet_discord_presence_enabled: "{{ matrix_homeserver_implementation != 'synapse' or matrix_synapse_presence_enabled }}"
  2076. # Postgres is the default, except if not using internal Postgres server
  2077. matrix_mx_puppet_discord_database_engine: "{{ 'postgres' if postgres_enabled else 'sqlite' }}"
  2078. matrix_mx_puppet_discord_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  2079. matrix_mx_puppet_discord_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mxpup.dsc.db', rounds=655555) | to_uuid }}"
  2080. ######################################################################
  2081. #
  2082. # /matrix-bridge-mx-puppet-discord
  2083. #
  2084. ######################################################################
  2085. ######################################################################
  2086. #
  2087. # matrix-bridge-mx-puppet-steam
  2088. #
  2089. ######################################################################
  2090. # We don't enable bridges by default.
  2091. matrix_mx_puppet_steam_enabled: false
  2092. matrix_mx_puppet_steam_systemd_required_services_list_auto: |
  2093. {{
  2094. matrix_addons_homeserver_systemd_services_list
  2095. +
  2096. ([postgres_identifier ~ '.service'] if (postgres_enabled and matrix_mx_puppet_steam_database_hostname == postgres_connection_hostname) else [])
  2097. }}
  2098. 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 }}"
  2099. matrix_mx_puppet_steam_container_image_self_build: "{{ matrix_architecture not in ['arm64', 'amd64'] }}"
  2100. matrix_mx_puppet_steam_container_network: "{{ matrix_addons_container_network }}"
  2101. matrix_mx_puppet_steam_container_additional_networks_auto: |-
  2102. {{
  2103. (
  2104. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  2105. +
  2106. ([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 [])
  2107. ) | unique
  2108. }}
  2109. matrix_mx_puppet_steam_appservice_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mxste.as.tok', rounds=655555) | to_uuid }}"
  2110. matrix_mx_puppet_steam_homeserver_address: "{{ matrix_addons_homeserver_client_api_url }}"
  2111. matrix_mx_puppet_steam_homeserver_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mxste.hs.tok', rounds=655555) | to_uuid }}"
  2112. 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 '' }}"
  2113. matrix_mx_puppet_steam_presence_enabled: "{{ matrix_homeserver_implementation != 'synapse' or matrix_synapse_presence_enabled }}"
  2114. # Postgres is the default, except if not using internal Postgres server
  2115. matrix_mx_puppet_steam_database_engine: "{{ 'postgres' if postgres_enabled else 'sqlite' }}"
  2116. matrix_mx_puppet_steam_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  2117. matrix_mx_puppet_steam_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mxpup.steam.db', rounds=655555) | to_uuid }}"
  2118. ######################################################################
  2119. #
  2120. # /matrix-bridge-mx-puppet-steam
  2121. #
  2122. ######################################################################
  2123. ######################################################################
  2124. #
  2125. # matrix-bridge-mx-puppet-groupme
  2126. #
  2127. ######################################################################
  2128. # We don't enable bridges by default.
  2129. matrix_mx_puppet_groupme_enabled: false
  2130. matrix_mx_puppet_groupme_systemd_required_services_list_auto: |
  2131. {{
  2132. matrix_addons_homeserver_systemd_services_list
  2133. +
  2134. ([postgres_identifier ~ '.service'] if (postgres_enabled and matrix_mx_puppet_groupme_database_hostname == postgres_connection_hostname) else [])
  2135. }}
  2136. 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 }}"
  2137. matrix_mx_puppet_groupme_container_image_self_build: "{{ matrix_architecture != 'amd64' }}"
  2138. matrix_mx_puppet_groupme_container_network: "{{ matrix_addons_container_network }}"
  2139. matrix_mx_puppet_groupme_container_additional_networks_auto: |-
  2140. {{
  2141. (
  2142. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  2143. +
  2144. ([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 [])
  2145. ) | unique
  2146. }}
  2147. matrix_mx_puppet_groupme_appservice_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mxgro.as.tok', rounds=655555) | to_uuid }}"
  2148. matrix_mx_puppet_groupme_homeserver_address: "{{ matrix_addons_homeserver_client_api_url }}"
  2149. matrix_mx_puppet_groupme_homeserver_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mxgro.hs.tok', rounds=655555) | to_uuid }}"
  2150. 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 '' }}"
  2151. matrix_mx_puppet_groupme_presence_enabled: "{{ matrix_homeserver_implementation != 'synapse' or matrix_synapse_presence_enabled }}"
  2152. # Postgres is the default, except if not using internal Postgres server
  2153. matrix_mx_puppet_groupme_database_engine: "{{ 'postgres' if postgres_enabled else 'sqlite' }}"
  2154. matrix_mx_puppet_groupme_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  2155. matrix_mx_puppet_groupme_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mxpup.groupme.db', rounds=655555) | to_uuid }}"
  2156. ######################################################################
  2157. #
  2158. # /matrix-bridge-mx-puppet-groupme
  2159. #
  2160. ######################################################################
  2161. ######################################################################
  2162. #
  2163. # matrix-bridge-postmoogle
  2164. #
  2165. ######################################################################
  2166. # We don't enable bridges by default.
  2167. matrix_postmoogle_enabled: false
  2168. 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 }}"
  2169. matrix_postmoogle_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm64'] }}"
  2170. matrix_postmoogle_ssl_path: |-
  2171. {{
  2172. {
  2173. 'playbook-managed-traefik': (traefik_certs_dumper_dumped_certificates_dir_path if traefik_certs_dumper_enabled else ''),
  2174. 'other-traefik-container': (traefik_certs_dumper_dumped_certificates_dir_path if traefik_certs_dumper_enabled else ''),
  2175. 'none': '',
  2176. }[matrix_playbook_reverse_proxy_type]
  2177. }}
  2178. matrix_playbook_bridge_postmoogle_traefik_tls_cert: "{% for domain in matrix_postmoogle_domains %}/ssl/{{ domain }}/certificate.crt {% endfor %}"
  2179. matrix_playbook_bridge_postmoogle_traefik_key: "{% for domain in matrix_postmoogle_domains %}/ssl/{{ domain }}/privatekey.key {% endfor %}"
  2180. matrix_postmoogle_tls_cert: |-
  2181. {{
  2182. {
  2183. 'playbook-managed-traefik': (matrix_playbook_bridge_postmoogle_traefik_tls_cert if traefik_certs_dumper_enabled else ''),
  2184. 'other-traefik-container': (matrix_playbook_bridge_postmoogle_traefik_tls_cert if traefik_certs_dumper_enabled else ''),
  2185. 'none': '',
  2186. }[matrix_playbook_reverse_proxy_type]
  2187. }}
  2188. matrix_postmoogle_tls_key: |-
  2189. {{
  2190. {
  2191. 'playbook-managed-traefik': (matrix_playbook_bridge_postmoogle_traefik_key if traefik_certs_dumper_enabled else ''),
  2192. 'other-traefik-container': (matrix_playbook_bridge_postmoogle_traefik_key if traefik_certs_dumper_enabled else ''),
  2193. 'none': '',
  2194. }[matrix_playbook_reverse_proxy_type]
  2195. }}
  2196. 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 %}"
  2197. matrix_postmoogle_systemd_required_services_list_auto: |
  2198. {{
  2199. matrix_addons_homeserver_systemd_services_list
  2200. +
  2201. ([postgres_identifier ~ '.service'] if postgres_enabled and matrix_postmoogle_database_hostname == matrix_postmoogle_database_hostname else [])
  2202. +
  2203. (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 [])
  2204. }}
  2205. # Postgres is the default, except if not using internal Postgres server
  2206. matrix_postmoogle_database_engine: "{{ 'postgres' if postgres_enabled else 'sqlite' }}"
  2207. matrix_postmoogle_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  2208. matrix_postmoogle_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'postmoogle.db', rounds=655555) | to_uuid }}"
  2209. matrix_postmoogle_homeserver: "{{ matrix_addons_homeserver_client_api_url }}"
  2210. matrix_postmoogle_container_network: "{{ matrix_addons_container_network }}"
  2211. matrix_postmoogle_container_additional_networks_auto: |-
  2212. {{
  2213. (
  2214. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  2215. +
  2216. ([postgres_container_network] if postgres_enabled and matrix_bot_matrix_reminder_bot_database_hostname == postgres_connection_hostname else [])
  2217. ) | unique
  2218. }}
  2219. ######################################################################
  2220. #
  2221. # /matrix-bridge-postmoogle
  2222. #
  2223. ######################################################################
  2224. ######################################################################
  2225. #
  2226. # matrix-bridge-steam
  2227. #
  2228. ######################################################################
  2229. # We don't enable bridges by default.
  2230. matrix_steam_bridge_enabled: false
  2231. matrix_steam_bridge_systemd_required_services_list_auto: |
  2232. {{
  2233. matrix_addons_homeserver_systemd_services_list
  2234. +
  2235. ([postgres_identifier ~ '.service'] if (postgres_enabled and matrix_steam_bridge_database_hostname == postgres_connection_hostname) else [])
  2236. }}
  2237. 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 }}"
  2238. matrix_steam_bridge_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm64'] }}"
  2239. matrix_steam_bridge_container_network: "{{ matrix_addons_container_network }}"
  2240. matrix_steam_bridge_container_additional_networks_auto: |-
  2241. {{
  2242. (
  2243. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  2244. +
  2245. ([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 [])
  2246. +
  2247. ([matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network and matrix_steam_bridge_container_labels_traefik_enabled else [])
  2248. ) | unique
  2249. }}
  2250. matrix_steam_bridge_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  2251. matrix_steam_bridge_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  2252. matrix_steam_bridge_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  2253. matrix_steam_bridge_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  2254. matrix_steam_bridge_container_labels_metrics_middleware_basic_auth_enabled: "{{ matrix_metrics_exposure_http_basic_auth_enabled }}"
  2255. matrix_steam_bridge_container_labels_metrics_middleware_basic_auth_users: "{{ matrix_metrics_exposure_http_basic_auth_users }}"
  2256. matrix_steam_bridge_appservice_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'steam.as.token', rounds=655555) | to_uuid }}"
  2257. matrix_steam_bridge_homeserver_address: "{{ matrix_addons_homeserver_client_api_url }}"
  2258. matrix_steam_bridge_homeserver_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'steam.hs.token', rounds=655555) | to_uuid }}"
  2259. matrix_steam_bridge_homeserver_async_media: "{{ matrix_homeserver_implementation in ['synapse'] }}"
  2260. 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 '' }}"
  2261. matrix_steam_bridge_provisioning_shared_secret: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'steam.prov', rounds=655555) | to_uuid }}"
  2262. matrix_steam_bridge_double_puppet_secrets_auto: |-
  2263. {{
  2264. ({
  2265. matrix_steam_bridge_homeserver_domain: ("as_token:" + matrix_appservice_double_puppet_registration_as_token)
  2266. })
  2267. if matrix_appservice_double_puppet_enabled
  2268. else {}
  2269. }}
  2270. matrix_steam_bridge_metrics_enabled: "{{ prometheus_enabled or matrix_metrics_exposure_enabled }}"
  2271. matrix_steam_bridge_metrics_proxying_enabled: "{{ matrix_steam_bridge_metrics_enabled and matrix_metrics_exposure_enabled }}"
  2272. matrix_steam_bridge_metrics_proxying_hostname: "{{ matrix_metrics_exposure_hostname }}"
  2273. matrix_steam_bridge_metrics_proxying_path_prefix: "{{ matrix_metrics_exposure_path_prefix }}/matrix-steam-bridge"
  2274. matrix_steam_bridge_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  2275. 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 '' }}"
  2276. ######################################################################
  2277. #
  2278. # /matrix-bridge-steam
  2279. #
  2280. ######################################################################
  2281. ######################################################################
  2282. #
  2283. # matrix-bot-matrix-reminder-bot
  2284. #
  2285. ######################################################################
  2286. # We don't enable bots by default.
  2287. matrix_bot_matrix_reminder_bot_enabled: false
  2288. matrix_bot_matrix_reminder_bot_systemd_required_services_list_auto: |
  2289. {{
  2290. matrix_addons_homeserver_systemd_services_list
  2291. +
  2292. ([postgres_identifier ~ '.service'] if postgres_enabled and matrix_bot_matrix_reminder_bot_database_hostname == postgres_connection_hostname else [])
  2293. }}
  2294. 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 }}"
  2295. matrix_bot_matrix_reminder_bot_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm64'] }}"
  2296. matrix_bot_matrix_reminder_bot_container_network: "{{ matrix_addons_container_network }}"
  2297. matrix_bot_matrix_reminder_bot_container_additional_networks_auto: |-
  2298. {{
  2299. (
  2300. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  2301. +
  2302. ([postgres_container_network] if postgres_enabled and matrix_bot_matrix_reminder_bot_database_hostname == postgres_connection_hostname else [])
  2303. ) | unique
  2304. }}
  2305. matrix_bot_matrix_reminder_bot_matrix_homeserver_url: "{{ matrix_addons_homeserver_client_api_url }}"
  2306. # Postgres is the default, except if not using internal Postgres server
  2307. matrix_bot_matrix_reminder_bot_database_engine: "{{ 'postgres' if postgres_enabled else 'sqlite' }}"
  2308. matrix_bot_matrix_reminder_bot_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  2309. matrix_bot_matrix_reminder_bot_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'reminder.bot.db', rounds=655555) | to_uuid }}"
  2310. matrix_bot_matrix_reminder_bot_allowlist_enabled: true
  2311. matrix_bot_matrix_reminder_bot_allowlist_regexes_auto:
  2312. - "@[a-z0-9-_.]+:{{ matrix_domain }}"
  2313. ######################################################################
  2314. #
  2315. # /matrix-bot-matrix-reminder-bot
  2316. #
  2317. ######################################################################
  2318. ######################################################################
  2319. #
  2320. # matrix-bot-matrix-registration-bot
  2321. #
  2322. ######################################################################
  2323. # We don't enable bots by default.
  2324. matrix_bot_matrix_registration_bot_enabled: false
  2325. matrix_bot_matrix_registration_bot_systemd_required_services_list_auto: |
  2326. {{
  2327. matrix_addons_homeserver_systemd_services_list
  2328. }}
  2329. 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 }}"
  2330. matrix_bot_matrix_registration_bot_container_image_self_build: "{{ matrix_architecture not in ['amd64'] }}"
  2331. matrix_bot_matrix_registration_bot_container_network: "{{ matrix_addons_container_network }}"
  2332. matrix_bot_matrix_registration_bot_container_additional_networks_auto: |-
  2333. {{
  2334. ([matrix_homeserver_container_network] if matrix_bot_matrix_registration_bot_container_network != matrix_homeserver_container_network else [])
  2335. }}
  2336. # Using `matrix_addons_homeserver_client_api_url` would not work here,
  2337. # because `matrix-traefik:8008` (matrix-internal-client-api) does not expose any `/_synapse` paths.
  2338. matrix_bot_matrix_registration_bot_api_base_url: "{{ matrix_homeserver_container_url }}"
  2339. ######################################################################
  2340. #
  2341. # /matrix-bot-matrix-registration-bot
  2342. #
  2343. ######################################################################
  2344. ######################################################################
  2345. #
  2346. # matrix-bot-maubot
  2347. #
  2348. ######################################################################
  2349. # We don't enable bots by default.
  2350. matrix_bot_maubot_enabled: false
  2351. matrix_bot_maubot_systemd_required_services_list_auto: |
  2352. {{
  2353. matrix_addons_homeserver_systemd_services_list
  2354. +
  2355. ([postgres_identifier ~ '.service'] if (postgres_enabled and matrix_bot_maubot_database_hostname == postgres_connection_hostname) else [])
  2356. }}
  2357. matrix_bot_maubot_hostname: "{{ matrix_server_fqn_matrix }}"
  2358. matrix_bot_maubot_homeserver_url: "{{ matrix_addons_homeserver_client_api_url }}"
  2359. matrix_bot_maubot_homeserver_secret: |-
  2360. {{
  2361. {
  2362. 'synapse': matrix_synapse_registration_shared_secret | default(''),
  2363. 'dendrite': matrix_dendrite_client_api_registration_shared_secret | default(''),
  2364. }[matrix_homeserver_implementation] | default('')
  2365. }}
  2366. 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 }}"
  2367. matrix_bot_maubot_container_image_self_build: "{{ matrix_architecture not in ['amd64'] }}"
  2368. 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 '' }}"
  2369. matrix_bot_maubot_container_network: "{{ matrix_addons_container_network }}"
  2370. matrix_bot_maubot_container_additional_networks_auto: |-
  2371. {{
  2372. (
  2373. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  2374. +
  2375. ([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 [])
  2376. +
  2377. ([matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network and matrix_bot_maubot_container_labels_traefik_enabled else [])
  2378. ) | unique
  2379. }}
  2380. matrix_bot_maubot_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  2381. matrix_bot_maubot_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  2382. matrix_bot_maubot_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  2383. matrix_bot_maubot_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  2384. matrix_bot_maubot_container_labels_management_hostname: "{{ matrix_server_fqn_matrix }}"
  2385. # Postgres is the default, except if not using internal Postgres server
  2386. matrix_bot_maubot_database_engine: "{{ 'postgres' if postgres_enabled else 'sqlite' }}"
  2387. matrix_bot_maubot_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  2388. matrix_bot_maubot_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mxpup.dsc.db', rounds=655555) | to_uuid }}"
  2389. ######################################################################
  2390. #
  2391. # /matrix-bot-maubot
  2392. #
  2393. ######################################################################
  2394. ######################################################################
  2395. #
  2396. # matrix-bot-honoroit
  2397. #
  2398. ######################################################################
  2399. # We don't enable bots by default.
  2400. matrix_bot_honoroit_enabled: false
  2401. matrix_bot_honoroit_hostname: "{{ matrix_server_fqn_matrix }}"
  2402. matrix_bot_honoroit_path_prefix: /honoroit
  2403. matrix_bot_honoroit_systemd_required_services_list_auto: |
  2404. {{
  2405. matrix_addons_homeserver_systemd_services_list
  2406. +
  2407. ([postgres_identifier ~ '.service'] if postgres_enabled and matrix_bot_honoroit_database_hostname == postgres_connection_hostname else [])
  2408. }}
  2409. 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 }}"
  2410. matrix_bot_honoroit_container_network: "{{ matrix_addons_container_network }}"
  2411. matrix_bot_honoroit_container_additional_networks: |
  2412. {{
  2413. (
  2414. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  2415. +
  2416. ([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 [])
  2417. +
  2418. ([matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network and matrix_bot_honoroit_container_labels_traefik_enabled else [])
  2419. ) | unique
  2420. }}
  2421. matrix_bot_honoroit_container_labels_traefik_enabled: "{{ matrix_playbook_traefik_labels_enabled }}"
  2422. matrix_bot_honoroit_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  2423. matrix_bot_honoroit_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  2424. matrix_bot_honoroit_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  2425. # For consistency with other things hosted at the Matrix FQN, we adjust the metrics endpoint
  2426. # so that metrics would be served at something like `/metrics/SERVICE_NAME`, and not at the default path for the role (`PREFIX/metrics`).
  2427. matrix_bot_honoroit_container_labels_traefik_metrics_path: "{{ matrix_metrics_exposure_path_prefix }}/honoroit"
  2428. matrix_bot_honoroit_homeserver: "{{ matrix_addons_homeserver_client_api_url }}"
  2429. # Postgres is the default, except if not using internal Postgres server
  2430. matrix_bot_honoroit_database_engine: "{{ 'postgres' if postgres_enabled else 'sqlite' }}"
  2431. matrix_bot_honoroit_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  2432. matrix_bot_honoroit_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'honoroit.bot.db', rounds=655555) | to_uuid }}"
  2433. matrix_bot_honoroit_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm64'] }}"
  2434. ######################################################################
  2435. #
  2436. # /matrix-bot-honoroit
  2437. #
  2438. ######################################################################
  2439. ######################################################################
  2440. #
  2441. # matrix-bot-buscarron
  2442. #
  2443. ######################################################################
  2444. # We don't enable bots by default.
  2445. matrix_bot_buscarron_enabled: false
  2446. matrix_bot_buscarron_hostname: "{{ matrix_server_fqn_buscarron }}"
  2447. matrix_bot_buscarron_systemd_required_services_list_auto: |
  2448. {{
  2449. matrix_addons_homeserver_systemd_services_list
  2450. +
  2451. ([postgres_identifier ~ '.service'] if (postgres_enabled and matrix_bot_buscarron_database_hostname == postgres_connection_hostname) else [])
  2452. }}
  2453. 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 }}"
  2454. matrix_bot_buscarron_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm64'] }}"
  2455. matrix_bot_buscarron_container_network: "{{ matrix_addons_container_network }}"
  2456. matrix_bot_buscarron_container_additional_networks_auto: |-
  2457. {{
  2458. (
  2459. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  2460. +
  2461. ([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 [])
  2462. +
  2463. ([matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network and matrix_bot_buscarron_container_labels_traefik_enabled else [])
  2464. ) | unique
  2465. }}
  2466. matrix_bot_buscarron_container_labels_traefik_enabled: "{{ matrix_playbook_traefik_labels_enabled }}"
  2467. matrix_bot_buscarron_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  2468. matrix_bot_buscarron_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  2469. matrix_bot_buscarron_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  2470. matrix_bot_buscarron_homeserver: "{{ matrix_addons_homeserver_client_api_url }}"
  2471. # Postgres is the default, except if not using internal Postgres server
  2472. matrix_bot_buscarron_database_engine: "{{ 'postgres' if postgres_enabled else 'sqlite' }}"
  2473. matrix_bot_buscarron_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  2474. matrix_bot_buscarron_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'buscarron.bot.db', rounds=655555) | to_uuid }}"
  2475. ######################################################################
  2476. #
  2477. # /matrix-bot-buscarron
  2478. #
  2479. ######################################################################
  2480. ######################################################################
  2481. #
  2482. # matrix-bot-baibot
  2483. #
  2484. ######################################################################
  2485. # We don't enable bots by default.
  2486. matrix_bot_baibot_enabled: false
  2487. 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 }}"
  2488. matrix_bot_baibot_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm64'] }}"
  2489. matrix_bot_baibot_systemd_required_services_list_auto: |
  2490. {{
  2491. matrix_addons_homeserver_systemd_services_list
  2492. }}
  2493. matrix_bot_baibot_config_homeserver_url: "{{ matrix_addons_homeserver_client_api_url }}"
  2494. matrix_bot_baibot_container_network: "{{ matrix_addons_container_network }}"
  2495. matrix_bot_baibot_container_additional_networks_auto: |-
  2496. {{
  2497. (
  2498. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  2499. ) | unique
  2500. }}
  2501. ######################################################################
  2502. #
  2503. # /matrix-bot-baibot
  2504. #
  2505. ######################################################################
  2506. ######################################################################
  2507. #
  2508. # matrix-bot-chatgpt
  2509. #
  2510. ######################################################################
  2511. # We don't enable bots by default.
  2512. matrix_bot_chatgpt_enabled: false
  2513. 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 }}"
  2514. matrix_bot_chatgpt_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm64'] }}"
  2515. matrix_bot_chatgpt_container_network: "{{ matrix_addons_container_network }}"
  2516. matrix_bot_chatgpt_container_additional_networks_auto: "{{ [] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network] }}"
  2517. matrix_bot_chatgpt_matrix_homeserver_url: "{{ matrix_addons_homeserver_client_api_url }}"
  2518. matrix_bot_chatgpt_systemd_required_services_list_auto: "{{ matrix_addons_homeserver_systemd_services_list }}"
  2519. ######################################################################
  2520. #
  2521. # /matrix-bot-chatgpt
  2522. #
  2523. ######################################################################
  2524. ######################################################################
  2525. #
  2526. # matrix-bot-go-neb
  2527. #
  2528. ######################################################################
  2529. # We don't enable bots by default.
  2530. matrix_bot_go_neb_enabled: false
  2531. matrix_bot_go_neb_scheme: "{{ 'https' if matrix_playbook_ssl_enabled else 'http' }}"
  2532. matrix_bot_go_neb_hostname: "{{ matrix_server_fqn_bot_go_neb }}"
  2533. matrix_bot_go_neb_systemd_required_services_list_auto: |
  2534. {{
  2535. matrix_addons_homeserver_systemd_services_list
  2536. }}
  2537. 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 }}"
  2538. 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 '' }}"
  2539. matrix_bot_go_neb_container_network: "{{ matrix_addons_container_network }}"
  2540. matrix_bot_go_neb_container_additional_networks: |
  2541. {{
  2542. (
  2543. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  2544. +
  2545. ([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 [])
  2546. ) | unique
  2547. }}
  2548. matrix_bot_go_neb_container_labels_traefik_enabled: "{{ matrix_playbook_traefik_labels_enabled }}"
  2549. matrix_bot_go_neb_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  2550. matrix_bot_go_neb_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  2551. matrix_bot_go_neb_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  2552. ######################################################################
  2553. #
  2554. # /matrix-bot-go-neb
  2555. #
  2556. ######################################################################
  2557. ######################################################################
  2558. #
  2559. # matrix-bot-mjolnir
  2560. #
  2561. ######################################################################
  2562. # We don't enable bots by default.
  2563. matrix_bot_mjolnir_enabled: false
  2564. matrix_bot_mjolnir_systemd_required_services_list_auto: |
  2565. {{
  2566. matrix_addons_homeserver_systemd_services_list
  2567. +
  2568. (['matrix-pantalaimon.service'] if matrix_bot_mjolnir_pantalaimon_use else [])
  2569. }}
  2570. 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 }}"
  2571. matrix_bot_mjolnir_container_image_self_build: "{{ matrix_architecture != 'amd64' }}"
  2572. matrix_bot_mjolnir_container_network: "{{ matrix_addons_container_network }}"
  2573. matrix_bot_mjolnir_container_additional_networks_auto: |-
  2574. {{
  2575. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  2576. }}
  2577. matrix_bot_mjolnir_homeserver_url: "{{ 'http://matrix-pantalaimon:8009' if matrix_bot_mjolnir_pantalaimon_use else matrix_addons_homeserver_client_api_url }}"
  2578. matrix_bot_mjolnir_raw_homeserver_url: "{{ matrix_addons_homeserver_client_api_url }}"
  2579. ######################################################################
  2580. #
  2581. # /matrix-bot-mjolnir
  2582. #
  2583. ######################################################################
  2584. ######################################################################
  2585. #
  2586. # matrix-bot-draupnir
  2587. #
  2588. ######################################################################
  2589. # We don't enable bots by default.
  2590. matrix_bot_draupnir_enabled: false
  2591. 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 '' }}"
  2592. matrix_bot_draupnir_systemd_required_services_list_auto: |
  2593. {{
  2594. matrix_addons_homeserver_systemd_services_list
  2595. +
  2596. (['matrix-pantalaimon.service'] if matrix_bot_draupnir_pantalaimon_use else [])
  2597. }}
  2598. 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 }}"
  2599. matrix_bot_draupnir_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm64'] }}"
  2600. matrix_bot_draupnir_container_network: "{{ matrix_addons_container_network }}"
  2601. matrix_bot_draupnir_container_additional_networks_auto: |-
  2602. {{
  2603. (
  2604. ([] if matrix_addons_homeserver_container_network == '' else
  2605. [matrix_addons_homeserver_container_network])
  2606. +
  2607. ([matrix_playbook_reverse_proxyable_services_additional_network] if
  2608. (matrix_playbook_reverse_proxyable_services_additional_network and matrix_bot_draupnir_container_labels_traefik_enabled) else [])
  2609. +
  2610. ([matrix_pantalaimon_container_network] if (matrix_bot_draupnir_pantalaimon_use and matrix_pantalaimon_container_network != matrix_bot_draupnir_container_network) else [])
  2611. ) | unique
  2612. }}
  2613. 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
  2614. matrix_bot_draupnir_config_rawHomeserverUrl: "{{ matrix_addons_homeserver_client_api_url }}" # noqa var-naming
  2615. 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'] }}"
  2616. matrix_bot_draupnir_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  2617. matrix_bot_draupnir_container_labels_web_abuseReporting_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  2618. matrix_bot_draupnir_container_labels_web_abuseReporting_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  2619. #The salt is size restricted here as a maximum salt size of 16 characters exists due to the functions used.
  2620. 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
  2621. ######################################################################
  2622. #
  2623. # /matrix-bot-draupnir
  2624. #
  2625. ######################################################################
  2626. ######################################################################
  2627. #
  2628. # matrix-appservice-draupnir-for-all
  2629. #
  2630. ######################################################################
  2631. # We don't enable bots by default.
  2632. matrix_appservice_draupnir_for_all_enabled: false
  2633. matrix_appservice_draupnir_for_all_systemd_required_services_list_auto: |
  2634. {{
  2635. matrix_addons_homeserver_systemd_services_list
  2636. +
  2637. ([postgres_identifier ~ '.service'] if (postgres_enabled and matrix_appservice_draupnir_for_all_database_hostname == postgres_connection_hostname) else [])
  2638. }}
  2639. 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 }}"
  2640. matrix_appservice_draupnir_for_all_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm64'] }}"
  2641. matrix_appservice_draupnir_for_all_container_network: "{{ matrix_addons_container_network }}"
  2642. matrix_appservice_draupnir_for_all_container_additional_networks_auto: |-
  2643. {{
  2644. (
  2645. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  2646. +
  2647. ([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 [])
  2648. ) | unique
  2649. }}
  2650. matrix_appservice_draupnir_for_all_appservice_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'd4a.as.token', rounds=655555) | to_uuid }}"
  2651. matrix_appservice_draupnir_for_all_homeserver_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'd4a.hs.token', rounds=655555) | to_uuid }}"
  2652. matrix_appservice_draupnir_for_all_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  2653. matrix_appservice_draupnir_for_all_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'as.d4a.db', rounds=655555) | to_uuid }}"
  2654. ######################################################################
  2655. #
  2656. # /matrix-appservice-draupnir-for-all
  2657. #
  2658. ######################################################################
  2659. ######################################################################
  2660. #
  2661. # matrix-appservice-double-puppet
  2662. #
  2663. ######################################################################
  2664. matrix_appservice_double_puppet_enabled: false
  2665. matrix_appservice_double_puppet_registration_as_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'as.doub.pup', rounds=655555) | to_uuid }}"
  2666. matrix_appservice_double_puppet_registration_hs_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'hs.doub.pup', rounds=655555) | to_uuid }}"
  2667. ######################################################################
  2668. #
  2669. # /matrix-appservice-double-puppet
  2670. #
  2671. ######################################################################
  2672. ######################################################################
  2673. #
  2674. # matrix-pantalaimon
  2675. #
  2676. ######################################################################
  2677. matrix_pantalaimon_enabled: false
  2678. matrix_pantalaimon_systemd_required_services_list_auto: |
  2679. {{
  2680. matrix_addons_homeserver_systemd_services_list
  2681. }}
  2682. 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 }}"
  2683. matrix_pantalaimon_container_network: "{{ matrix_homeserver_container_network }}"
  2684. matrix_pantalaimon_container_image_self_build: "{{ matrix_architecture not in ['amd64'] }}"
  2685. matrix_pantalaimon_homeserver_url: "{{ matrix_addons_homeserver_client_api_url }}"
  2686. ######################################################################
  2687. #
  2688. # /matrix-pantalaimon
  2689. #
  2690. ######################################################################
  2691. ######################################################################
  2692. #
  2693. # etke/backup_borg
  2694. #
  2695. ######################################################################
  2696. backup_borg_enabled: false
  2697. backup_borg_identifier: matrix-backup-borg
  2698. backup_borg_storage_archive_name_format: matrix-{now:%Y-%m-%d-%H%M%S}
  2699. backup_borg_base_path: "{{ matrix_base_data_path }}/backup-borg"
  2700. backup_borg_username: "{{ matrix_user_name }}"
  2701. backup_borg_uid: "{{ matrix_user_uid }}"
  2702. backup_borg_gid: "{{ matrix_user_gid }}"
  2703. 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 }}"
  2704. backup_borg_container_network: "{{ postgres_container_network if postgres_enabled else backup_borg_identifier }}"
  2705. backup_borg_postgresql_version_detection_postgres_role_name: "{{ 'galaxy/postgres' if postgres_enabled else '' }}"
  2706. backup_borg_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm32', 'arm64'] }}"
  2707. backup_borg_postgresql_enabled: "{{ postgres_enabled }}"
  2708. backup_borg_postgresql_databases_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  2709. backup_borg_postgresql_databases_username: "{{ postgres_connection_username if postgres_enabled else '' }}"
  2710. backup_borg_postgresql_databases_password: "{{ postgres_connection_password if postgres_enabled else '' }}"
  2711. backup_borg_postgresql_databases_port: "{{ postgres_connection_port if postgres_enabled else 5432 }}"
  2712. backup_borg_postgresql_databases_auto: "{{ postgres_managed_databases | map(attribute='name') if postgres_enabled else [] }}"
  2713. backup_borg_location_source_directories:
  2714. - "{{ matrix_base_data_path }}"
  2715. backup_borg_location_exclude_patterns: |
  2716. {{
  2717. ([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 [])
  2718. +
  2719. ([postgres_data_path] if postgres_enabled else [])
  2720. }}
  2721. backup_borg_systemd_required_services_list: |
  2722. {{
  2723. [devture_systemd_docker_base_docker_service_name]
  2724. +
  2725. ([postgres_identifier ~ '.service'] if postgres_enabled else [])
  2726. }}
  2727. ######################################################################
  2728. #
  2729. # /etke/backup_borg
  2730. #
  2731. ######################################################################
  2732. ######################################################################
  2733. #
  2734. # matrix-cactus-comments
  2735. #
  2736. ######################################################################
  2737. matrix_cactus_comments_enabled: false
  2738. matrix_cactus_comments_systemd_required_services_list_auto: |
  2739. {{
  2740. matrix_addons_homeserver_systemd_services_list
  2741. }}
  2742. 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 }}"
  2743. matrix_cactus_comments_container_image_self_build: "{{ matrix_architecture not in ['amd64'] }}"
  2744. matrix_cactus_comments_container_network: "{{ matrix_addons_container_network }}"
  2745. matrix_cactus_comments_container_additional_networks_auto: |-
  2746. {{
  2747. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  2748. }}
  2749. matrix_cactus_comments_as_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'cactus.as.token', rounds=655555) | to_uuid }}"
  2750. matrix_cactus_comments_hs_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'cactus.hs.token', rounds=655555) | to_uuid }}"
  2751. matrix_cactus_comments_homeserver_url: "{{ matrix_addons_homeserver_client_api_url }}"
  2752. ######################################################################
  2753. #
  2754. # /matrix-cactus-comments
  2755. #
  2756. ######################################################################
  2757. ######################################################################
  2758. #
  2759. # matrix-cactus-comments-client
  2760. #
  2761. ######################################################################
  2762. matrix_cactus_comments_client_enabled: "{{ matrix_cactus_comments_enabled }}"
  2763. matrix_cactus_comments_client_hostname: "{{ matrix_server_fqn_matrix }}"
  2764. 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 }}"
  2765. matrix_cactus_comments_client_container_network: "{{ matrix_addons_container_network }}"
  2766. matrix_cactus_comments_client_container_additional_networks_auto: |-
  2767. {{
  2768. (
  2769. ([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 [])
  2770. ) | unique
  2771. }}
  2772. matrix_cactus_comments_client_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  2773. matrix_cactus_comments_client_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  2774. matrix_cactus_comments_client_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  2775. matrix_cactus_comments_client_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  2776. ######################################################################
  2777. #
  2778. # /matrix-cactus-comments-client
  2779. #
  2780. ######################################################################
  2781. ######################################################################
  2782. #
  2783. # matrix-corporal
  2784. #
  2785. ######################################################################
  2786. matrix_corporal_enabled: false
  2787. matrix_corporal_systemd_required_services_list_auto: |
  2788. {{
  2789. (['matrix-' + matrix_homeserver_implementation + '.service'])
  2790. }}
  2791. 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 }}"
  2792. matrix_corporal_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm64'] }}"
  2793. 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 '' }}"
  2794. 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 '' }}"
  2795. matrix_corporal_container_network: matrix-corporal
  2796. matrix_corporal_container_additional_networks: |
  2797. {{
  2798. (
  2799. ([matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network else [])
  2800. +
  2801. ([matrix_homeserver_container_network] if matrix_corporal_container_network != matrix_homeserver_container_network else [])
  2802. ) | unique
  2803. }}
  2804. matrix_corporal_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  2805. matrix_corporal_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  2806. matrix_corporal_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  2807. matrix_corporal_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  2808. matrix_corporal_matrix_homeserver_scheme: "{{ 'https' if matrix_playbook_ssl_enabled else 'http' }}"
  2809. matrix_corporal_matrix_homeserver_api_endpoint: "{{ matrix_homeserver_container_url }}"
  2810. matrix_corporal_matrix_auth_shared_secret: "{{ matrix_synapse_ext_password_provider_shared_secret_auth_shared_secret }}"
  2811. # This is only useful if there's REST auth provider to make use of it.
  2812. matrix_corporal_http_gateway_internal_rest_auth_enabled: "{{ matrix_synapse_ext_password_provider_rest_auth_enabled }}"
  2813. matrix_corporal_matrix_registration_shared_secret: "{{ matrix_synapse_registration_shared_secret }}"
  2814. ######################################################################
  2815. #
  2816. # /matrix-corporal
  2817. #
  2818. ######################################################################
  2819. ######################################################################
  2820. #
  2821. # matrix-rageshake
  2822. #
  2823. ######################################################################
  2824. # We don't enable rageshake by default.
  2825. matrix_rageshake_enabled: false
  2826. matrix_rageshake_container_image_self_build: "{{ matrix_architecture not in ['amd64'] }}"
  2827. matrix_rageshake_hostname: "{{ matrix_server_fqn_rageshake }}"
  2828. 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 }}"
  2829. matrix_rageshake_container_network: matrix-rageshake
  2830. matrix_rageshake_container_additional_networks: "{{ [matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network else [] }}"
  2831. matrix_rageshake_container_http_host_bind_port: "{{ (matrix_playbook_service_host_bind_interface_prefix ~ '9110') if matrix_playbook_service_host_bind_interface_prefix else '' }}"
  2832. matrix_rageshake_container_labels_traefik_enabled: "{{ matrix_playbook_traefik_labels_enabled }}"
  2833. matrix_rageshake_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  2834. matrix_rageshake_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  2835. matrix_rageshake_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  2836. ######################################################################
  2837. #
  2838. # /matrix-rageshake
  2839. #
  2840. ######################################################################
  2841. ######################################################################
  2842. #
  2843. # matrix-coturn
  2844. #
  2845. ######################################################################
  2846. matrix_coturn_enabled: true
  2847. 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 }}"
  2848. matrix_coturn_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm32', 'arm64'] }}"
  2849. # We make the assumption that `ansible_host` points to an external IP address, which may not always be the case.
  2850. # Users are free to set `matrix_coturn_turn_external_ip_address` to an empty string
  2851. # to allow auto-detection (via an EchoIP service) to happen at runtime.
  2852. matrix_coturn_turn_external_ip_address: "{{ ansible_host }}"
  2853. 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 '' }}"
  2854. 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 '' }}"
  2855. 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 '' }}"
  2856. matrix_coturn_tls_enabled: "{{ matrix_playbook_ssl_enabled }}"
  2857. matrix_coturn_tls_cert_path: |-
  2858. {{
  2859. {
  2860. 'playbook-managed-traefik': ('/certificate.crt' if traefik_certs_dumper_enabled else ''),
  2861. 'other-traefik-container': ('/certificate.crt' if traefik_certs_dumper_enabled else ''),
  2862. 'none': '',
  2863. }[matrix_playbook_reverse_proxy_type]
  2864. }}
  2865. matrix_coturn_tls_key_path: |-
  2866. {{
  2867. {
  2868. 'playbook-managed-traefik': ('/privatekey.key' if traefik_certs_dumper_enabled else ''),
  2869. 'other-traefik-container': ('/privatekey.key' if traefik_certs_dumper_enabled else ''),
  2870. 'none': '',
  2871. }[matrix_playbook_reverse_proxy_type]
  2872. }}
  2873. matrix_coturn_container_additional_volumes: |
  2874. {{
  2875. (
  2876. [
  2877. {
  2878. 'src': (traefik_certs_dumper_dumped_certificates_dir_path + '/' + matrix_server_fqn_matrix + '/certificate.crt'),
  2879. 'dst': '/certificate.crt',
  2880. 'options': 'ro',
  2881. },
  2882. {
  2883. 'src': (traefik_certs_dumper_dumped_certificates_dir_path + '/' + matrix_server_fqn_matrix + '/privatekey.key'),
  2884. 'dst': '/privatekey.key',
  2885. 'options': 'ro',
  2886. },
  2887. ] 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 []
  2888. )
  2889. }}
  2890. matrix_coturn_systemd_required_services_list_auto: |
  2891. {{
  2892. ([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 [])
  2893. }}
  2894. ######################################################################
  2895. #
  2896. # /matrix-coturn
  2897. #
  2898. ######################################################################
  2899. ######################################################################
  2900. #
  2901. # matrix-dimension
  2902. #
  2903. ######################################################################
  2904. matrix_dimension_enabled: false
  2905. matrix_dimension_scheme: "{{ 'https' if matrix_playbook_ssl_enabled else 'http' }}"
  2906. matrix_dimension_hostname: "{{ matrix_server_fqn_dimension }}"
  2907. 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 }}"
  2908. matrix_dimension_container_image_self_build: "{{ matrix_architecture != 'amd64' }}"
  2909. matrix_dimension_container_network: "{{ matrix_addons_container_network }}"
  2910. # Dimension is connected both to `matrix_addons_homeserver_container_network` and `matrix_homeserver_container_network`,
  2911. # because `matrix_dimension_homeserver_clientServerUrl` and `matrix_dimension_homeserver_federationUrl` are potentially
  2912. # going to different places.
  2913. matrix_dimension_container_additional_networks: |
  2914. {{
  2915. (
  2916. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  2917. +
  2918. ([matrix_homeserver_container_network] if matrix_homeserver_container_network != matrix_dimension_container_network else [])
  2919. +
  2920. ([postgres_container_network] if (postgres_enabled and matrix_dimension_database_hostname == postgres_connection_hostname and postgres_container_network != matrix_dimension_container_network) else [])
  2921. +
  2922. ([matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network else [])
  2923. ) | unique
  2924. }}
  2925. matrix_dimension_container_http_host_bind_port: "{{ (matrix_playbook_service_host_bind_interface_prefix ~ '8184') if matrix_playbook_service_host_bind_interface_prefix else '' }}"
  2926. matrix_dimension_container_labels_traefik_enabled: "{{ matrix_playbook_traefik_labels_enabled }}"
  2927. matrix_dimension_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  2928. matrix_dimension_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  2929. matrix_dimension_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  2930. matrix_dimension_homeserver_clientServerUrl: "{{ matrix_addons_homeserver_client_api_url }}"
  2931. matrix_dimension_homeserver_federationUrl: "{{ matrix_homeserver_container_federation_url }}"
  2932. matrix_dimension_homeserver_mediaUrl: "{{ ('https' if matrix_playbook_ssl_enabled else 'http') }}://{{ matrix_server_fqn_matrix }}"
  2933. # Dimension depends both on `matrix_addons_homeserver_systemd_services_list` and on the homeserver service,
  2934. # because `matrix_dimension_homeserver_clientServerUrl` and `matrix_dimension_homeserver_federationUrl` are potentially
  2935. # going to different places.
  2936. matrix_dimension_systemd_required_services_list_auto: |
  2937. {{
  2938. (
  2939. matrix_addons_homeserver_systemd_services_list
  2940. +
  2941. ['matrix-' + matrix_homeserver_implementation + '.service']
  2942. +
  2943. ([postgres_identifier ~ '.service'] if (postgres_enabled and matrix_dimension_database_hostname == postgres_connection_hostname) else [])
  2944. ) | unique
  2945. }}
  2946. # Postgres is the default, except if not using internal Postgres server
  2947. matrix_dimension_database_engine: "{{ 'postgres' if postgres_enabled else 'sqlite' }}"
  2948. matrix_dimension_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  2949. matrix_dimension_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'dimension.db', rounds=655555) | to_uuid }}"
  2950. ######################################################################
  2951. #
  2952. # /matrix-dimension
  2953. #
  2954. ######################################################################
  2955. ######################################################################
  2956. #
  2957. # etherpad
  2958. #
  2959. ######################################################################
  2960. etherpad_enabled: false
  2961. etherpad_identifier: matrix-etherpad
  2962. etherpad_scheme: "{{ 'https' if matrix_playbook_ssl_enabled else 'http' }}"
  2963. etherpad_base_path: "{{ matrix_base_data_path }}/etherpad"
  2964. etherpad_framing_enabled: "{{ matrix_dimension_enabled or jitsi_enabled }}"
  2965. etherpad_hostname: "{{ matrix_server_fqn_etherpad }}"
  2966. 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 }}"
  2967. etherpad_container_image_self_build: "{{ matrix_architecture not in ['amd64'] }}"
  2968. etherpad_container_http_host_bind_port: "{{ (matrix_playbook_service_host_bind_interface_prefix ~ '9001') if matrix_playbook_service_host_bind_interface_prefix else '' }}"
  2969. etherpad_container_network: "{{ matrix_addons_container_network }}"
  2970. etherpad_container_additional_networks_auto: |
  2971. {{
  2972. (
  2973. ([matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network else [])
  2974. +
  2975. ([postgres_container_network] if postgres_enabled and postgres_container_network != etherpad_container_network else [])
  2976. ) | unique
  2977. }}
  2978. etherpad_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  2979. etherpad_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  2980. etherpad_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  2981. etherpad_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  2982. etherpad_systemd_required_services_list_auto: |
  2983. {{
  2984. ([postgres_identifier ~ '.service'] if postgres_enabled else [])
  2985. }}
  2986. etherpad_database_postgres_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  2987. etherpad_database_name: matrix_etherpad
  2988. etherpad_database_postgres_username: matrix_etherpad
  2989. etherpad_database_postgres_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'etherpad.db', rounds=655555) | to_uuid }}"
  2990. ######################################################################
  2991. #
  2992. # /etherpad
  2993. #
  2994. ######################################################################
  2995. ######################################################################
  2996. #
  2997. # matrix-dynamic-dns
  2998. #
  2999. ######################################################################
  3000. matrix_dynamic_dns_enabled: false
  3001. 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 }}"
  3002. matrix_dynamic_dns_container_network: matrix-dynamic-dns
  3003. ######################################################################
  3004. #
  3005. # /matrix-dynamic-dns
  3006. #
  3007. ######################################################################
  3008. ######################################################################
  3009. #
  3010. # jitsi
  3011. #
  3012. ######################################################################
  3013. jitsi_enabled: false
  3014. jitsi_architecture: "{{ matrix_architecture }}"
  3015. jitsi_hostname: "{{ matrix_server_fqn_jitsi }}"
  3016. jitsi_identifier: matrix-jitsi
  3017. jitsi_base_path: "{{ matrix_base_data_path }}/jitsi"
  3018. jitsi_uid: "{{ matrix_user_uid }}"
  3019. jitsi_gid: "{{ matrix_user_gid }}"
  3020. jitsi_user_username: "{{ matrix_user_name }}"
  3021. 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 }}"
  3022. jitsi_web_container_http_host_bind_port: "{{ (matrix_playbook_service_host_bind_interface_prefix ~ '13080') if matrix_playbook_service_host_bind_interface_prefix else '' }}"
  3023. jitsi_web_container_additional_networks_auto: |
  3024. {{
  3025. ([matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network else [])
  3026. }}
  3027. 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 }}"
  3028. 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 '' }}"
  3029. jitsi_jvb_container_additional_networks_auto: |
  3030. {{
  3031. ([matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network else [])
  3032. }}
  3033. 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 }}"
  3034. jitsi_prosody_container_http_host_bind_port: "{{ (matrix_playbook_service_host_bind_interface_prefix ~ '5280') if matrix_playbook_service_host_bind_interface_prefix else '' }}"
  3035. jitsi_prosody_container_additional_networks_auto: |
  3036. {{
  3037. ([matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network else [])
  3038. }}
  3039. 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 }}"
  3040. jitsi_container_labels_traefik_enabled: "{{ matrix_playbook_traefik_labels_enabled }}"
  3041. jitsi_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  3042. jitsi_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  3043. jitsi_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  3044. jitsi_jibri_xmpp_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'jibri', rounds=655555) | to_uuid }}"
  3045. jitsi_jicofo_auth_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'jicofo', rounds=655555) | to_uuid }}"
  3046. jitsi_jvb_auth_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'jvb', rounds=655555) | to_uuid }}"
  3047. jitsi_web_stun_servers: |
  3048. {{
  3049. [
  3050. 'stun:' + matrix_server_fqn_matrix + ':5349',
  3051. 'stun:' + matrix_server_fqn_matrix + ':3478',
  3052. ]
  3053. if matrix_coturn_enabled
  3054. else [ 'stun:meet-jit-si-turnrelay.jitsi.net:443']
  3055. }}
  3056. # The Jitsi instance installed by this playbook is meant for embedding into Matrix clients, so framing is allowed.
  3057. jitsi_web_framing_enabled: true
  3058. # Jitsi (Prosody) only seems to support authenticating with coturn using `auth-secret`, not `lt-cred-mech`.
  3059. # See: https://prosody.im/doc/coturn
  3060. jitsi_turn_credentials: "{{ matrix_coturn_turn_static_auth_secret if (matrix_coturn_enabled and matrix_coturn_authentication_method == 'auth-secret') else '' }}"
  3061. jitsi_turn_host: "{{ ('turn.' + matrix_server_fqn_matrix) if matrix_coturn_enabled else '' }}"
  3062. jitsi_turns_host: "{{ ('turn.' + matrix_server_fqn_matrix) if matrix_coturn_enabled else '' }}"
  3063. jitsi_turn_port: "{{ matrix_coturn_container_stun_plain_host_bind_port_tcp.split(':')[-1] if matrix_coturn_enabled else '' }}"
  3064. jitsi_turns_port: "{{ matrix_coturn_container_stun_tls_host_bind_port_tcp.split(':')[-1] if matrix_coturn_enabled else '' }}"
  3065. # If the self-hosted Etherpad instance is available, it will also show up in Jitsi conferences,
  3066. # unless explicitly disabled by setting `jitsi_etherpad_enabled` to false.
  3067. # Falls back to the scalar.vector.im etherpad in case someone sets `jitsi_etherpad_enabled` to true,
  3068. # while also setting `etherpad_enabled` to false.
  3069. jitsi_etherpad_enabled: "{{ etherpad_enabled }}"
  3070. jitsi_etherpad_base: "{{ etherpad_base_url if etherpad_enabled else 'https://scalar.vector.im/etherpad' }}"
  3071. # Allow verification using JWT and matrix-UVS
  3072. jitsi_prosody_auth_matrix_uvs_sync_power_levels: "{{ matrix_user_verification_service_enabled }}"
  3073. jitsi_prosody_auth_matrix_uvs_auth_token: "{{ matrix_user_verification_service_uvs_auth_token }}"
  3074. jitsi_prosody_auth_matrix_uvs_location: "{{ matrix_user_verification_service_container_url }}"
  3075. jitsi_self_check_validate_certificates: "{{ matrix_playbook_ssl_enabled }}"
  3076. # Gravatar is enabled by default upstream, but there's no need to leak data there needlessly
  3077. # when embedding Jitsi in Matrix rooms.
  3078. jitsi_disable_gravatar: true
  3079. ######################################################################
  3080. #
  3081. # /jitsi
  3082. #
  3083. ######################################################################
  3084. ######################################################################
  3085. #
  3086. # matrix-ldap-registration-proxy
  3087. #
  3088. ######################################################################
  3089. # This is only for users with a specific LDAP setup
  3090. matrix_ldap_registration_proxy_enabled: false
  3091. matrix_ldap_registration_proxy_hostname: "{{ matrix_server_fqn_matrix }}"
  3092. matrix_ldap_registration_proxy_matrix_server_url: "{{ matrix_addons_homeserver_client_api_url }}"
  3093. matrix_ldap_registration_proxy_systemd_required_services_list_auto: |
  3094. {{
  3095. matrix_addons_homeserver_systemd_services_list
  3096. }}
  3097. 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 }}"
  3098. matrix_ldap_registration_proxy_container_network: "{{ matrix_addons_container_network }}"
  3099. matrix_ldap_registration_proxy_container_additional_networks_auto: |-
  3100. {{
  3101. (
  3102. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  3103. +
  3104. ([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 [])
  3105. ) | unique
  3106. }}
  3107. matrix_ldap_registration_proxy_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  3108. matrix_ldap_registration_proxy_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  3109. matrix_ldap_registration_proxy_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  3110. matrix_ldap_registration_proxy_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  3111. ######################################################################
  3112. #
  3113. # /matrix-ldap-registration-proxy
  3114. #
  3115. ######################################################################
  3116. ########################################################################
  3117. # #
  3118. # exim-relay #
  3119. # #
  3120. ########################################################################
  3121. # We set up an Exim email relay by default.
  3122. # This is so that the homeserver and various other services can send emails through it.
  3123. # To completely disable this service, use: `exim_relay_enabled: false`
  3124. exim_relay_identifier: "matrix-exim-relay"
  3125. exim_relay_base_path: "{{ matrix_base_data_path }}/exim-relay"
  3126. exim_relay_uid: "{{ matrix_user_uid }}"
  3127. exim_relay_gid: "{{ matrix_user_gid }}"
  3128. exim_relay_hostname: "{{ matrix_server_fqn_matrix }}"
  3129. exim_relay_sender_address: "matrix@{{ exim_relay_hostname }}"
  3130. 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 }}"
  3131. exim_relay_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm32', 'arm64'] }}"
  3132. ########################################################################
  3133. # #
  3134. # /exim-relay #
  3135. # #
  3136. ########################################################################
  3137. ######################################################################
  3138. #
  3139. # matrix-ma1sd
  3140. #
  3141. ######################################################################
  3142. # We no longer install the ma1sd identity server by default.
  3143. #
  3144. # The main reason we used to install ma1sd by default in the past was to
  3145. # prevent Element from talking to the `matrix.org` / `vector.im` identity servers,
  3146. # by forcing it to talk to our own self-hosted (but otherwise useless) identity server instead,
  3147. # thus preventing contact list leaks.
  3148. #
  3149. # Since Element no longer defaults to using a public identity server if another one is not provided,
  3150. # we can stop installing ma1sd.
  3151. matrix_ma1sd_enabled: false
  3152. matrix_ma1sd_scheme: "{{ 'https' if matrix_playbook_ssl_enabled else 'http' }}"
  3153. matrix_ma1sd_hostname: "{{ matrix_server_fqn_matrix }}"
  3154. 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 }}"
  3155. matrix_ma1sd_container_image_self_build: "{{ matrix_architecture != 'amd64' }}"
  3156. 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 '' }}"
  3157. matrix_ma1sd_container_network: "{{ matrix_homeserver_container_network }}"
  3158. matrix_ma1sd_container_additional_networks_auto: |
  3159. {{
  3160. (
  3161. ([matrix_homeserver_container_network] if (matrix_ma1sd_container_network != matrix_homeserver_container_network) else [])
  3162. +
  3163. ([postgres_container_network] if (postgres_enabled and matrix_ma1sd_database_hostname == postgres_connection_hostname and matrix_ma1sd_container_network != postgres_container_network) else [])
  3164. +
  3165. ([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 [])
  3166. +
  3167. ([matrix_playbook_reverse_proxyable_services_additional_network] if (matrix_playbook_reverse_proxyable_services_additional_network and matrix_ma1sd_container_labels_traefik_enabled) else [])
  3168. ) | unique
  3169. }}
  3170. matrix_ma1sd_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  3171. matrix_ma1sd_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  3172. matrix_ma1sd_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  3173. matrix_ma1sd_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  3174. # We enable Synapse integration via its Postgres database by default.
  3175. # When using another Identity store, you might wish to disable this and define
  3176. # your own configuration in `matrix_ma1sd_configuration_extension_yaml`.
  3177. matrix_ma1sd_synapsesql_enabled: true
  3178. matrix_ma1sd_synapsesql_type: postgresql
  3179. matrix_ma1sd_synapsesql_connection: //{{ matrix_synapse_database_host }}/{{ matrix_synapse_database_database }}?user={{ matrix_synapse_database_user | urlencode() }}&password={{ matrix_synapse_database_password | urlencode() }}
  3180. matrix_ma1sd_dns_overwrite_enabled: true
  3181. matrix_ma1sd_dns_overwrite_homeserver_client_name: "{{ matrix_server_fqn_matrix }}"
  3182. matrix_ma1sd_dns_overwrite_homeserver_client_value: "{{ matrix_addons_homeserver_client_api_url }}"
  3183. # By default, we send mail through the exim relay service.
  3184. matrix_ma1sd_threepid_medium_email_identity_from: "{{ exim_relay_sender_address }}"
  3185. matrix_ma1sd_threepid_medium_email_connectors_smtp_host: "{{ exim_relay_identifier }}"
  3186. matrix_ma1sd_threepid_medium_email_connectors_smtp_port: 8025
  3187. matrix_ma1sd_threepid_medium_email_connectors_smtp_tls: 0
  3188. matrix_ma1sd_self_check_validate_certificates: "{{ matrix_playbook_ssl_enabled }}"
  3189. matrix_ma1sd_systemd_required_services_list_auto: |
  3190. {{
  3191. matrix_addons_homeserver_systemd_services_list
  3192. +
  3193. ([postgres_identifier ~ '.service'] if (postgres_enabled and matrix_ma1sd_database_hostname == postgres_connection_hostname) else [])
  3194. }}
  3195. matrix_ma1sd_systemd_wanted_services_list_auto: |
  3196. {{
  3197. ([exim_relay_identifier ~ '.service'] if (exim_relay_enabled and matrix_ma1sd_threepid_medium_email_connectors_smtp_host == exim_relay_identifier) else [])
  3198. }}
  3199. # Postgres is the default, except if not using internal Postgres server
  3200. matrix_ma1sd_database_engine: "{{ 'postgres' if postgres_enabled else 'sqlite' }}"
  3201. matrix_ma1sd_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  3202. matrix_ma1sd_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'ma1sd.db', rounds=655555) | to_uuid }}"
  3203. ######################################################################
  3204. #
  3205. # /matrix-ma1sd
  3206. #
  3207. ######################################################################
  3208. ######################################################################
  3209. #
  3210. # matrix-media-repo
  3211. #
  3212. ######################################################################
  3213. matrix_media_repo_enabled: false
  3214. 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 }}"
  3215. matrix_media_repo_container_network: "{{ matrix_homeserver_container_network }}"
  3216. matrix_media_repo_container_additional_networks: |
  3217. {{
  3218. (
  3219. ([matrix_homeserver_container_network] if (matrix_media_repo_container_network != matrix_homeserver_container_network) else [])
  3220. +
  3221. ([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 [])
  3222. +
  3223. ([matrix_playbook_reverse_proxyable_services_additional_network] if (matrix_playbook_reverse_proxyable_services_additional_network and matrix_media_repo_container_labels_traefik_enabled) else [])
  3224. ) | unique
  3225. }}
  3226. matrix_media_repo_container_labels_traefik_enabled: "{{ matrix_playbook_traefik_labels_enabled }}"
  3227. matrix_media_repo_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  3228. matrix_media_repo_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  3229. matrix_media_repo_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  3230. matrix_media_repo_container_labels_traefik_internal_media_enabled: "{{ matrix_playbook_internal_matrix_client_api_traefik_entrypoint_enabled }}"
  3231. matrix_media_repo_container_labels_traefik_internal_media_entrypoints: "{{ matrix_playbook_internal_matrix_client_api_traefik_entrypoint_name }}"
  3232. matrix_media_repo_container_labels_traefik_internal_matrix_client_media_enabled: "{{ matrix_playbook_internal_matrix_client_api_traefik_entrypoint_enabled }}"
  3233. matrix_media_repo_container_labels_traefik_internal_matrix_client_media_entrypoints: "{{ matrix_playbook_internal_matrix_client_api_traefik_entrypoint_name }}"
  3234. matrix_media_repo_metrics_proxying_enabled: "{{ matrix_media_repo_metrics_enabled and matrix_metrics_exposure_enabled }}"
  3235. matrix_media_repo_metrics_proxying_hostname: "{{ matrix_metrics_exposure_hostname }}"
  3236. matrix_media_repo_metrics_proxying_path: "{{ matrix_metrics_exposure_path_prefix }}/matrix-media-repo"
  3237. matrix_media_repo_container_labels_traefik_metrics_middleware_basic_auth_enabled: "{{ matrix_metrics_exposure_http_basic_auth_enabled }}"
  3238. matrix_media_repo_container_labels_traefik_metrics_middleware_basic_auth_users: "{{ matrix_metrics_exposure_http_basic_auth_users }}"
  3239. matrix_media_repo_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  3240. matrix_media_repo_database_username: matrix_media_repo
  3241. matrix_media_repo_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mediarepo.db', rounds=655555) | to_uuid }}"
  3242. matrix_media_repo_database_name: matrix_media_repo
  3243. matrix_media_repo_systemd_required_services_list_auto: |
  3244. {{
  3245. matrix_addons_homeserver_systemd_services_list
  3246. +
  3247. ([postgres_identifier ~ '.service'] if postgres_enabled and matrix_media_repo_database_hostname == postgres_connection_hostname else [])
  3248. }}
  3249. matrix_media_repo_generate_signing_key: "{{ matrix_homeserver_implementation == 'synapse' or matrix_homeserver_implementation == 'dendrite'}}"
  3250. 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 '') }}"
  3251. matrix_media_repo_synapse_signing_key: "{{ matrix_synapse_config_dir_path }}/{{ matrix_server_fqn_matrix }}.signing.key"
  3252. matrix_media_repo_dendrite_signing_key: "{{ matrix_dendrite_config_dir_path }}/{{ matrix_server_fqn_matrix }}.signing.pem"
  3253. # Auto configured server setup by the playbook
  3254. matrix_media_repo_homeservers_auto:
  3255. - # Keep the dash from this line.
  3256. # This should match the server_name of your homeserver, and the Host header
  3257. # provided to the media repo.
  3258. name: "{{ matrix_domain }}"
  3259. # The base URL to where the homeserver can actually be reached by MMR.
  3260. csApi: "{{ matrix_homeserver_container_url }}"
  3261. # The number of consecutive failures in calling this homeserver before the
  3262. # media repository will start backing off. This defaults to 10 if not given.
  3263. backoffAt: 10
  3264. # The admin API interface supported by the homeserver. MMR uses a subset of the admin API
  3265. # during certain operations, like attempting to purge media from a room or validating server
  3266. # admin status. This should be set to one of "synapse", "dendrite", or "matrix". When set
  3267. # to "matrix", most functionality requiring the admin API will not work.
  3268. adminApiKind: "{{ 'synapse' if matrix_homeserver_implementation == 'synapse' else ('dendrite' if matrix_homeserver_implementation == 'dendrite' else 'matrix') }}"
  3269. # The signing key to use for authorizing outbound federation requests. If not specified,
  3270. # requests will not be authorized. See https://docs.t2bot.io/matrix-media-repo/v1.3.5/installation/signing-key/
  3271. # for details.
  3272. signingKeyPath: "{{ '/config/' + matrix_media_repo_identifier + '.signing.key' if matrix_media_repo_generate_signing_key else '' }}"
  3273. matrix_media_repo_homeserver_federation_enabled: "{{ matrix_homeserver_federation_enabled }}"
  3274. ######################################################################
  3275. #
  3276. # /matrix-media-repo
  3277. #
  3278. ######################################################################
  3279. ########################################################################
  3280. # #
  3281. # postgres #
  3282. # #
  3283. ########################################################################
  3284. # To completely disable installing Postgres, use `postgres_enabled: false`.
  3285. postgres_identifier: matrix-postgres
  3286. postgres_architecture: "{{ matrix_architecture }}"
  3287. postgres_base_path: "{{ matrix_base_data_path }}/postgres"
  3288. postgres_uid: "{{ matrix_user_uid }}"
  3289. postgres_gid: "{{ matrix_user_gid }}"
  3290. 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 [] }}"
  3291. postgres_connection_username: matrix
  3292. postgres_db_name: matrix
  3293. postgres_systemd_services_to_stop_for_maintenance_list_auto: "{{ devture_systemd_service_manager_services_list_auto | map(attribute='name') | reject('equalto', (postgres_identifier + '.service')) }}"
  3294. postgres_max_connections: "{{ 500 if matrix_synapse_workers_enabled else 200 }}"
  3295. 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 }}"
  3296. 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 }}"
  3297. postgres_managed_databases_auto: |
  3298. {{
  3299. ([{
  3300. 'name': matrix_synapse_database_database,
  3301. 'username': matrix_synapse_database_user,
  3302. 'password': matrix_synapse_database_password,
  3303. }] if (matrix_synapse_enabled and matrix_synapse_database_host == postgres_connection_hostname) else [])
  3304. +
  3305. ([{
  3306. 'name': matrix_dendrite_federation_api_database,
  3307. 'username': matrix_dendrite_database_user,
  3308. 'password': matrix_dendrite_database_password,
  3309. },{
  3310. 'name': matrix_dendrite_key_server_database,
  3311. 'username': matrix_dendrite_database_user,
  3312. 'password': matrix_dendrite_database_password,
  3313. },{
  3314. 'name': matrix_dendrite_media_api_database,
  3315. 'username': matrix_dendrite_database_user,
  3316. 'password': matrix_dendrite_database_password,
  3317. },{
  3318. 'name': matrix_dendrite_room_database,
  3319. 'username': matrix_dendrite_database_user,
  3320. 'password': matrix_dendrite_database_password,
  3321. },{
  3322. 'name': matrix_dendrite_sync_api_database,
  3323. 'username': matrix_dendrite_database_user,
  3324. 'password': matrix_dendrite_database_password,
  3325. },{
  3326. 'name': matrix_dendrite_user_api_database,
  3327. 'username': matrix_dendrite_database_user,
  3328. 'password': matrix_dendrite_database_password,
  3329. },{
  3330. 'name': matrix_dendrite_relay_api_database,
  3331. 'username': matrix_dendrite_database_user,
  3332. 'password': matrix_dendrite_database_password,
  3333. },{
  3334. 'name': matrix_dendrite_push_server_database,
  3335. 'username': matrix_dendrite_database_user,
  3336. 'password': matrix_dendrite_database_password,
  3337. },{
  3338. 'name': matrix_dendrite_mscs_database,
  3339. 'username': matrix_dendrite_database_user,
  3340. 'password': matrix_dendrite_database_password,
  3341. }] if (matrix_dendrite_enabled and matrix_dendrite_database_hostname == postgres_connection_hostname) else [])
  3342. +
  3343. ([{
  3344. 'name': matrix_authentication_service_config_database_database,
  3345. 'username': matrix_authentication_service_config_database_username,
  3346. 'password': matrix_authentication_service_config_database_password,
  3347. }] if (matrix_authentication_service_enabled and matrix_authentication_service_config_database_host == postgres_connection_hostname) else [])
  3348. +
  3349. ([{
  3350. 'name': matrix_sliding_sync_database_name,
  3351. 'username': matrix_sliding_sync_database_username,
  3352. 'password': matrix_sliding_sync_database_password,
  3353. }] if (matrix_sliding_sync_enabled) else [])
  3354. +
  3355. ([{
  3356. 'name': matrix_ma1sd_database_name,
  3357. 'username': matrix_ma1sd_database_username,
  3358. 'password': matrix_ma1sd_database_password,
  3359. }] if (matrix_ma1sd_enabled and matrix_ma1sd_database_engine == 'postgres' and matrix_ma1sd_database_hostname == postgres_connection_hostname) else [])
  3360. +
  3361. ([{
  3362. 'name': matrix_bot_matrix_reminder_bot_database_name,
  3363. 'username': matrix_bot_matrix_reminder_bot_database_username,
  3364. 'password': matrix_bot_matrix_reminder_bot_database_password,
  3365. }] 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 [])
  3366. +
  3367. ([{
  3368. 'name': matrix_bot_honoroit_database_name,
  3369. 'username': matrix_bot_honoroit_database_username,
  3370. 'password': matrix_bot_honoroit_database_password,
  3371. }] if (matrix_bot_honoroit_enabled and matrix_bot_honoroit_database_engine == 'postgres' and matrix_bot_honoroit_database_hostname == postgres_connection_hostname) else [])
  3372. +
  3373. ([{
  3374. 'name': matrix_postmoogle_database_name,
  3375. 'username': matrix_postmoogle_database_username,
  3376. 'password': matrix_postmoogle_database_password,
  3377. }] if (matrix_postmoogle_enabled and matrix_postmoogle_database_engine == 'postgres' and matrix_postmoogle_database_hostname == postgres_connection_hostname) else [])
  3378. +
  3379. ([{
  3380. 'name': matrix_bot_maubot_database_name,
  3381. 'username': matrix_bot_maubot_database_username,
  3382. 'password': matrix_bot_maubot_database_password,
  3383. }] if (matrix_bot_maubot_enabled and matrix_bot_maubot_database_engine == 'postgres' and matrix_bot_maubot_database_hostname == postgres_connection_hostname) else [])
  3384. +
  3385. ([{
  3386. 'name': matrix_bot_buscarron_database_name,
  3387. 'username': matrix_bot_buscarron_database_username,
  3388. 'password': matrix_bot_buscarron_database_password,
  3389. }] if (matrix_bot_buscarron_enabled and matrix_bot_buscarron_database_engine == 'postgres' and matrix_bot_buscarron_database_hostname == postgres_connection_hostname) else [])
  3390. +
  3391. ([{
  3392. 'name': matrix_registration_database_name,
  3393. 'username': matrix_registration_database_username,
  3394. 'password': matrix_registration_database_password,
  3395. }] if (matrix_registration_enabled and matrix_registration_database_engine == 'postgres' and matrix_registration_database_hostname == postgres_connection_hostname) else [])
  3396. +
  3397. ([{
  3398. 'name': matrix_appservice_discord_database_name,
  3399. 'username': matrix_appservice_discord_database_username,
  3400. 'password': matrix_appservice_discord_database_password,
  3401. }] if (matrix_appservice_discord_enabled and matrix_appservice_discord_database_engine == 'postgres' and matrix_appservice_discord_database_hostname == postgres_connection_hostname) else [])
  3402. +
  3403. ([{
  3404. 'name': matrix_appservice_draupnir_for_all_database_name,
  3405. 'username': matrix_appservice_draupnir_for_all_database_username,
  3406. 'password': matrix_appservice_draupnir_for_all_database_password,
  3407. }] if (matrix_appservice_draupnir_for_all_enabled and matrix_appservice_draupnir_for_all_database_hostname == postgres_connection_hostname) else [])
  3408. +
  3409. ([{
  3410. 'name': matrix_appservice_slack_database_name,
  3411. 'username': matrix_appservice_slack_database_username,
  3412. 'password': matrix_appservice_slack_database_password,
  3413. }] if (matrix_appservice_slack_enabled and matrix_appservice_slack_database_engine == 'postgres' and matrix_appservice_slack_database_hostname == postgres_connection_hostname) else [])
  3414. +
  3415. ([{
  3416. 'name': matrix_appservice_irc_database_name,
  3417. 'username': matrix_appservice_irc_database_username,
  3418. 'password': matrix_appservice_irc_database_password,
  3419. }] if (matrix_appservice_irc_enabled and matrix_appservice_irc_database_engine == 'postgres' and matrix_appservice_irc_database_hostname == postgres_connection_hostname) else [])
  3420. +
  3421. ([{
  3422. 'name': matrix_appservice_kakaotalk_database_name,
  3423. 'username': matrix_appservice_kakaotalk_database_username,
  3424. 'password': matrix_appservice_kakaotalk_database_password,
  3425. }] if (matrix_appservice_kakaotalk_enabled and matrix_appservice_kakaotalk_database_engine == 'postgres' and matrix_appservice_kakaotalk_database_hostname == postgres_connection_hostname) else [])
  3426. +
  3427. ([{
  3428. 'name': matrix_beeper_linkedin_database_name,
  3429. 'username': matrix_beeper_linkedin_database_username,
  3430. 'password': matrix_beeper_linkedin_database_password,
  3431. }] if (matrix_beeper_linkedin_enabled and matrix_beeper_linkedin_database_engine == 'postgres' and matrix_beeper_linkedin_database_hostname == postgres_connection_hostname) else [])
  3432. +
  3433. ([{
  3434. 'name': matrix_go_skype_bridge_database_name,
  3435. 'username': matrix_go_skype_bridge_database_username,
  3436. 'password': matrix_go_skype_bridge_database_password,
  3437. }] 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 [])
  3438. +
  3439. ([{
  3440. 'name': matrix_wechat_database_name,
  3441. 'username': matrix_wechat_database_username,
  3442. 'password': matrix_wechat_database_password,
  3443. }] if (matrix_wechat_enabled and matrix_wechat_database_engine == 'postgres' and matrix_wechat_database_hostname == postgres_connection_hostname) else [])
  3444. +
  3445. ([{
  3446. 'name': matrix_mautrix_bluesky_database_name,
  3447. 'username': matrix_mautrix_bluesky_database_username,
  3448. 'password': matrix_mautrix_bluesky_database_password,
  3449. }] if (matrix_mautrix_bluesky_enabled and matrix_mautrix_bluesky_database_engine == 'postgres' and matrix_mautrix_bluesky_database_hostname == postgres_connection_hostname) else [])
  3450. +
  3451. ([{
  3452. 'name': matrix_mautrix_facebook_database_name,
  3453. 'username': matrix_mautrix_facebook_database_username,
  3454. 'password': matrix_mautrix_facebook_database_password,
  3455. }] if (matrix_mautrix_facebook_enabled and matrix_mautrix_facebook_database_engine == 'postgres' and matrix_mautrix_facebook_database_hostname == postgres_connection_hostname) else [])
  3456. +
  3457. ([{
  3458. 'name': matrix_mautrix_googlechat_database_name,
  3459. 'username': matrix_mautrix_googlechat_database_username,
  3460. 'password': matrix_mautrix_googlechat_database_password,
  3461. }] if (matrix_mautrix_googlechat_enabled and matrix_mautrix_googlechat_database_engine == 'postgres' and matrix_mautrix_googlechat_database_hostname == postgres_connection_hostname) else [])
  3462. +
  3463. ([{
  3464. 'name': matrix_mautrix_instagram_database_name,
  3465. 'username': matrix_mautrix_instagram_database_username,
  3466. 'password': matrix_mautrix_instagram_database_password,
  3467. }] if (matrix_mautrix_instagram_enabled and matrix_mautrix_instagram_database_engine == 'postgres' and matrix_mautrix_instagram_database_hostname == postgres_connection_hostname) else [])
  3468. +
  3469. ([{
  3470. 'name': matrix_mautrix_signal_database_name,
  3471. 'username': matrix_mautrix_signal_database_username,
  3472. 'password': matrix_mautrix_signal_database_password,
  3473. }] if (matrix_mautrix_signal_enabled and matrix_mautrix_signal_database_engine == 'postgres' and matrix_mautrix_signal_database_hostname == postgres_connection_hostname) else [])
  3474. +
  3475. ([{
  3476. 'name': matrix_mautrix_meta_messenger_database_name,
  3477. 'username': matrix_mautrix_meta_messenger_database_username,
  3478. 'password': matrix_mautrix_meta_messenger_database_password,
  3479. }] 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 [])
  3480. +
  3481. ([{
  3482. 'name': matrix_mautrix_meta_instagram_database_name,
  3483. 'username': matrix_mautrix_meta_instagram_database_username,
  3484. 'password': matrix_mautrix_meta_instagram_database_password,
  3485. }] 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 [])
  3486. +
  3487. ([{
  3488. 'name': matrix_mautrix_wsproxy_syncproxy_database_name,
  3489. 'username': matrix_mautrix_wsproxy_syncproxy_database_username,
  3490. 'password': matrix_mautrix_wsproxy_syncproxy_database_password,
  3491. }] if (matrix_mautrix_wsproxy_enabled and matrix_mautrix_wsproxy_syncproxy_database_engine == 'postgres' and matrix_mautrix_wsproxy_syncproxy_database_hostname == 'matrix-postgres') else [])
  3492. +
  3493. ([{
  3494. 'name': matrix_mautrix_telegram_database_name,
  3495. 'username': matrix_mautrix_telegram_database_username,
  3496. 'password': matrix_mautrix_telegram_database_password,
  3497. }] if (matrix_mautrix_telegram_enabled and matrix_mautrix_telegram_database_engine == 'postgres' and matrix_mautrix_telegram_database_hostname == postgres_connection_hostname) else [])
  3498. +
  3499. ([{
  3500. 'name': matrix_mautrix_twitter_database_name,
  3501. 'username': matrix_mautrix_twitter_database_username,
  3502. 'password': matrix_mautrix_twitter_database_password,
  3503. }] if (matrix_mautrix_twitter_enabled and matrix_mautrix_twitter_database_engine == 'postgres' and matrix_mautrix_twitter_database_hostname == postgres_connection_hostname) else [])
  3504. +
  3505. ([{
  3506. 'name': matrix_mautrix_gmessages_database_name,
  3507. 'username': matrix_mautrix_gmessages_database_username,
  3508. 'password': matrix_mautrix_gmessages_database_password,
  3509. }] if (matrix_mautrix_gmessages_enabled and matrix_mautrix_gmessages_database_engine == 'postgres' and matrix_mautrix_gmessages_database_hostname == postgres_connection_hostname) else [])
  3510. +
  3511. ([{
  3512. 'name': matrix_mautrix_whatsapp_database_name,
  3513. 'username': matrix_mautrix_whatsapp_database_username,
  3514. 'password': matrix_mautrix_whatsapp_database_password,
  3515. }] if (matrix_mautrix_whatsapp_enabled and matrix_mautrix_whatsapp_database_engine == 'postgres' and matrix_mautrix_whatsapp_database_hostname == postgres_connection_hostname) else [])
  3516. +
  3517. ([{
  3518. 'name': matrix_mautrix_discord_database_name,
  3519. 'username': matrix_mautrix_discord_database_username,
  3520. 'password': matrix_mautrix_discord_database_password,
  3521. }] if (matrix_mautrix_discord_enabled and matrix_mautrix_discord_database_engine == 'postgres' and matrix_mautrix_discord_database_hostname == postgres_connection_hostname) else [])
  3522. +
  3523. ([{
  3524. 'name': matrix_mautrix_slack_database_name,
  3525. 'username': matrix_mautrix_slack_database_username,
  3526. 'password': matrix_mautrix_slack_database_password,
  3527. }] if (matrix_mautrix_slack_enabled and matrix_mautrix_slack_database_engine == 'postgres' and matrix_mautrix_slack_database_hostname == postgres_connection_hostname) else [])
  3528. +
  3529. ([{
  3530. 'name': matrix_mx_puppet_slack_database_name,
  3531. 'username': matrix_mx_puppet_slack_database_username,
  3532. 'password': matrix_mx_puppet_slack_database_password,
  3533. }] 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 [])
  3534. +
  3535. ([{
  3536. 'name': matrix_mx_puppet_twitter_database_name,
  3537. 'username': matrix_mx_puppet_twitter_database_username,
  3538. 'password': matrix_mx_puppet_twitter_database_password,
  3539. }] 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 [])
  3540. +
  3541. ([{
  3542. 'name': matrix_mx_puppet_instagram_database_name,
  3543. 'username': matrix_mx_puppet_instagram_database_username,
  3544. 'password': matrix_mx_puppet_instagram_database_password,
  3545. }] 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 [])
  3546. +
  3547. ([{
  3548. 'name': matrix_mx_puppet_discord_database_name,
  3549. 'username': matrix_mx_puppet_discord_database_username,
  3550. 'password': matrix_mx_puppet_discord_database_password,
  3551. }] 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 [])
  3552. +
  3553. ([{
  3554. 'name': matrix_mx_puppet_steam_database_name,
  3555. 'username': matrix_mx_puppet_steam_database_username,
  3556. 'password': matrix_mx_puppet_steam_database_password,
  3557. }] 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 [])
  3558. +
  3559. ([{
  3560. 'name': matrix_mx_puppet_groupme_database_name,
  3561. 'username': matrix_mx_puppet_groupme_database_username,
  3562. 'password': matrix_mx_puppet_groupme_database_password,
  3563. }] 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 [])
  3564. +
  3565. ([{
  3566. 'name': matrix_steam_bridge_database_name,
  3567. 'username': matrix_steam_bridge_database_username,
  3568. 'password': matrix_steam_bridge_database_password,
  3569. }] if (matrix_steam_bridge_enabled and matrix_steam_bridge_database_engine == 'postgres' and matrix_steam_bridge_database_hostname == postgres_connection_hostname) else [])
  3570. +
  3571. ([{
  3572. 'name': matrix_dimension_database_name,
  3573. 'username': matrix_dimension_database_username,
  3574. 'password': matrix_dimension_database_password,
  3575. }] if (matrix_dimension_enabled and matrix_dimension_database_engine == 'postgres' and matrix_dimension_database_hostname == postgres_connection_hostname) else [])
  3576. +
  3577. ([{
  3578. 'name': etherpad_database_name,
  3579. 'username': etherpad_database_postgres_username,
  3580. 'password': etherpad_database_postgres_password,
  3581. }] if (etherpad_enabled and etherpad_database_type == 'postgres' and etherpad_database_postgres_hostname == postgres_connection_hostname) else [])
  3582. +
  3583. ([{
  3584. 'name': prometheus_postgres_exporter_database_name,
  3585. 'username': prometheus_postgres_exporter_database_username,
  3586. 'password': prometheus_postgres_exporter_database_password,
  3587. }] if (prometheus_postgres_exporter_enabled and prometheus_postgres_exporter_database_hostname == postgres_connection_hostname) else [])
  3588. +
  3589. ([{
  3590. 'name': matrix_media_repo_database_name,
  3591. 'username': matrix_media_repo_database_username,
  3592. 'password': matrix_media_repo_database_password,
  3593. }] if (matrix_media_repo_enabled and matrix_media_repo_database_hostname == postgres_connection_hostname) else [])
  3594. }}
  3595. ########################################################################
  3596. # #
  3597. # /postgres #
  3598. # #
  3599. ########################################################################
  3600. ########################################################################
  3601. # #
  3602. # postgres_backup #
  3603. # #
  3604. ########################################################################
  3605. postgres_backup_enabled: false
  3606. postgres_backup_identifier: matrix-postgres-backup
  3607. postgres_backup_architecture: "{{ matrix_architecture }}"
  3608. postgres_backup_base_path: "{{ matrix_base_data_path }}/postgres-backup"
  3609. postgres_backup_systemd_required_services_list_auto: |
  3610. {{
  3611. ([(postgres_identifier + '.service')] if (postgres_enabled and postgres_backup_connection_hostname == postgres_connection_hostname) else [])
  3612. }}
  3613. 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 }}"
  3614. postgres_backup_container_network: "{{ (postgres_container_network if (postgres_enabled and postgres_backup_connection_hostname == postgres_connection_hostname) else postgres_backup_identifier) }}"
  3615. postgres_backup_container_additional_networks_auto: |-
  3616. {{
  3617. ([postgres_container_network] if (postgres_enabled and postgres_backup_connection_hostname == postgres_connection_hostname and postgres_backup_container_network != postgres_container_network) else [])
  3618. }}
  3619. postgres_backup_uid: "{{ matrix_user_uid }}"
  3620. postgres_backup_gid: "{{ matrix_user_gid }}"
  3621. postgres_backup_connection_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  3622. postgres_backup_connection_port: "{{ postgres_connection_port if postgres_enabled else 5432 }}"
  3623. postgres_backup_connection_username: "{{ postgres_connection_username if postgres_enabled else '' }}"
  3624. postgres_backup_connection_password: "{{ postgres_connection_password if postgres_enabled else '' }}"
  3625. postgres_backup_postgres_data_path: "{{ postgres_data_path if postgres_enabled else '' }}"
  3626. postgres_backup_postgres_role_include_name: galaxy/postgres
  3627. postgres_backup_databases_auto: "{{ postgres_managed_databases | map(attribute='name') if postgres_enabled else [] }}"
  3628. ########################################################################
  3629. # #
  3630. # /postgres_backup #
  3631. # #
  3632. ########################################################################
  3633. ######################################################################
  3634. #
  3635. # matrix-sygnal
  3636. #
  3637. ######################################################################
  3638. # Most people don't need their own push-server, because they also need their own app to utilize it from.
  3639. matrix_sygnal_enabled: false
  3640. matrix_sygnal_metrics_prometheus_enabled: "{{ prometheus_enabled or matrix_metrics_exposure_enabled }}"
  3641. matrix_sygnal_hostname: "{{ matrix_server_fqn_sygnal }}"
  3642. 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 }}"
  3643. matrix_sygnal_container_network: "{{ matrix_homeserver_container_network }}"
  3644. matrix_sygnal_container_additional_networks: "{{ [matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network else [] }}"
  3645. matrix_sygnal_container_http_host_bind_port: "{{ (matrix_playbook_service_host_bind_interface_prefix ~ '6000') if matrix_playbook_service_host_bind_interface_prefix else '' }}"
  3646. matrix_sygnal_container_labels_traefik_enabled: "{{ matrix_playbook_traefik_labels_enabled }}"
  3647. matrix_sygnal_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  3648. matrix_sygnal_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  3649. matrix_sygnal_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  3650. ######################################################################
  3651. #
  3652. # /matrix-sygnal
  3653. #
  3654. ######################################################################
  3655. ######################################################################
  3656. #
  3657. # ntfy
  3658. #
  3659. ######################################################################
  3660. ntfy_enabled: false
  3661. ntfy_identifier: matrix-ntfy
  3662. ntfy_base_path: "{{ matrix_base_data_path }}/ntfy"
  3663. ntfy_uid: "{{ matrix_user_uid }}"
  3664. ntfy_gid: "{{ matrix_user_gid }}"
  3665. ntfy_hostname: "{{ matrix_server_fqn_ntfy }}"
  3666. 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 }}"
  3667. ntfy_container_additional_networks_auto: "{{ [matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network else [] }}"
  3668. ntfy_container_http_host_bind_port: "{{ (matrix_playbook_service_host_bind_interface_prefix ~ '2586') if matrix_playbook_service_host_bind_interface_prefix else '' }}"
  3669. ntfy_container_labels_traefik_enabled: "{{ matrix_playbook_traefik_labels_enabled }}"
  3670. ntfy_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  3671. ntfy_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  3672. ntfy_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  3673. ntfy_visitor_request_limit_exempt_hosts_hostnames_auto: |
  3674. {{
  3675. [matrix_server_fqn_matrix]
  3676. }}
  3677. ######################################################################
  3678. #
  3679. # /ntfy
  3680. #
  3681. ######################################################################
  3682. ######################################################################
  3683. #
  3684. # valkey
  3685. #
  3686. ######################################################################
  3687. valkey_enabled: "{{ matrix_synapse_workers_enabled or (matrix_hookshot_enabled and matrix_hookshot_encryption_enabled) }}"
  3688. valkey_identifier: matrix-valkey
  3689. valkey_uid: "{{ matrix_user_uid }}"
  3690. valkey_gid: "{{ matrix_user_gid }}"
  3691. valkey_base_path: "{{ matrix_base_data_path }}/valkey"
  3692. valkey_arch: "{{ matrix_architecture }}"
  3693. 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 }}"
  3694. ######################################################################
  3695. #
  3696. # valkey
  3697. #
  3698. ######################################################################
  3699. ######################################################################
  3700. #
  3701. # matrix-client-element
  3702. #
  3703. ######################################################################
  3704. # By default, this playbook installs the Element Web on the `matrix_server_fqn_element` domain.
  3705. # If you wish to connect to your Matrix server by other means, you may wish to disable this.
  3706. matrix_client_element_enabled: true
  3707. matrix_client_element_scheme: "{{ 'https' if matrix_playbook_ssl_enabled else 'http' }}"
  3708. 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 }}"
  3709. matrix_client_element_container_image_self_build: "{{ matrix_architecture not in ['arm64', 'amd64'] }}"
  3710. 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 '' }}"
  3711. matrix_client_element_container_network: "{{ matrix_addons_container_network }}"
  3712. 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 [] }}"
  3713. matrix_client_element_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  3714. matrix_client_element_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  3715. matrix_client_element_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  3716. matrix_client_element_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  3717. matrix_client_element_container_labels_traefik_compression_middleware_enabled: "{{ matrix_playbook_reverse_proxy_traefik_middleware_compression_enabled }}"
  3718. 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 '' }}"
  3719. matrix_client_element_default_hs_url: "{{ matrix_homeserver_url }}"
  3720. matrix_client_element_default_is_url: "{{ matrix_identity_server_url }}"
  3721. # Use Dimension if enabled, otherwise fall back to Scalar
  3722. matrix_client_element_integrations_ui_url: "{{ matrix_dimension_integrations_ui_url if matrix_dimension_enabled else 'https://scalar.vector.im/' }}"
  3723. matrix_client_element_integrations_rest_url: "{{ matrix_dimension_integrations_rest_url if matrix_dimension_enabled else 'https://scalar.vector.im/api' }}"
  3724. matrix_client_element_integrations_widgets_urls: "{{ matrix_dimension_integrations_widgets_urls if matrix_dimension_enabled else ['https://scalar.vector.im/api'] }}"
  3725. 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' }}"
  3726. matrix_client_element_self_check_validate_certificates: "{{ matrix_playbook_ssl_enabled }}"
  3727. matrix_client_element_registration_enabled: "{{ matrix_synapse_enable_registration }}"
  3728. matrix_client_element_enable_presence_by_hs_url: |-
  3729. {{
  3730. none
  3731. if matrix_synapse_presence_enabled
  3732. else {matrix_client_element_default_hs_url: false}
  3733. }}
  3734. matrix_client_element_jitsi_preferred_domain: "{{ matrix_server_fqn_jitsi if jitsi_enabled else '' }}"
  3735. matrix_client_element_features_feature_video_rooms: "{{ matrix_rtc_enabled }}"
  3736. matrix_client_element_features_feature_group_calls: "{{ matrix_rtc_enabled }}"
  3737. matrix_client_element_features_feature_element_call_video_rooms: "{{ matrix_rtc_enabled }}"
  3738. matrix_client_element_features_feature_oidc_native_flow: "{{ matrix_authentication_service_enabled }}"
  3739. matrix_client_element_element_call_enabled: "{{ matrix_element_call_enabled }}"
  3740. matrix_client_element_element_call_url: "{{ matrix_element_call_public_url if matrix_element_call_enabled else '' }}"
  3741. ######################################################################
  3742. #
  3743. # /matrix-client-element
  3744. #
  3745. ######################################################################
  3746. ######################################################################
  3747. #
  3748. # matrix-client-hydrogen
  3749. #
  3750. ######################################################################
  3751. matrix_client_hydrogen_enabled: false
  3752. 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 }}"
  3753. matrix_client_hydrogen_container_image_self_build: "{{ matrix_architecture not in ['arm64', 'amd64'] }}"
  3754. 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 '' }}"
  3755. matrix_client_hydrogen_container_network: "{{ matrix_addons_container_network }}"
  3756. 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 [] }}"
  3757. matrix_client_hydrogen_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  3758. matrix_client_hydrogen_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  3759. matrix_client_hydrogen_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  3760. matrix_client_hydrogen_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  3761. matrix_client_hydrogen_container_labels_traefik_compression_middleware_enabled: "{{ matrix_playbook_reverse_proxy_traefik_middleware_compression_enabled }}"
  3762. 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 '' }}"
  3763. matrix_client_hydrogen_scheme: "{{ 'https' if matrix_playbook_ssl_enabled else 'http' }}"
  3764. matrix_client_hydrogen_default_hs_url: "{{ matrix_homeserver_url }}"
  3765. matrix_client_hydrogen_self_check_validate_certificates: "{{ matrix_playbook_ssl_enabled }}"
  3766. ######################################################################
  3767. #
  3768. # /matrix-client-hydrogen
  3769. #
  3770. ######################################################################
  3771. ######################################################################
  3772. #
  3773. # matrix-client-cinny
  3774. #
  3775. ######################################################################
  3776. matrix_client_cinny_enabled: false
  3777. 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 }}"
  3778. matrix_client_cinny_container_image_self_build: "{{ matrix_architecture not in ['arm64', 'amd64'] }}"
  3779. 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 '' }}"
  3780. matrix_client_cinny_container_network: "{{ matrix_addons_container_network }}"
  3781. 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 [] }}"
  3782. matrix_client_cinny_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  3783. matrix_client_cinny_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  3784. matrix_client_cinny_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  3785. matrix_client_cinny_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  3786. matrix_client_cinny_container_labels_traefik_compression_middleware_enabled: "{{ matrix_playbook_reverse_proxy_traefik_middleware_compression_enabled }}"
  3787. 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 '' }}"
  3788. matrix_client_cinny_scheme: "{{ 'https' if matrix_playbook_ssl_enabled else 'http' }}"
  3789. matrix_client_cinny_default_hs_url: "{{ matrix_homeserver_url }}"
  3790. matrix_client_cinny_self_check_validate_certificates: "{{ matrix_playbook_ssl_enabled }}"
  3791. ######################################################################
  3792. #
  3793. # /matrix-client-cinny
  3794. #
  3795. ######################################################################
  3796. ######################################################################
  3797. #
  3798. # matrix-client-schildichat
  3799. #
  3800. ######################################################################
  3801. matrix_client_schildichat_enabled: false
  3802. matrix_client_schildichat_scheme: "{{ 'https' if matrix_playbook_ssl_enabled else 'http' }}"
  3803. 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 }}"
  3804. matrix_client_schildichat_container_image_self_build: "{{ matrix_architecture not in ['arm64', 'amd64'] }}"
  3805. 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 '' }}"
  3806. matrix_client_schildichat_container_network: "{{ matrix_addons_container_network }}"
  3807. 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 [] }}"
  3808. matrix_client_schildichat_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  3809. matrix_client_schildichat_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  3810. matrix_client_schildichat_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  3811. matrix_client_schildichat_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  3812. matrix_client_schildichat_default_hs_url: "{{ matrix_homeserver_url }}"
  3813. matrix_client_schildichat_default_is_url: "{{ matrix_identity_server_url }}"
  3814. # Use Dimension if enabled, otherwise fall back to Scalar
  3815. matrix_client_schildichat_integrations_ui_url: "{{ matrix_dimension_integrations_ui_url if matrix_dimension_enabled else 'https://scalar.vector.im/' }}"
  3816. matrix_client_schildichat_integrations_rest_url: "{{ matrix_dimension_integrations_rest_url if matrix_dimension_enabled else 'https://scalar.vector.im/api' }}"
  3817. matrix_client_schildichat_integrations_widgets_urls: "{{ matrix_dimension_integrations_widgets_urls if matrix_dimension_enabled else ['https://scalar.vector.im/api'] }}"
  3818. 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' }}"
  3819. matrix_client_schildichat_self_check_validate_certificates: "{{ matrix_playbook_ssl_enabled }}"
  3820. matrix_client_schildichat_registration_enabled: "{{ matrix_synapse_enable_registration }}"
  3821. matrix_client_schildichat_enable_presence_by_hs_url: |-
  3822. {{
  3823. none
  3824. if matrix_synapse_presence_enabled
  3825. else {matrix_client_schildichat_default_hs_url: false}
  3826. }}
  3827. matrix_client_schildichat_jitsi_preferred_domain: "{{ matrix_server_fqn_jitsi if jitsi_enabled else '' }}"
  3828. ######################################################################
  3829. #
  3830. # /matrix-client-schildichat
  3831. #
  3832. ######################################################################
  3833. ######################################################################
  3834. #
  3835. # matrix-client-fluffychat
  3836. #
  3837. ######################################################################
  3838. matrix_client_fluffychat_enabled: false
  3839. matrix_client_fluffychat_scheme: "{{ 'https' if matrix_playbook_ssl_enabled else 'http' }}"
  3840. 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 }}"
  3841. matrix_client_fluffychat_container_image_self_build: "{{ matrix_architecture not in ['arm64', 'amd64'] }}"
  3842. 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 '' }}"
  3843. matrix_client_fluffychat_container_network: "{{ matrix_addons_container_network }}"
  3844. 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 [] }}"
  3845. matrix_client_fluffychat_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  3846. matrix_client_fluffychat_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  3847. matrix_client_fluffychat_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  3848. matrix_client_fluffychat_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  3849. matrix_client_fluffychat_self_check_validate_certificates: "{{ matrix_playbook_ssl_enabled }}"
  3850. ######################################################################
  3851. #
  3852. # /matrix-client-fluffychat
  3853. #
  3854. ######################################################################
  3855. ######################################################################
  3856. #
  3857. # matrix-synapse
  3858. #
  3859. ######################################################################
  3860. matrix_synapse_enabled: "{{ matrix_homeserver_implementation == 'synapse' }}"
  3861. matrix_synapse_username: "{{ matrix_user_name }}"
  3862. matrix_synapse_uid: "{{ matrix_user_uid }}"
  3863. matrix_synapse_gid: "{{ matrix_user_gid }}"
  3864. matrix_synapse_federation_enabled: "{{ matrix_homeserver_federation_enabled }}"
  3865. 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 }}"
  3866. 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 }}"
  3867. 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 }}"
  3868. matrix_synapse_container_image_self_build: "{{ matrix_architecture not in ['arm64', 'amd64'] }}"
  3869. matrix_synapse_account_threepid_delegates_msisdn_mas1sd_url: "{{ ('http://matrix-ma1sd:' + matrix_ma1sd_container_port| string) }}"
  3870. # When ma1sd is enabled, we can use it to validate phone numbers. It's something that the homeserver cannot do by itself.
  3871. matrix_synapse_account_threepid_delegates_msisdn: "{{ matrix_synapse_account_threepid_delegates_msisdn_mas1sd_url if matrix_ma1sd_enabled else '' }}"
  3872. # For exposing the Matrix Federation API's TLS port (HTTPS) to the internet on all network interfaces.
  3873. 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 '' }}"
  3874. #
  3875. # For exposing the Synapse Metrics API's port (plain HTTP) to the local host.
  3876. 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 '' }}"
  3877. #
  3878. # For exposing the Synapse Manhole port (plain HTTP) to the local host.
  3879. 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 '' }}"
  3880. matrix_synapse_container_network: "{{ matrix_homeserver_container_network }}"
  3881. matrix_synapse_container_additional_networks_auto: |
  3882. {{
  3883. (
  3884. ([matrix_playbook_reverse_proxyable_services_additional_network] if matrix_synapse_container_labels_traefik_enabled and matrix_playbook_reverse_proxyable_services_additional_network else [])
  3885. +
  3886. ([postgres_container_network] if (postgres_enabled and postgres_container_network != matrix_synapse_container_network and matrix_synapse_database_host == postgres_connection_hostname) else [])
  3887. +
  3888. ([valkey_container_network] if matrix_synapse_redis_enabled and matrix_synapse_redis_host == valkey_identifier else [])
  3889. +
  3890. ([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 [])
  3891. +
  3892. ([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 [])
  3893. +
  3894. ([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 [])
  3895. ) | unique
  3896. }}
  3897. matrix_synapse_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  3898. matrix_synapse_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  3899. matrix_synapse_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  3900. matrix_synapse_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  3901. matrix_synapse_container_labels_traefik_hostname: "{{ matrix_server_fqn_matrix }}"
  3902. matrix_synapse_container_labels_traefik_compression_middleware_enabled: "{{ matrix_playbook_reverse_proxy_traefik_middleware_compression_enabled }}"
  3903. 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 '' }}"
  3904. matrix_synapse_container_labels_matrix_labels_enabled: "{{ not matrix_synapse_workers_enabled }}"
  3905. matrix_synapse_container_labels_public_client_root_redirection_enabled: "{{ matrix_synapse_container_labels_public_client_root_redirection_url != '' }}"
  3906. 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 '' }}"
  3907. matrix_synapse_container_labels_public_client_synapse_admin_api_enabled: "{{ matrix_synapse_admin_enabled or matrix_element_admin_enabled }}"
  3908. matrix_synapse_container_labels_internal_client_synapse_admin_api_enabled: "{{ (matrix_bot_draupnir_enabled and matrix_bot_draupnir_admin_api_enabled) }}"
  3909. matrix_synapse_container_labels_internal_client_synapse_admin_api_traefik_entrypoints: "{{ matrix_playbook_internal_matrix_client_api_traefik_entrypoint_name }}"
  3910. matrix_synapse_container_labels_public_federation_api_traefik_hostname: "{{ matrix_server_fqn_matrix_federation }}"
  3911. matrix_synapse_container_labels_public_federation_api_traefik_entrypoints: "{{ matrix_federation_traefik_entrypoint_name }}"
  3912. matrix_synapse_container_labels_public_federation_api_traefik_tls: "{{ matrix_federation_traefik_entrypoint_tls }}"
  3913. matrix_synapse_container_labels_public_federation_api_traefik_tls_certResolver: "{{ matrix_synapse_container_labels_traefik_tls_certResolver }}" # noqa var-naming
  3914. matrix_synapse_container_labels_public_metrics_middleware_basic_auth_enabled: "{{ matrix_metrics_exposure_http_basic_auth_enabled }}"
  3915. matrix_synapse_container_labels_public_metrics_middleware_basic_auth_users: "{{ matrix_metrics_exposure_http_basic_auth_users }}"
  3916. matrix_synapse_container_labels_internal_client_api_enabled: "{{ matrix_playbook_internal_matrix_client_api_traefik_entrypoint_enabled }}"
  3917. matrix_synapse_container_labels_internal_client_api_traefik_entrypoints: "{{ matrix_playbook_internal_matrix_client_api_traefik_entrypoint_name }}"
  3918. # For exposing the Synapse worker (and metrics) ports to the local host.
  3919. 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 '' }}"
  3920. matrix_synapse_database_host: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  3921. matrix_synapse_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'synapse.db', rounds=655555) | to_uuid }}"
  3922. matrix_synapse_macaroon_secret_key: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'synapse.mac', rounds=655555) | to_uuid }}"
  3923. # We do not enable TLS in Synapse by default, since it's handled by Traefik.
  3924. matrix_synapse_tls_federation_listener_enabled: false
  3925. matrix_synapse_tls_certificate_path: ~
  3926. matrix_synapse_tls_private_key_path: ~
  3927. 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) }}"
  3928. matrix_synapse_metrics_enabled: "{{ prometheus_enabled or matrix_metrics_exposure_enabled }}"
  3929. matrix_synapse_metrics_proxying_enabled: "{{ matrix_synapse_metrics_enabled and matrix_metrics_exposure_enabled }}"
  3930. matrix_synapse_metrics_proxying_hostname: "{{ matrix_metrics_exposure_hostname }}"
  3931. matrix_synapse_metrics_proxying_path_prefix: "{{ matrix_metrics_exposure_path_prefix }}/synapse"
  3932. matrix_synapse_email_enabled: "{{ exim_relay_enabled }}"
  3933. matrix_synapse_email_smtp_host: "{{ exim_relay_identifier }}"
  3934. matrix_synapse_email_smtp_port: 8025
  3935. matrix_synapse_email_smtp_require_transport_security: false
  3936. matrix_synapse_email_notif_from: "Matrix <{{ exim_relay_sender_address }}>"
  3937. matrix_synapse_turn_uris: "{{ matrix_coturn_turn_uris if matrix_coturn_enabled else [] }}"
  3938. matrix_synapse_turn_shared_secret: "{{ matrix_coturn_turn_static_auth_secret if (matrix_coturn_enabled and matrix_coturn_authentication_method == 'auth-secret') else '' }}"
  3939. matrix_synapse_turn_username: "{{ matrix_coturn_lt_cred_mech_username if (matrix_coturn_enabled and matrix_coturn_authentication_method == 'lt-cred-mech') else '' }}"
  3940. matrix_synapse_turn_password: "{{ matrix_coturn_lt_cred_mech_password if (matrix_coturn_enabled and matrix_coturn_authentication_method == 'lt-cred-mech') else '' }}"
  3941. matrix_synapse_self_check_validate_certificates: "{{ matrix_playbook_ssl_enabled }}"
  3942. matrix_synapse_systemd_required_services_list_auto: |
  3943. {{
  3944. ([postgres_identifier ~ '.service'] if (postgres_enabled and postgres_container_network != matrix_synapse_container_network and matrix_synapse_database_host == postgres_connection_hostname) else [])
  3945. +
  3946. ([valkey_identifier ~ '.service'] if matrix_synapse_redis_enabled and matrix_synapse_redis_host == valkey_identifier else [])
  3947. +
  3948. (['matrix-goofys.service'] if matrix_s3_media_store_enabled else [])
  3949. +
  3950. (['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 [])
  3951. }}
  3952. matrix_synapse_systemd_wanted_services_list_auto: |
  3953. {{
  3954. (['matrix-coturn.service'] if matrix_coturn_enabled else [])
  3955. +
  3956. ([exim_relay_identifier ~ '.service'] if exim_relay_enabled else [])
  3957. }}
  3958. # Synapse workers (used for parallel load-scaling) need Redis for IPC.
  3959. matrix_synapse_redis_enabled: "{{ valkey_enabled }}"
  3960. matrix_synapse_redis_host: "{{ valkey_identifier if valkey_enabled else '' }}"
  3961. matrix_synapse_redis_password: "{{ valkey_connection_password if valkey_enabled else '' }}"
  3962. matrix_synapse_container_extra_arguments_auto: "{{ matrix_homeserver_container_extra_arguments_auto }}"
  3963. matrix_synapse_app_service_config_files_auto: "{{ matrix_homeserver_app_service_config_files_auto }}"
  3964. # Disable creation of media repository Synapse worker when using media-repo
  3965. matrix_synapse_ext_media_repo_enabled: "{{ matrix_media_repo_enabled }}"
  3966. matrix_synapse_ext_synapse_http_antispam_enabled: "{{ matrix_bot_draupnir_config_web_synapseHTTPAntispam_enabled }}"
  3967. 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 '' }}"
  3968. matrix_synapse_ext_synapse_http_antispam_config_authorization: "{{ matrix_bot_draupnir_config_web_synapseHTTPAntispam_authorization if matrix_bot_draupnir_config_web_synapseHTTPAntispam_enabled else '' }}"
  3969. 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 [] }}"
  3970. 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 {} }}"
  3971. 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 {} }}"
  3972. # Enable Synapse statistics reporting when using synapse-usage-exporter
  3973. matrix_synapse_report_stats: "{{ matrix_synapse_usage_exporter_enabled }}"
  3974. 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 '') }}"
  3975. matrix_synapse_experimental_features_msc3266_enabled: "{{ matrix_rtc_enabled }}"
  3976. matrix_synapse_matrix_authentication_service_enabled: "{{ matrix_authentication_service_enabled }}"
  3977. matrix_synapse_matrix_authentication_service_endpoint: "{{ matrix_authentication_service_http_base_container_url if matrix_authentication_service_enabled else '' }}"
  3978. matrix_synapse_matrix_authentication_service_secret: "{{ matrix_authentication_service_config_matrix_secret if matrix_authentication_service_enabled else '' }}"
  3979. matrix_synapse_experimental_features_msc4108_enabled: "{{ matrix_authentication_service_enabled and not matrix_authentication_service_migration_in_progress }}"
  3980. matrix_synapse_experimental_features_msc4140_enabled: "{{ matrix_rtc_enabled }}"
  3981. matrix_synapse_experimental_features_msc4222_enabled: "{{ matrix_rtc_enabled }}"
  3982. # Disable password authentication when delegating authentication to Matrix Authentication Service.
  3983. # Unless this is done, Synapse fails on startup with:
  3984. # > Error in configuration at 'password_config.enabled':
  3985. # > Password auth cannot be enabled when OAuth delegation is enabled
  3986. matrix_synapse_password_config_enabled: "{{ not matrix_synapse_matrix_authentication_service_enabled }}"
  3987. matrix_synapse_register_user_script_matrix_authentication_service_path: "{{ matrix_authentication_service_bin_path }}/register-user"
  3988. ######################################################################
  3989. #
  3990. # /matrix-synapse
  3991. #
  3992. ######################################################################
  3993. ######################################################################
  3994. #
  3995. # matrix-synapse-auto-compressor
  3996. #
  3997. ######################################################################
  3998. # Not enabled by default, for now
  3999. matrix_synapse_auto_compressor_enabled: false
  4000. matrix_synapse_auto_compressor_uid: "{{ matrix_user_uid }}"
  4001. matrix_synapse_auto_compressor_gid: "{{ matrix_user_gid }}"
  4002. matrix_synapse_auto_compressor_postgres_image: "{{ postgres_container_image_to_use }}"
  4003. 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 }}"
  4004. matrix_synapse_auto_compressor_container_image_self_build: "{{ matrix_architecture not in ['arm64', 'amd64'] }}"
  4005. 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') }}"
  4006. matrix_synapse_auto_compressor_database_username: "{{ matrix_synapse_database_user if matrix_synapse_enabled else '' }}"
  4007. matrix_synapse_auto_compressor_database_password: "{{ matrix_synapse_database_password if matrix_synapse_enabled else '' }}"
  4008. matrix_synapse_auto_compressor_database_hostname: "{{ matrix_synapse_database_host if matrix_synapse_enabled else '' }}"
  4009. matrix_synapse_auto_compressor_database_port: "{{ matrix_synapse_database_port if matrix_synapse_enabled else '5432' }}"
  4010. matrix_synapse_auto_compressor_database_name: "{{ matrix_synapse_database_database if matrix_synapse_enabled else '' }}"
  4011. matrix_synapse_auto_compressor_systemd_required_services_list_auto: |
  4012. {{
  4013. ([postgres_identifier ~ '.service'] if (matrix_synapse_auto_compressor_container_network == postgres_container_network) else [])
  4014. }}
  4015. ######################################################################
  4016. #
  4017. # /matrix-synapse-auto-compressor
  4018. #
  4019. ######################################################################
  4020. ######################################################################
  4021. #
  4022. # matrix-synapse-reverse-proxy-companion
  4023. #
  4024. ######################################################################
  4025. matrix_synapse_reverse_proxy_companion_enabled: "{{ matrix_synapse_enabled and matrix_synapse_workers_enabled }}"
  4026. 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 }}"
  4027. matrix_synapse_reverse_proxy_companion_container_network: "{{ matrix_synapse_container_network }}"
  4028. matrix_synapse_reverse_proxy_companion_container_additional_networks_auto: |
  4029. {{
  4030. (
  4031. ([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 [])
  4032. +
  4033. ([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 [])
  4034. +
  4035. ([] if matrix_homeserver_container_network in ['', matrix_synapse_reverse_proxy_companion_container_network] else [matrix_homeserver_container_network])
  4036. ) | unique
  4037. }}
  4038. matrix_synapse_reverse_proxy_companion_client_api_client_max_body_size_mb: "{{ matrix_synapse_max_upload_size_mb }}"
  4039. 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 '' }}"
  4040. 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 '' }}"
  4041. matrix_synapse_reverse_proxy_companion_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  4042. matrix_synapse_reverse_proxy_companion_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  4043. matrix_synapse_reverse_proxy_companion_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  4044. matrix_synapse_reverse_proxy_companion_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  4045. matrix_synapse_reverse_proxy_companion_container_labels_traefik_hostname: "{{ matrix_server_fqn_matrix }}"
  4046. matrix_synapse_reverse_proxy_companion_container_labels_traefik_compression_middleware_enabled: "{{ matrix_playbook_reverse_proxy_traefik_middleware_compression_enabled }}"
  4047. 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 '' }}"
  4048. matrix_synapse_reverse_proxy_companion_container_labels_public_client_synapse_client_api_enabled: "{{ matrix_synapse_container_labels_public_client_synapse_client_api_enabled }}"
  4049. matrix_synapse_reverse_proxy_companion_container_labels_public_client_synapse_admin_api_enabled: "{{ matrix_synapse_container_labels_public_client_synapse_admin_api_enabled }}"
  4050. matrix_synapse_reverse_proxy_companion_container_labels_internal_client_synapse_admin_api_enabled: "{{ matrix_synapse_container_labels_internal_client_synapse_admin_api_enabled }}"
  4051. matrix_synapse_reverse_proxy_companion_container_labels_internal_client_synapse_admin_api_traefik_entrypoints: "{{ matrix_playbook_internal_matrix_client_api_traefik_entrypoint_name }}"
  4052. matrix_synapse_reverse_proxy_companion_container_labels_public_federation_api_traefik_entrypoints: "{{ matrix_synapse_container_labels_public_federation_api_traefik_entrypoints }}"
  4053. matrix_synapse_reverse_proxy_companion_container_labels_public_federation_api_traefik_tls: "{{ matrix_synapse_container_labels_public_federation_api_traefik_tls }}"
  4054. matrix_synapse_reverse_proxy_companion_container_labels_internal_client_api_enabled: "{{ matrix_synapse_container_labels_internal_client_api_enabled }}"
  4055. matrix_synapse_reverse_proxy_companion_container_labels_internal_client_api_traefik_entrypoints: "{{ matrix_synapse_container_labels_internal_client_api_traefik_entrypoints }}"
  4056. matrix_synapse_reverse_proxy_companion_synapse_workers_enabled: "{{ matrix_synapse_workers_enabled }}"
  4057. matrix_synapse_reverse_proxy_companion_synapse_workers_list: "{{ matrix_synapse_workers_enabled_list }}"
  4058. matrix_synapse_reverse_proxy_companion_synapse_room_worker_client_server_locations: "{{ matrix_synapse_workers_room_worker_client_server_endpoints }}"
  4059. matrix_synapse_reverse_proxy_companion_synapse_room_worker_federation_locations: "{{ matrix_synapse_workers_room_worker_federation_endpoints }}"
  4060. matrix_synapse_reverse_proxy_companion_synapse_sync_worker_client_server_locations: "{{ matrix_synapse_workers_sync_worker_client_server_endpoints }}"
  4061. matrix_synapse_reverse_proxy_companion_synapse_client_reader_client_server_locations: "{{ matrix_synapse_workers_client_reader_client_server_endpoints }}"
  4062. matrix_synapse_reverse_proxy_companion_synapse_federation_reader_federation_locations: "{{ matrix_synapse_workers_federation_reader_federation_endpoints }}"
  4063. matrix_synapse_reverse_proxy_companion_synapse_generic_worker_client_server_locations: "{{ matrix_synapse_workers_generic_worker_client_server_endpoints }}"
  4064. matrix_synapse_reverse_proxy_companion_synapse_generic_worker_federation_locations: "{{ matrix_synapse_workers_generic_worker_federation_endpoints }}"
  4065. 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 }}"
  4066. 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 }}"
  4067. 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 }}"
  4068. 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 }}"
  4069. 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 }}"
  4070. matrix_synapse_reverse_proxy_companion_synapse_media_repository_locations: "{{matrix_synapse_workers_media_repository_endpoints|default([]) }}"
  4071. matrix_synapse_reverse_proxy_companion_synapse_user_dir_locations: "{{ matrix_synapse_workers_user_dir_worker_client_server_endpoints|default([]) }}"
  4072. matrix_synapse_reverse_proxy_companion_access_log_syslog_integration_enabled: "{{ matrix_prometheus_nginxlog_exporter_enabled }}"
  4073. 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('') }}"
  4074. ######################################################################
  4075. #
  4076. # /matrix-synapse-reverse-proxy-companion
  4077. #
  4078. ######################################################################
  4079. ######################################################################
  4080. #
  4081. # matrix-synapse-admin
  4082. #
  4083. ######################################################################
  4084. matrix_synapse_admin_enabled: false
  4085. 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 }}"
  4086. 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 '' }}"
  4087. matrix_synapse_admin_container_image_self_build: "{{ matrix_architecture not in ['arm64', 'amd64'] }}"
  4088. matrix_synapse_admin_container_network: "{{ matrix_addons_container_network }}"
  4089. matrix_synapse_admin_container_additional_networks: "{{ [matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network else [] }}"
  4090. matrix_synapse_admin_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  4091. matrix_synapse_admin_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  4092. matrix_synapse_admin_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  4093. matrix_synapse_admin_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  4094. matrix_synapse_admin_config_externalAuthProvider: "{{ matrix_authentication_service_enabled | default(false) or matrix_synapse_ext_password_provider_ldap_enabled | default(false) }}"
  4095. matrix_synapse_admin_config_asManagedUsers_auto: |
  4096. {{
  4097. ([
  4098. '^@'+(matrix_alertmanager_receiver_config_matrix_user_id_localpart | default('') | regex_escape) +':'+(matrix_domain | regex_escape)+'$',
  4099. ] if matrix_alertmanager_receiver_enabled else [])
  4100. +
  4101. ([
  4102. '^@'+(matrix_appservice_draupnir_for_all_user_prefix | default('') | regex_escape) +'_[a-zA-Z0-9]+:'+(matrix_domain | regex_escape)+'$',
  4103. ] if matrix_appservice_draupnir_for_all_enabled else [])
  4104. +
  4105. ([
  4106. '^@'+(matrix_bot_baibot_config_user_mxid_localpart | default('') | regex_escape) +':'+(matrix_domain | regex_escape)+'$',
  4107. ] if matrix_bot_baibot_enabled else [])
  4108. +
  4109. ([
  4110. '^@'+(matrix_bot_buscarron_login | default('') | regex_escape) +':'+(matrix_domain | regex_escape)+'$',
  4111. ] if matrix_bot_buscarron_enabled else [])
  4112. +
  4113. ([
  4114. '^@'+(matrix_bot_draupnir_login | default('') | regex_escape) +':'+(matrix_domain | regex_escape)+'$',
  4115. ] if matrix_bot_draupnir_enabled else [])
  4116. +
  4117. ([
  4118. '^@'+(matrix_bot_chatgpt_matrix_bot_username_localpart | default('') | regex_escape) +':'+(matrix_domain | regex_escape)+'$',
  4119. ] if matrix_bot_chatgpt_enabled else [])
  4120. +
  4121. ([
  4122. '^@'+(matrix_bot_honoroit_login | default('') | regex_escape) +':'+(matrix_domain | regex_escape)+'$',
  4123. ] if matrix_bot_honoroit_enabled else [])
  4124. +
  4125. ([
  4126. '^@'+(matrix_bot_matrix_registration_bot_matrix_user_id_localpart | default('') | regex_escape) +':'+(matrix_domain | regex_escape)+'$',
  4127. ] if matrix_bot_matrix_registration_bot_enabled else [])
  4128. +
  4129. ([
  4130. '^@'+(matrix_bot_matrix_reminder_bot_matrix_user_id_localpart | default('') | regex_escape) +':'+(matrix_domain | regex_escape)+'$',
  4131. ] if matrix_bot_matrix_reminder_bot_enabled else [])
  4132. +
  4133. ([
  4134. '^@'+(matrix_bot_maubot_login | default('') | regex_escape) +':'+(matrix_domain | regex_escape)+'$',
  4135. ] if matrix_bot_maubot_enabled else [])
  4136. +
  4137. ([
  4138. '^@'+(matrix_postmoogle_login | default('') | regex_escape) +':'+(matrix_domain | regex_escape)+'$',
  4139. ] if matrix_postmoogle_enabled else [])
  4140. +
  4141. ([
  4142. '^@_discord_[a-zA-Z0-9]+:'+(matrix_domain | regex_escape)+'$',
  4143. ] if matrix_appservice_discord_enabled else [])
  4144. +
  4145. ([
  4146. '^@'+(matrix_appservice_slack_bot_name | default('') | regex_escape)+':'+(matrix_domain | regex_escape)+'$',
  4147. '^@'+(matrix_appservice_slack_user_prefix | default('') | regex_escape)+'[a-zA-Z0-9]+:'+(matrix_domain | regex_escape)+'$',
  4148. ] if matrix_appservice_slack_enabled else [])
  4149. +
  4150. ([
  4151. '^@'+(matrix_appservice_webhooks_bot_name | default('') | regex_escape)+':'+(matrix_domain | regex_escape)+'$',
  4152. '^@'+(matrix_appservice_webhooks_user_prefix | default('') | regex_escape)+'[a-zA-Z0-9]+:'+(matrix_domain | regex_escape)+'$',
  4153. ] if matrix_appservice_webhooks_enabled else [])
  4154. +
  4155. ([
  4156. '^@'+(matrix_beeper_linkedin_appservice_bot_username | default('') | regex_escape)+':'+(matrix_domain | regex_escape)+'$',
  4157. '^@linkedin_[a-zA-Z0-9]+:'+(matrix_domain | regex_escape)+'$',
  4158. ] if matrix_beeper_linkedin_enabled else [])
  4159. +
  4160. ([
  4161. '^@'+(matrix_go_skype_bridge_appservice_bot_username | default('') | regex_escape)+':'+(matrix_domain | regex_escape)+'$',
  4162. '^@skype_[a-zA-Z0-9]+:'+(matrix_domain | regex_escape)+'$',
  4163. ] if matrix_go_skype_bridge_enabled else [])
  4164. +
  4165. ([
  4166. '^@heisenbridge:'+(matrix_domain | regex_escape)+'$',
  4167. '^@hbirc_[a-zA-Z0-9]+:'+(matrix_domain | regex_escape)+'$',
  4168. ] if matrix_heisenbridge_enabled else [])
  4169. +
  4170. ([
  4171. '^@zulipbot:'+(matrix_domain | regex_escape)+'$',
  4172. '^@zulip_[a-zA-Z0-9]+:'+(matrix_domain | regex_escape)+'$',
  4173. ] if matrix_zulip_bridge_enabled else [])
  4174. +
  4175. ([
  4176. '^@hookshot:'+(matrix_domain | regex_escape)+'$',
  4177. '^@_github_[a-zA-Z0-9]+:'+(matrix_domain | regex_escape)+'$',
  4178. '^@_gitlab_[a-zA-Z0-9]+:'+(matrix_domain | regex_escape)+'$',
  4179. '^@_jira_[a-zA-Z0-9]+:'+(matrix_domain | regex_escape)+'$',
  4180. '^@'+(matrix_hookshot_generic_userIdPrefix | default('') | regex_escape)+'[a-zA-Z0-9]+:'+(matrix_domain | regex_escape)+'$',
  4181. ] if matrix_hookshot_enabled else [])
  4182. +
  4183. ([
  4184. '^@'+(matrix_mautrix_bluesky_appservice_bot_username | default('') | regex_escape)+':'+(matrix_domain | regex_escape)+'$',
  4185. '^@bluesky_[a-zA-Z0-9]+:'+(matrix_domain | regex_escape)+'$',
  4186. ] if matrix_mautrix_bluesky_enabled else [])
  4187. +
  4188. ([
  4189. '^@'+(matrix_mautrix_discord_appservice_bot_username | default('') | regex_escape)+':'+(matrix_domain | regex_escape)+'$',
  4190. '^@discord_[0-9]+:'+(matrix_domain | regex_escape)+'$',
  4191. ] if matrix_mautrix_discord_enabled else [])
  4192. +
  4193. ([
  4194. '^@'+(matrix_mautrix_facebook_appservice_bot_username | default('') | regex_escape)+':'+(matrix_domain | regex_escape)+'$',
  4195. '^@facebook_[a-zA-Z0-9]+:'+(matrix_domain | regex_escape)+'$',
  4196. ] if matrix_mautrix_facebook_enabled else [])
  4197. +
  4198. ([
  4199. '^@'+(matrix_mautrix_gmessages_appservice_bot_username | default('') | regex_escape)+':'+(matrix_domain | regex_escape)+'$',
  4200. '^@gmessages_[a-zA-Z0-9]+:'+(matrix_domain | regex_escape)+'$',
  4201. ] if matrix_mautrix_gmessages_enabled else [])
  4202. +
  4203. ([
  4204. '^@'+(matrix_mautrix_googlechat_appservice_bot_username | default('') | regex_escape)+':'+(matrix_domain | regex_escape)+'$',
  4205. '^@googlechat_[a-zA-Z0-9]+:'+(matrix_domain | regex_escape)+'$',
  4206. ] if matrix_mautrix_googlechat_enabled else [])
  4207. +
  4208. ([
  4209. '^@'+(matrix_mautrix_instagram_appservice_bot_username | default('') | regex_escape)+':'+(matrix_domain | regex_escape)+'$',
  4210. '^@instagram_[a-zA-Z0-9]+:'+(matrix_domain | regex_escape)+'$',
  4211. ] if matrix_mautrix_instagram_enabled else [])
  4212. +
  4213. ([
  4214. '^@'+(matrix_mautrix_meta_instagram_appservice_username | default('') | regex_escape)+':'+(matrix_domain | regex_escape)+'$',
  4215. '^@'+(matrix_mautrix_meta_instagram_bridge_username_prefix | default('') | regex_escape)+'[a-zA-Z0-9]+:'+(matrix_domain | regex_escape)+'$',
  4216. ] if matrix_mautrix_meta_instagram_enabled else [])
  4217. +
  4218. ([
  4219. '^@'+(matrix_mautrix_meta_messenger_appservice_username | default('') | regex_escape)+':'+(matrix_domain | regex_escape)+'$',
  4220. '^@'+(matrix_mautrix_meta_messenger_bridge_username_prefix | default('') | regex_escape)+'[a-zA-Z0-9]+:'+(matrix_domain | regex_escape)+'$',
  4221. ] if matrix_mautrix_meta_messenger_enabled else [])
  4222. +
  4223. ([
  4224. '^@'+(matrix_mautrix_signal_appservice_bot_username | default('') | regex_escape)+':'+(matrix_domain | regex_escape)+'$',
  4225. '^@signal_[a-zA-Z0-9]+:'+(matrix_domain | regex_escape)+'$',
  4226. ] if matrix_mautrix_signal_enabled else [])
  4227. +
  4228. ([
  4229. '^@'+(matrix_mautrix_slack_appservice_bot_username | default('') | regex_escape)+':'+(matrix_domain | regex_escape)+'$',
  4230. '^@slack_[a-zA-Z0-9\-]+:'+(matrix_domain | regex_escape)+'$',
  4231. ] if matrix_mautrix_slack_enabled else [])
  4232. +
  4233. ([
  4234. '^@'+(matrix_mautrix_telegram_appservice_bot_username | default('') | regex_escape)+':'+(matrix_domain | regex_escape)+'$',
  4235. '^@'+(matrix_mautrix_telegram_username_template | regex_escape | replace('{userid}', '.+'))+':'+(matrix_domain | regex_escape)+'$',
  4236. ] if matrix_mautrix_telegram_enabled else [])
  4237. +
  4238. ([
  4239. '^@'+(matrix_mautrix_twitter_appservice_bot_username | default('') | regex_escape)+':'+(matrix_domain | regex_escape)+'$',
  4240. '^@twitter_[a-zA-Z0-9]+:'+(matrix_domain | regex_escape)+'$',
  4241. ] if matrix_mautrix_twitter_enabled else [])
  4242. +
  4243. ([
  4244. '^@'+(matrix_mautrix_whatsapp_appservice_bot_username | default('') | regex_escape)+':'+(matrix_domain | regex_escape)+'$',
  4245. '^@whatsapp_[0-9]+:'+(matrix_domain | regex_escape)+'$',
  4246. ] if matrix_mautrix_whatsapp_enabled else [])
  4247. +
  4248. ([
  4249. '^@'+(matrix_mautrix_imessage_appservice_bot_username | default('') | regex_escape)+':'+(matrix_domain | regex_escape)+'$',
  4250. '^@imessage_[a-zA-Z0-9]+:'+(matrix_domain | regex_escape)+'$',
  4251. ] if matrix_mautrix_wsproxy_enabled else [])
  4252. +
  4253. ([
  4254. '^@_discordpuppet_[a-zA-Z0-9]+:'+(matrix_domain | regex_escape)+'$',
  4255. ] if matrix_mx_puppet_discord_enabled else [])
  4256. +
  4257. ([
  4258. '^@_groupmepuppet_[a-zA-Z0-9]+:'+(matrix_domain | regex_escape)+'$',
  4259. ] if matrix_mx_puppet_groupme_enabled else [])
  4260. +
  4261. ([
  4262. '^@_instagrampuppet_[a-zA-Z0-9]+:'+(matrix_domain | regex_escape)+'$',
  4263. ] if matrix_mx_puppet_instagram_enabled else [])
  4264. +
  4265. ([
  4266. '^@_slackpuppet_[a-zA-Z0-9]+:'+(matrix_domain | regex_escape)+'$',
  4267. ] if matrix_mx_puppet_slack_enabled else [])
  4268. +
  4269. ([
  4270. '^@_steampuppet_[a-zA-Z0-9]+:'+(matrix_domain | regex_escape)+'$',
  4271. ] if matrix_mx_puppet_steam_enabled else [])
  4272. +
  4273. ([
  4274. '^@'+(matrix_mx_puppet_twitter_bot_localpart | default('') | regex_escape)+':'+ (matrix_domain | regex_escape)+'$',
  4275. '^@'+(matrix_mx_puppet_twitter_namespace_prefix | default('') | regex_escape)+'[a-zA-Z0-9]+:'+(matrix_domain | regex_escape)+'$',
  4276. ] if matrix_mx_puppet_twitter_enabled else [])
  4277. +
  4278. ([
  4279. '^@smsbot:'+(matrix_domain | regex_escape)+'$',
  4280. '^@sms_[a-zA-Z0-9]+:'+(matrix_domain | regex_escape)+'$',
  4281. ] if matrix_sms_bridge_enabled else [])
  4282. +
  4283. ([
  4284. '^@'+(matrix_wechat_appservice_bot_username | default('') | regex_escape)+':'+(matrix_domain | regex_escape)+'$',
  4285. '^@_wechat_[a-zA-Z0-9]+:'+(matrix_domain | regex_escape)+'$',
  4286. ] if matrix_wechat_enabled else [])
  4287. +
  4288. ([
  4289. '^@'+(matrix_steam_bridge_appservice_bot_username | default('') | regex_escape)+':'+(matrix_domain | regex_escape)+'$',
  4290. '^@steam_[a-zA-Z0-9]+:'+(matrix_domain | regex_escape)+'$',
  4291. ] if matrix_steam_bridge_enabled else [])
  4292. }}
  4293. ######################################################################
  4294. #
  4295. # /matrix-synapse-admin
  4296. #
  4297. ######################################################################
  4298. ######################################################################
  4299. #
  4300. # matrix-synapse-usage-exporter
  4301. #
  4302. ######################################################################
  4303. matrix_synapse_usage_exporter_enabled: false
  4304. 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 }}"
  4305. matrix_synapse_usage_exporter_container_network: "{{ matrix_monitoring_container_network }}"
  4306. matrix_synapse_usage_exporter_container_additional_networks: "{{ [matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network else [] }}"
  4307. matrix_synapse_usage_exporter_container_labels_traefik_enabled: "{{ matrix_synapse_usage_exporter_proxying_enabled }}"
  4308. matrix_synapse_usage_exporter_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  4309. matrix_synapse_usage_exporter_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  4310. matrix_synapse_usage_exporter_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  4311. ######################################################################
  4312. #
  4313. # /matrix-synapse-usage-exporter
  4314. #
  4315. ######################################################################
  4316. ######################################################################
  4317. #
  4318. # prometheus_node_exporter
  4319. #
  4320. ######################################################################
  4321. prometheus_node_exporter_enabled: false
  4322. prometheus_node_exporter_identifier: matrix-prometheus-node-exporter
  4323. prometheus_node_exporter_base_path: "{{ matrix_base_data_path }}/prometheus-node-exporter"
  4324. prometheus_node_exporter_uid: "{{ matrix_user_uid }}"
  4325. prometheus_node_exporter_gid: "{{ matrix_user_gid }}"
  4326. prometheus_node_exporter_hostname: "{{ matrix_server_fqn_matrix }}"
  4327. 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 }}"
  4328. prometheus_node_exporter_container_network: "{{ matrix_monitoring_container_network }}"
  4329. prometheus_node_exporter_container_additional_networks_auto: "{{ [matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network else [] }}"
  4330. prometheus_node_exporter_container_labels_traefik_enabled: "{{ matrix_metrics_exposure_enabled }}"
  4331. prometheus_node_exporter_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  4332. prometheus_node_exporter_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  4333. prometheus_node_exporter_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  4334. prometheus_node_exporter_container_labels_metrics_middleware_basic_auth_enabled: "{{ matrix_metrics_exposure_http_basic_auth_enabled }}"
  4335. prometheus_node_exporter_container_labels_metrics_middleware_basic_auth_users: "{{ matrix_metrics_exposure_http_basic_auth_users }}"
  4336. ######################################################################
  4337. #
  4338. # /prometheus_node_exporter
  4339. #
  4340. ######################################################################
  4341. ######################################################################
  4342. #
  4343. # prometheus_postgres_exporter
  4344. #
  4345. ######################################################################
  4346. prometheus_postgres_exporter_enabled: false
  4347. prometheus_postgres_exporter_identifier: matrix-prometheus-postgres-exporter
  4348. prometheus_postgres_exporter_base_path: "{{ matrix_base_data_path }}/prometheus-postgres-exporter"
  4349. prometheus_postgres_exporter_uid: "{{ matrix_user_uid }}"
  4350. prometheus_postgres_exporter_gid: "{{ matrix_user_gid }}"
  4351. prometheus_postgres_exporter_hostname: "{{ matrix_server_fqn_matrix }}"
  4352. 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 }}"
  4353. prometheus_postgres_exporter_container_network: "{{ matrix_monitoring_container_network }}"
  4354. prometheus_postgres_exporter_container_additional_networks: |
  4355. {{
  4356. ([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 [])
  4357. +
  4358. ([matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network and prometheus_postgres_exporter_container_labels_traefik_enabled else [])
  4359. }}
  4360. prometheus_postgres_exporter_container_labels_traefik_enabled: "{{ matrix_metrics_exposure_enabled }}"
  4361. prometheus_postgres_exporter_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  4362. prometheus_postgres_exporter_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  4363. prometheus_postgres_exporter_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  4364. prometheus_postgres_exporter_container_labels_metrics_middleware_basic_auth_enabled: "{{ matrix_metrics_exposure_http_basic_auth_enabled }}"
  4365. prometheus_postgres_exporter_container_labels_metrics_middleware_basic_auth_users: "{{ matrix_metrics_exposure_http_basic_auth_users }}"
  4366. prometheus_postgres_exporter_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  4367. prometheus_postgres_exporter_database_username: matrix_prometheus_postgres_exporter
  4368. prometheus_postgres_exporter_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'prometheus.pg.db', rounds=655555) | to_uuid }}"
  4369. prometheus_postgres_exporter_database_name: matrix_prometheus_postgres_exporter
  4370. prometheus_postgres_exporter_systemd_required_services_list_auto: |
  4371. {{
  4372. ([postgres_identifier ~ '.service'] if (postgres_enabled and prometheus_postgres_exporter_database_hostname == postgres_connection_hostname) else [])
  4373. }}
  4374. ######################################################################
  4375. #
  4376. # /prometheus_postgres_exporter
  4377. #
  4378. ######################################################################
  4379. ######################################################################
  4380. #
  4381. # matrix-prometheus-nginxlog-exporter
  4382. #
  4383. ######################################################################
  4384. matrix_prometheus_nginxlog_exporter_enabled: false
  4385. matrix_prometheus_nginxlog_exporter_identifier: matrix-prometheus-nginxlog-exporter
  4386. matrix_prometheus_nginxlog_exporter_hostname: "{{ matrix_server_fqn_matrix }}"
  4387. 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 }}"
  4388. matrix_prometheus_nginxlog_exporter_container_network: "{{ matrix_monitoring_container_network }}"
  4389. matrix_prometheus_nginxlog_exporter_container_additional_networks_auto: |-
  4390. {{
  4391. ([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 [])
  4392. }}
  4393. matrix_prometheus_nginxlog_exporter_container_labels_traefik_enabled: "{{ matrix_metrics_exposure_enabled }}"
  4394. matrix_prometheus_nginxlog_exporter_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  4395. matrix_prometheus_nginxlog_exporter_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  4396. matrix_prometheus_nginxlog_exporter_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  4397. matrix_prometheus_nginxlog_exporter_container_labels_metrics_middleware_basic_auth_enabled: "{{ matrix_metrics_exposure_http_basic_auth_enabled }}"
  4398. matrix_prometheus_nginxlog_exporter_container_labels_metrics_middleware_basic_auth_users: "{{ matrix_metrics_exposure_http_basic_auth_users }}"
  4399. matrix_prometheus_nginxlog_exporter_config_namespaces_matrix_source_tags_auto: |
  4400. {{
  4401. ([matrix_synapse_reverse_proxy_companion_access_log_syslog_integration_tag] if matrix_synapse_reverse_proxy_companion_access_log_syslog_integration_enabled else [])
  4402. }}
  4403. ######################################################################
  4404. #
  4405. # /matrix-prometheus-nginxlog-exporter
  4406. #
  4407. ######################################################################
  4408. ######################################################################
  4409. #
  4410. # prometheus
  4411. #
  4412. ######################################################################
  4413. prometheus_enabled: false
  4414. prometheus_identifier: matrix-prometheus
  4415. prometheus_base_path: "{{ matrix_base_data_path }}/prometheus"
  4416. prometheus_uid: "{{ matrix_user_uid }}"
  4417. prometheus_gid: "{{ matrix_user_gid }}"
  4418. 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 }}"
  4419. prometheus_container_network: "{{ matrix_monitoring_container_network }}"
  4420. prometheus_container_additional_networks_auto: |
  4421. {{
  4422. (
  4423. ([prometheus_node_exporter_container_network] if prometheus_self_node_scraper_enabled and prometheus_node_exporter_container_network != prometheus_container_network else [])
  4424. +
  4425. ([matrix_synapse_container_network] if matrix_prometheus_services_connect_scraper_synapse_enabled and matrix_synapse_container_network != prometheus_container_network else [])
  4426. +
  4427. ([prometheus_postgres_exporter_container_network] if matrix_prometheus_services_connect_scraper_postgres_enabled and prometheus_postgres_exporter_container_network != prometheus_container_network else [])
  4428. +
  4429. ([matrix_hookshot_container_network] if matrix_prometheus_services_connect_scraper_hookshot_enabled and matrix_hookshot_container_network != prometheus_container_network else [])
  4430. +
  4431. ([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 [])
  4432. +
  4433. ([matrix_media_repo_container_network] if matrix_prometheus_services_connect_scraper_media_repo_enabled and matrix_media_repo_container_network != prometheus_container_network else [])
  4434. +
  4435. ([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 [])
  4436. ) | unique
  4437. }}
  4438. prometheus_container_http_host_bind_port: "{{ (matrix_playbook_service_host_bind_interface_prefix ~ '9090') if matrix_playbook_service_host_bind_interface_prefix else '' }}"
  4439. prometheus_config_rule_files_auto: |
  4440. {{
  4441. (['synapse-v2.rules'] if matrix_prometheus_services_connect_synapse_rules_enabled else [])
  4442. }}
  4443. prometheus_self_node_scraper_enabled: "{{ prometheus_node_exporter_enabled }}"
  4444. prometheus_self_node_scraper_static_configs_target: "{{ (prometheus_node_exporter_identifier + ':9100') if prometheus_node_exporter_enabled else '' }}"
  4445. prometheus_config_scrape_configs_auto: |
  4446. {{
  4447. (matrix_prometheus_services_connect_scraper_synapse_configs if matrix_prometheus_services_connect_scraper_synapse_enabled else [])
  4448. +
  4449. (matrix_prometheus_services_connect_scraper_postgres_scrape_configs if matrix_prometheus_services_connect_scraper_postgres_enabled else [])
  4450. +
  4451. (matrix_prometheus_services_connect_scraper_hookshot_scrape_configs if matrix_prometheus_services_connect_scraper_hookshot_enabled else [])
  4452. +
  4453. (matrix_prometheus_services_connect_scraper_nginxlog_scrape_configs if matrix_prometheus_services_connect_scraper_nginxlog_enabled else [])
  4454. +
  4455. (matrix_prometheus_services_connect_scraper_media_repo_scrape_configs if matrix_prometheus_services_connect_scraper_media_repo_enabled else [])
  4456. +
  4457. (matrix_prometheus_services_connect_scraper_synapse_usage_exporter_scrape_configs if matrix_prometheus_services_connect_scraper_synapse_usage_exporter_enabled else [])
  4458. }}
  4459. ######################################################################
  4460. #
  4461. # /prometheus
  4462. #
  4463. ######################################################################
  4464. ######################################################################
  4465. #
  4466. # matrix-prometheus-services-connect
  4467. #
  4468. ######################################################################
  4469. matrix_prometheus_services_connect_synapse_enabled: "{{ prometheus_enabled and matrix_synapse_enabled }}"
  4470. matrix_prometheus_services_connect_synapse_rules_download_synapse_tag: "{{ matrix_synapse_docker_image_tag }}"
  4471. matrix_prometheus_services_connect_synapse_rules_download_dir_path: "{{ prometheus_config_path }}"
  4472. matrix_prometheus_services_connect_synapse_rules_download_owner: "{{ prometheus_uid }}"
  4473. matrix_prometheus_services_connect_synapse_rules_download_group: "{{ prometheus_gid }}"
  4474. matrix_prometheus_services_connect_scraper_synapse_enabled: "{{ matrix_synapse_enabled and matrix_synapse_metrics_enabled }}"
  4475. matrix_prometheus_services_connect_scraper_synapse_main_process_static_configs_target: "matrix-synapse:{{ matrix_synapse_metrics_port }}"
  4476. matrix_prometheus_services_connect_scraper_synapse_workers_enabled_list: "{{ matrix_synapse_workers_enabled_list }}"
  4477. matrix_prometheus_services_connect_scraper_postgres_enabled: "{{ prometheus_postgres_exporter_enabled }}"
  4478. matrix_prometheus_services_connect_scraper_postgres_static_configs_target: "{{ prometheus_postgres_exporter_identifier }}:{{ prometheus_postgres_exporter_port | string }}"
  4479. matrix_prometheus_services_connect_scraper_hookshot_enabled: "{{ matrix_hookshot_enabled and matrix_hookshot_metrics_enabled }}"
  4480. matrix_prometheus_services_connect_scraper_hookshot_static_configs_target: "{{ matrix_hookshot_container_url }}:{{ matrix_hookshot_metrics_port | string }}"
  4481. matrix_prometheus_services_connect_scraper_nginxlog_enabled: "{{ matrix_prometheus_nginxlog_exporter_enabled }}"
  4482. matrix_prometheus_services_connect_scraper_nginxlog_static_configs_target: "{{ matrix_prometheus_nginxlog_exporter_identifier }}:{{ matrix_prometheus_nginxlog_exporter_container_metrics_port | string }}"
  4483. matrix_prometheus_services_connect_scraper_media_repo_enabled: "{{ matrix_media_repo_enabled and matrix_media_repo_metrics_enabled }}"
  4484. matrix_prometheus_services_connect_scraper_media_repo_static_configs_target: "{{ matrix_media_repo_identifier }}:{{ matrix_media_repo_metrics_port }}"
  4485. matrix_prometheus_services_connect_scraper_synapse_usage_exporter_enabled: "{{ matrix_synapse_usage_exporter_enabled }}"
  4486. matrix_prometheus_services_connect_scraper_synapse_usage_exporter_static_configs_target: "{{ matrix_synapse_usage_exporter_identifier }}:{{ matrix_synapse_usage_exporter_container_port | string }}"
  4487. ######################################################################
  4488. #
  4489. # /matrix-prometheus-services-connect
  4490. #
  4491. ######################################################################
  4492. ######################################################################
  4493. #
  4494. # grafana
  4495. #
  4496. ######################################################################
  4497. grafana_enabled: false
  4498. grafana_identifier: matrix-grafana
  4499. grafana_uid: "{{ matrix_user_uid }}"
  4500. grafana_gid: "{{ matrix_user_gid }}"
  4501. grafana_hostname: "{{ matrix_server_fqn_grafana }}"
  4502. grafana_base_path: "{{ matrix_base_data_path }}/grafana"
  4503. 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 }}"
  4504. grafana_container_network: "{{ matrix_monitoring_container_network }}"
  4505. grafana_container_additional_networks_auto: |
  4506. {{
  4507. (
  4508. ([matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network and grafana_container_labels_traefik_enabled else [])
  4509. +
  4510. ([prometheus_container_network] if prometheus_enabled and prometheus_container_network != grafana_container_network else [])
  4511. ) | unique
  4512. }}
  4513. grafana_container_labels_traefik_enabled: "{{ matrix_playbook_traefik_labels_enabled }}"
  4514. grafana_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  4515. grafana_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  4516. grafana_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  4517. grafana_container_http_host_bind_port: "{{ (matrix_playbook_service_host_bind_interface_prefix ~ '3000') if matrix_playbook_service_host_bind_interface_prefix else '' }}"
  4518. grafana_provisioning_datasources_datasources: |
  4519. {{
  4520. ([{
  4521. 'name': (matrix_server_fqn_matrix + ' - Prometheus'),
  4522. 'type': 'prometheus',
  4523. 'access': 'proxy',
  4524. 'url': ('http://' + prometheus_identifier + ':9090'),
  4525. 'jsonData': {
  4526. 'timeInterval': prometheus_config_global_scrape_interval,
  4527. }
  4528. }] if prometheus_enabled else [])
  4529. }}
  4530. grafana_dashboard_download_urls: |
  4531. {{
  4532. (matrix_synapse_grafana_dashboard_urls if matrix_homeserver_implementation == 'synapse' and matrix_synapse_metrics_enabled else [])
  4533. +
  4534. (prometheus_node_exporter_dashboard_urls if prometheus_node_exporter_enabled else [])
  4535. +
  4536. (prometheus_postgres_exporter_dashboard_urls if prometheus_postgres_exporter_enabled else [])
  4537. +
  4538. (matrix_prometheus_nginxlog_exporter_dashboard_urls if matrix_prometheus_nginxlog_exporter_enabled else [])
  4539. +
  4540. (matrix_media_repo_dashboard_urls if matrix_media_repo_metrics_enabled else [])
  4541. +
  4542. (matrix_synapse_usage_exporter_dashboard_urls if matrix_synapse_usage_exporter_enabled else [])
  4543. }}
  4544. grafana_provisioning_dashboard_template_files: |
  4545. {{
  4546. ([{
  4547. 'path': 'roles/custom/matrix-prometheus-nginxlog-exporter/templates/grafana/nginx-proxy.json',
  4548. 'name': 'nginx-proxy.json',
  4549. }] if matrix_prometheus_nginxlog_exporter_enabled else [])
  4550. }}
  4551. grafana_default_home_dashboard_path: |-
  4552. {{
  4553. {
  4554. '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 '')),
  4555. 'dendrite': ('/etc/grafana/dashboards/node-exporter-full.json' if prometheus_node_exporter_enabled else ''),
  4556. 'conduit': ('/etc/grafana/dashboards/node-exporter-full.json' if prometheus_node_exporter_enabled else ''),
  4557. 'conduwuit': ('/etc/grafana/dashboards/node-exporter-full.json' if prometheus_node_exporter_enabled else ''),
  4558. 'continuwuity': ('/etc/grafana/dashboards/node-exporter-full.json' if prometheus_node_exporter_enabled else ''),
  4559. }[matrix_homeserver_implementation]
  4560. }}
  4561. ######################################################################
  4562. #
  4563. # /grafana
  4564. #
  4565. ######################################################################
  4566. ######################################################################
  4567. #
  4568. # matrix-registration
  4569. #
  4570. ######################################################################
  4571. matrix_registration_enabled: false
  4572. matrix_registration_scheme: "{{ 'https' if matrix_playbook_ssl_enabled else 'http' }}"
  4573. matrix_registration_hostname: "{{ matrix_server_fqn_matrix }}"
  4574. matrix_registration_path_prefix: /matrix-registration
  4575. matrix_registration_systemd_required_services_list_auto: |
  4576. {{
  4577. ([postgres_identifier ~ '.service'] if (postgres_enabled and matrix_registration_database_hostname == postgres_connection_hostname) else [])
  4578. }}
  4579. 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 }}"
  4580. matrix_registration_container_image_self_build: "{{ matrix_architecture != 'amd64' }}"
  4581. matrix_registration_container_http_host_bind_port: "{{ (matrix_playbook_service_host_bind_interface_prefix ~ '8767') if matrix_playbook_service_host_bind_interface_prefix else '' }}"
  4582. matrix_registration_container_network: "{{ matrix_addons_container_network }}"
  4583. matrix_registration_container_additional_networks_auto: |-
  4584. {{
  4585. (
  4586. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  4587. +
  4588. ([postgres_container_network] if (postgres_enabled and matrix_registration_database_hostname == postgres_connection_hostname and matrix_mautrix_facebook_container_network != postgres_container_network) else [])
  4589. +
  4590. ([matrix_playbook_reverse_proxyable_services_additional_network] if (matrix_playbook_reverse_proxyable_services_additional_network and matrix_registration_container_labels_traefik_enabled) else [])
  4591. ) | unique
  4592. }}
  4593. matrix_registration_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  4594. matrix_registration_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  4595. matrix_registration_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  4596. matrix_registration_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  4597. 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/' }}"
  4598. matrix_registration_shared_secret: |-
  4599. {{
  4600. {
  4601. 'synapse': matrix_synapse_registration_shared_secret | default (''),
  4602. 'dendrite': matrix_dendrite_client_api_registration_shared_secret | default (''),
  4603. 'conduit': '',
  4604. 'conduwuit': '',
  4605. 'continuwuity': '',
  4606. }[matrix_homeserver_implementation]
  4607. }}
  4608. matrix_registration_server_location: "{{ matrix_addons_homeserver_client_api_url }}"
  4609. matrix_registration_api_validate_certs: "{{ matrix_playbook_ssl_enabled }}"
  4610. # Postgres is the default, except if not using internal Postgres server
  4611. matrix_registration_database_engine: "{{ 'postgres' if postgres_enabled else 'sqlite' }}"
  4612. matrix_registration_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  4613. matrix_registration_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mx.registr.db', rounds=655555) | to_uuid }}"
  4614. ######################################################################
  4615. #
  4616. # /matrix-registration
  4617. #
  4618. ######################################################################
  4619. ######################################################################
  4620. #
  4621. # matrix-sliding-sync
  4622. #
  4623. ######################################################################
  4624. # We don't enable the sliding sync proxy by default.
  4625. matrix_sliding_sync_enabled: false
  4626. matrix_sliding_sync_scheme: "{{ 'https' if matrix_playbook_ssl_enabled else 'http' }}"
  4627. matrix_sliding_sync_hostname: "{{ matrix_server_fqn_matrix }}"
  4628. matrix_sliding_sync_path_prefix: /sliding-sync
  4629. 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 }}"
  4630. matrix_sliding_sync_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm64'] }}"
  4631. matrix_sliding_sync_container_network: "{{ matrix_homeserver_container_network }}"
  4632. matrix_sliding_sync_container_additional_networks: |
  4633. {{
  4634. (
  4635. ([matrix_playbook_reverse_proxyable_services_additional_network] if matrix_sliding_sync_container_labels_traefik_enabled and matrix_playbook_reverse_proxyable_services_additional_network else [])
  4636. +
  4637. ([] if matrix_homeserver_container_network in ['', matrix_sliding_sync_container_network] else [matrix_homeserver_container_network])
  4638. +
  4639. ([postgres_container_network] if postgres_enabled and postgres_container_network != matrix_sliding_sync_container_network else [])
  4640. ) | unique
  4641. }}
  4642. matrix_sliding_sync_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  4643. matrix_sliding_sync_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  4644. matrix_sliding_sync_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  4645. matrix_sliding_sync_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  4646. matrix_sliding_sync_container_labels_public_metrics_middleware_basic_auth_enabled: "{{ matrix_metrics_exposure_http_basic_auth_enabled }}"
  4647. matrix_sliding_sync_container_labels_public_metrics_middleware_basic_auth_users: "{{ matrix_metrics_exposure_http_basic_auth_users }}"
  4648. matrix_sliding_sync_systemd_required_services_list_auto: |
  4649. {{
  4650. matrix_homeserver_systemd_services_list
  4651. +
  4652. ([postgres_identifier ~ '.service'] if (postgres_enabled and matrix_sliding_sync_database_hostname == postgres_connection_hostname) else [])
  4653. }}
  4654. matrix_sliding_sync_environment_variable_syncv3_server: "{{ matrix_homeserver_container_url }}"
  4655. matrix_sliding_sync_environment_variable_syncv3_secret: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'ss.secret', rounds=655555) | to_uuid }}"
  4656. matrix_sliding_sync_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  4657. matrix_sliding_sync_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'ss.db', rounds=655555) | to_uuid }}"
  4658. matrix_sliding_sync_metrics_enabled: "{{ prometheus_enabled or matrix_metrics_exposure_enabled }}"
  4659. matrix_sliding_sync_metrics_proxying_enabled: "{{ matrix_sliding_sync_metrics_enabled and matrix_metrics_exposure_enabled }}"
  4660. matrix_sliding_sync_metrics_proxying_hostname: "{{ matrix_metrics_exposure_hostname }}"
  4661. matrix_sliding_sync_metrics_proxying_path_prefix: "{{ matrix_metrics_exposure_path_prefix }}/sliding-sync"
  4662. #####################################################################
  4663. #
  4664. # /matrix-sliding-sync
  4665. #
  4666. ######################################################################
  4667. ######################################################################
  4668. #
  4669. # matrix-dendrite
  4670. #
  4671. ######################################################################
  4672. matrix_dendrite_enabled: "{{ matrix_homeserver_implementation == 'dendrite' }}"
  4673. matrix_dendrite_hostname: "{{ matrix_server_fqn_matrix }}"
  4674. matrix_dendrite_federation_enabled: "{{ matrix_homeserver_federation_enabled }}"
  4675. 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 }}"
  4676. matrix_dendrite_container_network: "{{ matrix_homeserver_container_network }}"
  4677. matrix_dendrite_container_additional_networks_auto: |
  4678. {{
  4679. (
  4680. ([matrix_playbook_reverse_proxyable_services_additional_network] if matrix_dendrite_container_labels_traefik_enabled and matrix_playbook_reverse_proxyable_services_additional_network else [])
  4681. +
  4682. ([postgres_container_network] if (postgres_enabled and matrix_dendrite_database_hostname == postgres_connection_hostname and postgres_container_network != matrix_dendrite_container_network) else [])
  4683. ) | unique
  4684. }}
  4685. 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 '' }}"
  4686. 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) }}"
  4687. matrix_dendrite_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] and not matrix_synapse_workers_enabled }}"
  4688. matrix_dendrite_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  4689. matrix_dendrite_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  4690. matrix_dendrite_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  4691. matrix_dendrite_container_labels_public_client_synapse_admin_api_enabled: "{{ matrix_synapse_admin_enabled }}"
  4692. matrix_dendrite_container_labels_public_client_root_redirection_enabled: "{{ matrix_dendrite_container_labels_public_client_root_redirection_url != '' }}"
  4693. 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 '' }}"
  4694. matrix_dendrite_container_labels_public_federation_api_traefik_hostname: "{{ matrix_server_fqn_matrix_federation }}"
  4695. matrix_dendrite_container_labels_public_federation_api_traefik_entrypoints: "{{ matrix_federation_traefik_entrypoint_name }}"
  4696. matrix_dendrite_container_labels_public_federation_api_traefik_tls: "{{ matrix_federation_traefik_entrypoint_tls }}"
  4697. matrix_dendrite_container_labels_public_metrics_middleware_basic_auth_enabled: "{{ matrix_metrics_exposure_http_basic_auth_enabled }}"
  4698. matrix_dendrite_container_labels_public_metrics_middleware_basic_auth_users: "{{ matrix_metrics_exposure_http_basic_auth_users }}"
  4699. matrix_dendrite_metrics_enabled: "{{ prometheus_enabled or matrix_metrics_exposure_enabled }}"
  4700. matrix_dendrite_metrics_proxying_enabled: "{{ matrix_dendrite_metrics_enabled and matrix_metrics_exposure_enabled }}"
  4701. matrix_dendrite_metrics_proxying_hostname: "{{ matrix_metrics_exposure_hostname }}"
  4702. matrix_dendrite_metrics_proxying_path_prefix: "{{ matrix_metrics_exposure_path_prefix }}/dendrite"
  4703. matrix_dendrite_client_api_registration_shared_secret: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'dendrite.rss', rounds=655555) | to_uuid }}"
  4704. matrix_dendrite_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  4705. matrix_dendrite_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'dendrite.db', rounds=655555) | to_uuid }}"
  4706. matrix_dendrite_client_api_turn_uris: "{{ matrix_coturn_turn_uris if matrix_coturn_enabled else [] }}"
  4707. 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 '' }}"
  4708. 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 '' }}"
  4709. 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 '' }}"
  4710. matrix_dendrite_disable_tls_validation: "{{ not matrix_playbook_ssl_enabled }}"
  4711. matrix_dendrite_self_check_validate_certificates: "{{ matrix_playbook_ssl_enabled }}"
  4712. matrix_dendrite_trusted_id_servers: "{{ [matrix_server_fqn_matrix] if matrix_ma1sd_enabled else ['matrix.org', 'vector.im'] }}"
  4713. matrix_dendrite_systemd_required_services_list_auto: |
  4714. {{
  4715. ([postgres_identifier ~ '.service'] if (postgres_enabled and matrix_dendrite_database_hostname == postgres_connection_hostname) else [])
  4716. +
  4717. (['matrix-goofys.service'] if matrix_s3_media_store_enabled else [])
  4718. }}
  4719. matrix_dendrite_systemd_wanted_services_list_auto: |
  4720. {{
  4721. (['matrix-coturn.service'] if matrix_coturn_enabled else [])
  4722. }}
  4723. matrix_dendrite_container_extra_arguments_auto: "{{ matrix_homeserver_container_extra_arguments_auto }}"
  4724. matrix_dendrite_app_service_config_files_auto: "{{ matrix_homeserver_app_service_config_files_auto }}"
  4725. ######################################################################
  4726. #
  4727. # /matrix-dendrite
  4728. #
  4729. ######################################################################
  4730. ######################################################################
  4731. #
  4732. # matrix-conduit
  4733. #
  4734. ######################################################################
  4735. matrix_conduit_enabled: "{{ matrix_homeserver_implementation == 'conduit' }}"
  4736. matrix_conduit_hostname: "{{ matrix_server_fqn_matrix }}"
  4737. matrix_conduit_allow_federation: "{{ matrix_homeserver_federation_enabled }}"
  4738. 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 }}"
  4739. matrix_conduit_container_network: "{{ matrix_homeserver_container_network }}"
  4740. matrix_conduit_container_additional_networks_auto: |
  4741. {{
  4742. (
  4743. ([matrix_playbook_reverse_proxyable_services_additional_network] if matrix_conduit_container_labels_traefik_enabled and matrix_playbook_reverse_proxyable_services_additional_network else [])
  4744. ) | unique
  4745. }}
  4746. matrix_conduit_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] and not matrix_synapse_workers_enabled }}"
  4747. matrix_conduit_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  4748. matrix_conduit_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  4749. matrix_conduit_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  4750. matrix_conduit_container_labels_public_client_root_redirection_enabled: "{{ matrix_conduit_container_labels_public_client_root_redirection_url != '' }}"
  4751. 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 '' }}"
  4752. matrix_conduit_container_labels_public_federation_api_traefik_hostname: "{{ matrix_server_fqn_matrix_federation }}"
  4753. matrix_conduit_container_labels_public_federation_api_traefik_entrypoints: "{{ matrix_federation_traefik_entrypoint_name }}"
  4754. matrix_conduit_container_labels_public_federation_api_traefik_tls: "{{ matrix_federation_traefik_entrypoint_tls }}"
  4755. matrix_conduit_container_labels_internal_client_api_enabled: "{{ matrix_playbook_internal_matrix_client_api_traefik_entrypoint_enabled }}"
  4756. matrix_conduit_container_labels_internal_client_api_traefik_entrypoints: "{{ matrix_playbook_internal_matrix_client_api_traefik_entrypoint_name }}"
  4757. matrix_conduit_turn_uris: "{{ matrix_coturn_turn_uris if matrix_coturn_enabled else [] }}"
  4758. matrix_conduit_turn_secret: "{{ matrix_coturn_turn_static_auth_secret if (matrix_coturn_enabled and matrix_coturn_authentication_method == 'auth-secret') else '' }}"
  4759. matrix_conduit_turn_username: "{{ matrix_coturn_lt_cred_mech_username if (matrix_coturn_enabled and matrix_coturn_authentication_method == 'lt-cred-mech') else '' }}"
  4760. matrix_conduit_turn_password: "{{ matrix_coturn_lt_cred_mech_password if (matrix_coturn_enabled and matrix_coturn_authentication_method == 'lt-cred-mech') else '' }}"
  4761. ######################################################################
  4762. #
  4763. # /matrix-conduit
  4764. #
  4765. ######################################################################
  4766. ######################################################################
  4767. #
  4768. # matrix-conduwuit
  4769. #
  4770. ######################################################################
  4771. matrix_conduwuit_enabled: "{{ matrix_homeserver_implementation == 'conduwuit' }}"
  4772. matrix_conduwuit_hostname: "{{ matrix_server_fqn_matrix }}"
  4773. matrix_conduwuit_config_allow_federation: "{{ matrix_homeserver_federation_enabled }}"
  4774. 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 }}"
  4775. matrix_conduwuit_container_network: "{{ matrix_homeserver_container_network }}"
  4776. matrix_conduwuit_container_additional_networks_auto: |
  4777. {{
  4778. (
  4779. ([matrix_playbook_reverse_proxyable_services_additional_network] if matrix_conduwuit_container_labels_traefik_enabled and matrix_playbook_reverse_proxyable_services_additional_network else [])
  4780. ) | unique
  4781. }}
  4782. matrix_conduwuit_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] and not matrix_synapse_workers_enabled }}"
  4783. matrix_conduwuit_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  4784. matrix_conduwuit_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  4785. matrix_conduwuit_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  4786. matrix_conduwuit_container_labels_public_client_root_redirection_enabled: "{{ matrix_conduwuit_container_labels_public_client_root_redirection_url != '' }}"
  4787. 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 '' }}"
  4788. matrix_conduwuit_container_labels_public_federation_api_traefik_hostname: "{{ matrix_server_fqn_matrix_federation }}"
  4789. matrix_conduwuit_container_labels_public_federation_api_traefik_entrypoints: "{{ matrix_federation_traefik_entrypoint_name }}"
  4790. matrix_conduwuit_container_labels_public_federation_api_traefik_tls: "{{ matrix_federation_traefik_entrypoint_tls }}"
  4791. matrix_conduwuit_container_labels_internal_client_api_enabled: "{{ matrix_playbook_internal_matrix_client_api_traefik_entrypoint_enabled }}"
  4792. matrix_conduwuit_container_labels_internal_client_api_traefik_entrypoints: "{{ matrix_playbook_internal_matrix_client_api_traefik_entrypoint_name }}"
  4793. matrix_conduwuit_config_turn_uris: "{{ matrix_coturn_turn_uris if matrix_coturn_enabled else [] }}"
  4794. matrix_conduwuit_config_turn_secret: "{{ matrix_coturn_turn_static_auth_secret if (matrix_coturn_enabled and matrix_coturn_authentication_method == 'auth-secret') else '' }}"
  4795. matrix_conduwuit_config_turn_username: "{{ matrix_coturn_lt_cred_mech_username if (matrix_coturn_enabled and matrix_coturn_authentication_method == 'lt-cred-mech') else '' }}"
  4796. matrix_conduwuit_config_turn_password: "{{ matrix_coturn_lt_cred_mech_password if (matrix_coturn_enabled and matrix_coturn_authentication_method == 'lt-cred-mech') else '' }}"
  4797. matrix_conduwuit_self_check_validate_certificates: "{{ matrix_playbook_ssl_enabled }}"
  4798. ######################################################################
  4799. #
  4800. # /matrix-conduwuit
  4801. #
  4802. ######################################################################
  4803. ######################################################################
  4804. #
  4805. # matrix-continuwuity
  4806. #
  4807. ######################################################################
  4808. matrix_continuwuity_enabled: "{{ matrix_homeserver_implementation == 'continuwuity' }}"
  4809. matrix_continuwuity_hostname: "{{ matrix_server_fqn_matrix }}"
  4810. matrix_continuwuity_config_allow_federation: "{{ matrix_homeserver_federation_enabled }}"
  4811. 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 }}"
  4812. matrix_continuwuity_container_network: "{{ matrix_homeserver_container_network }}"
  4813. matrix_continuwuity_container_additional_networks_auto: |
  4814. {{
  4815. (
  4816. ([matrix_playbook_reverse_proxyable_services_additional_network] if matrix_continuwuity_container_labels_traefik_enabled and matrix_playbook_reverse_proxyable_services_additional_network else [])
  4817. ) | unique
  4818. }}
  4819. matrix_continuwuity_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] and not matrix_synapse_workers_enabled }}"
  4820. matrix_continuwuity_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  4821. matrix_continuwuity_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  4822. matrix_continuwuity_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  4823. matrix_continuwuity_container_labels_public_client_root_redirection_enabled: "{{ matrix_continuwuity_container_labels_public_client_root_redirection_url != '' }}"
  4824. 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 '' }}"
  4825. matrix_continuwuity_container_labels_public_federation_api_traefik_hostname: "{{ matrix_server_fqn_matrix_federation }}"
  4826. matrix_continuwuity_container_labels_public_federation_api_traefik_entrypoints: "{{ matrix_federation_traefik_entrypoint_name }}"
  4827. matrix_continuwuity_container_labels_public_federation_api_traefik_tls: "{{ matrix_federation_traefik_entrypoint_tls }}"
  4828. matrix_continuwuity_container_labels_internal_client_api_enabled: "{{ matrix_playbook_internal_matrix_client_api_traefik_entrypoint_enabled }}"
  4829. matrix_continuwuity_container_labels_internal_client_api_traefik_entrypoints: "{{ matrix_playbook_internal_matrix_client_api_traefik_entrypoint_name }}"
  4830. matrix_continuwuity_config_turn_uris: "{{ matrix_coturn_turn_uris if matrix_coturn_enabled else [] }}"
  4831. matrix_continuwuity_config_turn_secret: "{{ matrix_coturn_turn_static_auth_secret if (matrix_coturn_enabled and matrix_coturn_authentication_method == 'auth-secret') else '' }}"
  4832. matrix_continuwuity_config_turn_username: "{{ matrix_coturn_lt_cred_mech_username if (matrix_coturn_enabled and matrix_coturn_authentication_method == 'lt-cred-mech') else '' }}"
  4833. matrix_continuwuity_config_turn_password: "{{ matrix_coturn_lt_cred_mech_password if (matrix_coturn_enabled and matrix_coturn_authentication_method == 'lt-cred-mech') else '' }}"
  4834. matrix_continuwuity_self_check_validate_certificates: "{{ matrix_playbook_ssl_enabled }}"
  4835. ######################################################################
  4836. #
  4837. # /matrix-continuwuity
  4838. #
  4839. ######################################################################
  4840. ######################################################################
  4841. #
  4842. # matrix-user-creator
  4843. #
  4844. ######################################################################
  4845. matrix_user_creator_users_auto: |
  4846. {{
  4847. ([{
  4848. 'username': matrix_bot_matrix_registration_bot_matrix_user_id_localpart,
  4849. 'initial_password': matrix_bot_matrix_registration_bot_bot_password,
  4850. 'initial_type': 'admin',
  4851. }] if matrix_bot_matrix_registration_bot_enabled else [])
  4852. +
  4853. ([{
  4854. 'username': matrix_bot_baibot_config_user_mxid_localpart,
  4855. 'initial_password': matrix_bot_baibot_config_user_password,
  4856. 'initial_type': 'bot',
  4857. }] if matrix_bot_baibot_enabled else [])
  4858. +
  4859. ([{
  4860. 'username': matrix_bot_chatgpt_matrix_bot_username_localpart,
  4861. 'initial_password': matrix_bot_chatgpt_matrix_bot_password,
  4862. 'initial_type': 'bot',
  4863. }] if matrix_bot_chatgpt_enabled and matrix_bot_chatgpt_matrix_bot_password | length > 0 else [])
  4864. +
  4865. ([{
  4866. 'username': matrix_bot_matrix_reminder_bot_matrix_user_id_localpart,
  4867. 'initial_password': matrix_bot_matrix_reminder_bot_matrix_user_password,
  4868. 'initial_type': 'bot',
  4869. }] if matrix_bot_matrix_reminder_bot_enabled else [])
  4870. +
  4871. ([{
  4872. 'username': matrix_bot_honoroit_login,
  4873. 'initial_password': matrix_bot_honoroit_password,
  4874. 'initial_type': 'bot',
  4875. }] if matrix_bot_honoroit_enabled else [])
  4876. +
  4877. ([{
  4878. 'username': matrix_postmoogle_login,
  4879. 'initial_password': matrix_postmoogle_password,
  4880. 'initial_type': 'bot',
  4881. }] if matrix_postmoogle_enabled else [])
  4882. +
  4883. ([{
  4884. 'username': matrix_bot_buscarron_login,
  4885. 'initial_password': matrix_bot_buscarron_password,
  4886. 'initial_type': 'bot',
  4887. }] if matrix_bot_buscarron_enabled else [])
  4888. +
  4889. ([{
  4890. 'username': matrix_bot_maubot_login,
  4891. 'initial_password': matrix_bot_maubot_initial_password,
  4892. 'initial_type': 'bot',
  4893. }] if matrix_bot_maubot_enabled else [])
  4894. +
  4895. ([{
  4896. 'username': matrix_bot_draupnir_login,
  4897. 'initial_password': matrix_bot_draupnir_password,
  4898. 'initial_type': ('admin' if matrix_bot_draupnir_admin_api_enabled else 'bot'),
  4899. }] if matrix_bot_draupnir_enabled and matrix_bot_draupnir_password else [])
  4900. }}
  4901. ######################################################################
  4902. #
  4903. # /matrix-user-creator
  4904. #
  4905. ######################################################################
  4906. ######################################################################
  4907. #
  4908. # matrix-user-verification-service
  4909. #
  4910. ######################################################################
  4911. matrix_user_verification_service_enabled: false
  4912. matrix_user_verification_service_systemd_required_services_list: |
  4913. {{
  4914. [devture_systemd_docker_base_docker_service_name]
  4915. +
  4916. (['matrix-' + matrix_homeserver_implementation + '.service'])
  4917. }}
  4918. 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 }}"
  4919. matrix_user_verification_service_container_network: "{{ matrix_addons_container_network }}"
  4920. matrix_user_verification_service_container_additional_networks: |
  4921. {{
  4922. (
  4923. ([matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network else [])
  4924. +
  4925. ([matrix_homeserver_container_network] if matrix_homeserver_container_network != matrix_user_verification_service_container_network else [])
  4926. ) | unique
  4927. }}
  4928. # If Jitsi is managed by this playbook we can use the docker network — no need to expose a port.
  4929. # If Jitsi is not managed by this playbook, or you otherwise have a need for it, you can expose
  4930. # matrix-user-verfification-services's client-server port to port 3003.
  4931. # By default Matrix-User-Verification-Service binds to port 3000, which collides with grafana, therefore this uses port 3003.
  4932. 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' }}"
  4933. # URL exposed in the docker network
  4934. matrix_user_verification_service_container_url: "http://{{ matrix_user_verification_service_container_name }}:3000"
  4935. matrix_user_verification_service_uvs_homeserver_url: "{{ matrix_addons_homeserver_client_api_url }}"
  4936. # We connect via the container network (private IPs), so we need to disable IP checks
  4937. matrix_user_verification_service_uvs_disable_ip_blacklist: "{{ matrix_synapse_enabled }}"
  4938. matrix_user_verification_service_uvs_auth_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'uvs.auth.token', rounds=655555) | to_uuid }}"
  4939. ######################################################################
  4940. #
  4941. # /matrix-user-verification-service
  4942. #
  4943. ######################################################################
  4944. ########################################################################
  4945. # #
  4946. # matrix-static-files #
  4947. # #
  4948. ########################################################################
  4949. matrix_static_files_enabled: true
  4950. 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 }}"
  4951. matrix_static_files_container_network: "{{ (matrix_static_files_identifier if matrix_playbook_reverse_proxy_type == 'none' else matrix_playbook_reverse_proxy_container_network) }}"
  4952. matrix_static_files_container_labels_traefik_enabled: "{{ matrix_playbook_traefik_labels_enabled }}"
  4953. matrix_static_files_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  4954. matrix_static_files_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  4955. matrix_static_files_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  4956. matrix_static_files_container_labels_well_known_matrix_endpoint_traefik_hostname: "{{ matrix_server_fqn_matrix }}"
  4957. # Base domain serving is not enabled by default (see `matrix_static_files_container_labels_base_domain_enabled`),
  4958. # but we pass the hostname, so that enabling it is easy.
  4959. matrix_static_files_container_labels_base_domain_traefik_hostname: "{{ matrix_domain }}"
  4960. # If we're not serving a static webpage, serve a redirect instead of a 404.
  4961. matrix_static_files_container_labels_base_domain_root_path_redirection_enabled: "{{ not matrix_static_files_file_index_html_enabled }}"
  4962. matrix_static_files_container_labels_base_domain_root_path_redirection_url: "{{ ('https://' if matrix_playbook_ssl_enabled else 'http://') + matrix_server_fqn_matrix }}/${1}"
  4963. matrix_static_files_file_matrix_client_property_io_element_jitsi_preferred_domain: "{{ matrix_server_fqn_jitsi if jitsi_enabled else '' }}"
  4964. matrix_static_files_file_matrix_client_property_org_matrix_msc3575_proxy_url: "{{ matrix_homeserver_sliding_sync_url }}"
  4965. matrix_static_files_file_matrix_client_property_org_matrix_msc2965_authentication_enabled: "{{ matrix_authentication_service_enabled }}"
  4966. matrix_static_files_file_matrix_client_property_org_matrix_msc2965_authentication_issuer: "{{ matrix_authentication_service_config_http_issuer if matrix_authentication_service_enabled else '' }}"
  4967. matrix_static_files_file_matrix_client_property_org_matrix_msc2965_authentication_account: "{{ matrix_authentication_service_account_management_url if matrix_authentication_service_enabled else '' }}"
  4968. matrix_static_files_file_matrix_client_property_m_tile_server_entries_enabled: "{{ matrix_client_element_location_sharing_enabled }}"
  4969. 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"
  4970. # 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.
  4971. # See: https://github.com/etkecc/synapse-admin/pull/126
  4972. matrix_static_files_file_matrix_client_property_cc_etke_synapse_admin_auto: "{{ matrix_synapse_admin_configuration if matrix_homeserver_implementation == 'synapse' else {} }}"
  4973. matrix_static_files_file_matrix_client_property_org_matrix_msc4143_rtc_foci_enabled: "{{ matrix_livekit_jwt_service_enabled }}"
  4974. matrix_static_files_file_matrix_client_property_org_matrix_msc4143_rtc_foci_auto: |-
  4975. {{
  4976. (
  4977. [{'type': 'livekit', 'livekit_service_url': matrix_livekit_jwt_service_public_url}] if matrix_livekit_jwt_service_enabled else []
  4978. )
  4979. }}
  4980. matrix_static_files_file_matrix_server_property_m_server: "{{ matrix_server_fqn_matrix_federation }}:{{ matrix_federation_public_port }}"
  4981. matrix_static_files_scheme: "{{ 'https' if matrix_playbook_ssl_enabled else 'http' }}"
  4982. matrix_static_files_self_check_hostname_matrix: "{{ matrix_server_fqn_matrix }}"
  4983. matrix_static_files_self_check_hostname_identity: "{{ matrix_domain }}"
  4984. ########################################################################
  4985. # #
  4986. # /matrix-static-files #
  4987. # #
  4988. ########################################################################
  4989. ########################################################################
  4990. # #
  4991. # container-socket-proxy #
  4992. # #
  4993. ########################################################################
  4994. container_socket_proxy_enabled: "{{ matrix_playbook_reverse_proxy_type == 'playbook-managed-traefik' }}"
  4995. container_socket_proxy_identifier: matrix-container-socket-proxy
  4996. container_socket_proxy_base_path: "{{ matrix_base_data_path }}/container-socket-proxy"
  4997. container_socket_proxy_uid: "{{ matrix_user_uid }}"
  4998. container_socket_proxy_gid: "{{ matrix_user_gid }}"
  4999. # Traefik requires read access to the containers APIs to do its job
  5000. container_socket_proxy_api_containers_enabled: true
  5001. 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 }}"
  5002. ########################################################################
  5003. # #
  5004. # /container-socket-proxy #
  5005. # #
  5006. ########################################################################
  5007. ########################################################################
  5008. # #
  5009. # traefik #
  5010. # #
  5011. ########################################################################
  5012. traefik_enabled: "{{ matrix_playbook_reverse_proxy_type == 'playbook-managed-traefik' }}"
  5013. traefik_identifier: matrix-traefik
  5014. traefik_base_path: "{{ matrix_base_data_path }}/traefik"
  5015. traefik_uid: "{{ matrix_user_uid }}"
  5016. traefik_gid: "{{ matrix_user_gid }}"
  5017. # It's common for setups to deal with large file uploads which may take longer than the default readTimeout (60s).
  5018. # This override (for the `web` entrypoint) also cascades to overriding the `web-secure` entrypoint and the `matrix-federation` entrypoint.
  5019. traefik_config_entrypoint_web_transport_respondingTimeouts_readTimeout: 300s
  5020. traefik_additional_entrypoints_auto: |
  5021. {{
  5022. ([matrix_playbook_public_matrix_federation_api_traefik_entrypoint_definition] if matrix_playbook_public_matrix_federation_api_traefik_entrypoint_enabled else [])
  5023. +
  5024. ([matrix_playbook_internal_matrix_client_api_traefik_entrypoint_definition] if matrix_playbook_internal_matrix_client_api_traefik_entrypoint_enabled else [])
  5025. }}
  5026. traefik_config_providers_docker_endpoint: "{{ container_socket_proxy_endpoint if container_socket_proxy_enabled else 'unix:///var/run/docker.sock' }}"
  5027. 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 }}"
  5028. traefik_container_additional_networks_auto: |
  5029. {{
  5030. ([container_socket_proxy_container_network] if container_socket_proxy_enabled else [])
  5031. }}
  5032. traefik_systemd_required_services_list: |
  5033. {{
  5034. ([devture_systemd_docker_base_docker_service_name])
  5035. +
  5036. ([container_socket_proxy_identifier + '.service'] if container_socket_proxy_enabled else [])
  5037. }}
  5038. ########################################################################
  5039. # #
  5040. # /traefik #
  5041. # #
  5042. ########################################################################
  5043. ########################################################################
  5044. # #
  5045. # traefik_certs_dumper #
  5046. # #
  5047. ########################################################################
  5048. 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' }}"
  5049. traefik_certs_dumper_identifier: matrix-traefik-certs-dumper
  5050. traefik_certs_dumper_base_path: "{{ matrix_base_data_path }}/traefik-certs-dumper"
  5051. traefik_certs_dumper_uid: "{{ matrix_user_uid }}"
  5052. traefik_certs_dumper_gid: "{{ matrix_user_gid }}"
  5053. traefik_certs_dumper_ssl_dir_path: "{{ traefik_ssl_dir_path if traefik_enabled else '' }}"
  5054. 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 }}"
  5055. ########################################################################
  5056. # #
  5057. # /traefik_certs_dumper #
  5058. # #
  5059. ########################################################################
  5060. ########################################################################
  5061. # #
  5062. # matrix-element-admin #
  5063. # #
  5064. ########################################################################
  5065. # We don't enable this by default.
  5066. matrix_element_admin_enabled: false
  5067. matrix_element_admin_scheme: "{{ 'https' if matrix_playbook_ssl_enabled else 'http' }}"
  5068. 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 }}"
  5069. matrix_element_admin_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm64'] }}"
  5070. matrix_element_admin_container_network: "{{ matrix_addons_container_network }}"
  5071. matrix_element_admin_container_additional_networks_auto: |-
  5072. {{
  5073. (
  5074. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  5075. +
  5076. ([matrix_playbook_reverse_proxyable_services_additional_network] if (matrix_playbook_reverse_proxyable_services_additional_network and matrix_element_admin_container_labels_traefik_enabled) else [])
  5077. ) | unique
  5078. }}
  5079. matrix_element_admin_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  5080. matrix_element_admin_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  5081. matrix_element_admin_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  5082. matrix_element_admin_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  5083. matrix_element_admin_systemd_required_services_list_auto: "{{ matrix_addons_homeserver_systemd_services_list }}"
  5084. ######################################################################
  5085. # #
  5086. # /matrix-element-admin #
  5087. # #
  5088. ######################################################################
  5089. ########################################################################
  5090. # #
  5091. # matrix-element-call #
  5092. # #
  5093. ########################################################################
  5094. matrix_element_call_enabled: false
  5095. matrix_element_call_scheme: "{{ 'https' if matrix_playbook_ssl_enabled else 'http' }}"
  5096. matrix_element_call_container_network: "{{ matrix_addons_container_network }}"
  5097. 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 }}"
  5098. 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 [] }}"
  5099. matrix_element_call_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  5100. matrix_element_call_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  5101. matrix_element_call_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  5102. matrix_element_call_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  5103. matrix_element_call_config_livekit_livekit_service_url: "{{ matrix_livekit_jwt_service_public_url if matrix_livekit_jwt_service_enabled else '' }}"
  5104. ########################################################################
  5105. # #
  5106. # /matrix-element-call #
  5107. # #
  5108. ########################################################################
  5109. ########################################################################
  5110. # #
  5111. # livekit-server #
  5112. # #
  5113. ########################################################################
  5114. livekit_server_enabled: "{{ matrix_rtc_enabled }}"
  5115. livekit_server_identifier: matrix-livekit-server
  5116. livekit_server_uid: "{{ matrix_user_uid }}"
  5117. livekit_server_gid: "{{ matrix_user_gid }}"
  5118. livekit_server_base_path: "{{ matrix_base_data_path }}/livekit-server"
  5119. livekit_server_hostname: "{{ matrix_server_fqn_matrix }}"
  5120. livekit_server_path_prefix: "/livekit-server"
  5121. livekit_server_container_image_self_build: "{{ matrix_architecture not in ['arm64', 'amd64'] }}"
  5122. 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 }}"
  5123. livekit_server_container_network: "{{ matrix_addons_container_network }}"
  5124. 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 [] }}"
  5125. livekit_server_container_additional_volumes_auto: |
  5126. {{
  5127. (
  5128. [
  5129. {
  5130. 'src': (traefik_certs_dumper_dumped_certificates_dir_path + '/' + livekit_server_config_turn_domain + '/certificate.crt'),
  5131. 'dst': livekit_server_config_turn_cert_file,
  5132. 'options': 'ro',
  5133. },
  5134. {
  5135. 'src': (traefik_certs_dumper_dumped_certificates_dir_path + '/' + livekit_server_config_turn_domain + '/privatekey.key'),
  5136. 'dst': livekit_server_config_turn_key_file,
  5137. 'options': 'ro',
  5138. },
  5139. ] 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 []
  5140. )
  5141. }}
  5142. livekit_server_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  5143. livekit_server_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  5144. livekit_server_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  5145. livekit_server_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  5146. livekit_server_container_labels_public_metrics_middleware_basic_auth_enabled: "{{ matrix_metrics_exposure_http_basic_auth_enabled }}"
  5147. livekit_server_container_labels_public_metrics_middleware_basic_auth_users: "{{ matrix_metrics_exposure_http_basic_auth_users }}"
  5148. livekit_server_metrics_proxying_enabled: "{{ livekit_server_config_prometheus_enabled and matrix_metrics_exposure_enabled }}"
  5149. livekit_server_metrics_proxying_hostname: "{{ matrix_metrics_exposure_hostname }}"
  5150. livekit_server_metrics_proxying_path_prefix: "{{ matrix_metrics_exposure_path_prefix }}/livekit-server"
  5151. livekit_server_config_prometheus_enabled: "{{ prometheus_enabled or matrix_metrics_exposure_enabled }}"
  5152. livekit_server_config_keys_auto: |-
  5153. {{
  5154. {}
  5155. | combine(
  5156. {matrix_livekit_jwt_service_environment_variable_livekit_key: matrix_livekit_jwt_service_environment_variable_livekit_secret}
  5157. if matrix_livekit_jwt_service_enabled else {}
  5158. )
  5159. }}
  5160. # We only wish for matrix-livekit-jwt-service to create rooms, only for users on trusted homeservers.
  5161. # See `matrix_livekit_jwt_service_environment_variable_livekit_full_access_homeservers`.
  5162. #
  5163. # Ref:
  5164. # - https://github.com/element-hq/lk-jwt-service/releases/tag/v0.3.0
  5165. # - https://github.com/livekit/livekit/blob/5e483e7554e5afbf254acf84e3ec0aa6e108e758/config-sample.yaml#L168-L170
  5166. # - https://github.com/mother-of-all-self-hosting/ansible-role-livekit-server/commit/2a1b04552634097bdd26d472502a8f5bf1b8528f
  5167. livekit_server_config_room_auto_create: false
  5168. # The playbook intentionally uses a non-standard port than the default used by the role (5349),
  5169. # because Coturn is already using that port.
  5170. # Note that TURN is not enabled by default. See `livekit_server_config_turn_enabled`.
  5171. livekit_server_config_turn_tls_port: 5350
  5172. # The playbook intentionally uses a non-standard port than the default used by the role (3478),
  5173. # because Coturn is already using that port.
  5174. # Note that TURN is not enabled by default. See `livekit_server_config_turn_enabled`.
  5175. livekit_server_config_turn_udp_port: 3479
  5176. # LiveKit's TURN implementation requires SSL certificates.
  5177. # We only enable it if we can provide them automatically via Traefik + Traefik Certs Dumper.
  5178. livekit_server_config_turn_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] and traefik_certs_dumper_enabled }}"
  5179. livekit_server_config_turn_cert_file: |-
  5180. {{
  5181. {
  5182. 'playbook-managed-traefik': ('/certificate.crt' if traefik_certs_dumper_enabled else ''),
  5183. 'other-traefik-container': ('/certificate.crt' if traefik_certs_dumper_enabled else ''),
  5184. 'none': '',
  5185. }[matrix_playbook_reverse_proxy_type]
  5186. }}
  5187. livekit_server_config_turn_key_file: |-
  5188. {{
  5189. {
  5190. 'playbook-managed-traefik': ('/privatekey.key' if traefik_certs_dumper_enabled else ''),
  5191. 'other-traefik-container': ('/privatekey.key' if traefik_certs_dumper_enabled else ''),
  5192. 'none': '',
  5193. }[matrix_playbook_reverse_proxy_type]
  5194. }}
  5195. livekit_server_systemd_required_services_list_auto: |
  5196. {{
  5197. ([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 [])
  5198. }}
  5199. ########################################################################
  5200. # #
  5201. # /livekit-server #
  5202. # #
  5203. ########################################################################
  5204. ########################################################################
  5205. # #
  5206. # matrix-livekit-jwt-service #
  5207. # #
  5208. ########################################################################
  5209. matrix_livekit_jwt_service_enabled: "{{ matrix_rtc_enabled and livekit_server_enabled }}"
  5210. matrix_livekit_jwt_service_scheme: "{{ 'https' if matrix_playbook_ssl_enabled else 'http' }}"
  5211. matrix_livekit_jwt_service_hostname: "{{ matrix_server_fqn_matrix }}"
  5212. matrix_livekit_jwt_service_path_prefix: "/livekit-jwt-service"
  5213. matrix_livekit_jwt_service_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm64'] }}"
  5214. 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 }}"
  5215. matrix_livekit_jwt_service_container_network: "{{ matrix_addons_container_network }}"
  5216. matrix_livekit_jwt_service_container_additional_networks_auto: |
  5217. {{
  5218. ([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 [])
  5219. }}
  5220. matrix_livekit_jwt_service_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  5221. matrix_livekit_jwt_service_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  5222. matrix_livekit_jwt_service_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  5223. matrix_livekit_jwt_service_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  5224. matrix_livekit_jwt_service_environment_variable_livekit_url: "{{ livekit_server_websocket_public_url }}"
  5225. matrix_livekit_jwt_service_environment_variable_livekit_key: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'lk.key', rounds=655555) | to_uuid }}"
  5226. matrix_livekit_jwt_service_environment_variable_livekit_secret: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'lk.secret', rounds=655555) | to_uuid }}"
  5227. matrix_livekit_jwt_service_environment_variable_livekit_full_access_homeservers_list: ["{{ matrix_domain }}"]
  5228. ########################################################################
  5229. # #
  5230. # /matrix-livekit-jwt-service #
  5231. # #
  5232. ########################################################################