Matrix Docker Ansible eploy
Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.
 
 

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