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ů.
 
 

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