Matrix Docker Ansible eploy
Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.
 
 

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