Matrix Docker Ansible eploy
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。
 
 

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