Matrix Docker Ansible eploy
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.
 
 

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