Matrix Docker Ansible eploy
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

6245 rivejä
329 KiB

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