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

6242 righe
327 KiB

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