Matrix Docker Ansible eploy
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.
 
 

6296 строки
331 KiB

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