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

6303 wiersze
327 KiB

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