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

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