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

6451 строка
339 KiB

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