Matrix Docker Ansible eploy
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.
 
 

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