Matrix Docker Ansible eploy
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

6644 lines
362 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_bridge_appservice_discord_config_path + '/registration.yaml,dst=/matrix-appservice-discord-registration.yaml,ro'] if matrix_bridge_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_bot_meowlnir_config_path + '/registration.yaml,dst=/matrix-bot-meowlnir-registration.yaml,ro'] if matrix_bot_meowlnir_enabled else [])
  80. +
  81. (['--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 [])
  82. +
  83. (['--mount type=bind,src=' + matrix_bridge_appservice_irc_config_path + '/registration.yaml,dst=/matrix-appservice-irc-registration.yaml,ro'] if matrix_bridge_appservice_irc_enabled else [])
  84. +
  85. (['--mount type=bind,src=' + matrix_bridge_beeper_linkedin_config_path + '/registration.yaml,dst=/matrix-beeper-linkedin-registration.yaml,ro'] if matrix_bridge_beeper_linkedin_enabled else [])
  86. +
  87. (['--mount type=bind,src=' + matrix_bridge_beeper_line_config_path + '/registration.yaml,dst=/matrix-beeper-line-registration.yaml,ro'] if matrix_bridge_beeper_line_enabled else [])
  88. +
  89. (['--mount type=bind,src=' + matrix_bridge_wechat_config_path + '/registration.yaml,dst=/matrix-wechat-registration.yaml,ro'] if matrix_bridge_wechat_enabled else [])
  90. +
  91. (['--mount type=bind,src=' + matrix_bridge_heisenbridge_base_path + '/registration.yaml,dst=/heisenbridge-registration.yaml,ro'] if matrix_bridge_heisenbridge_enabled else [])
  92. +
  93. (['--mount type=bind,src=' + matrix_bridge_hookshot_base_path + '/registration.yml,dst=/hookshot-registration.yml,ro'] if matrix_bridge_hookshot_enabled else [])
  94. +
  95. (['--mount type=bind,src=' + matrix_bridge_mautrix_bluesky_config_path + '/registration.yaml,dst=/matrix-mautrix-bluesky-registration.yaml,ro'] if matrix_bridge_mautrix_bluesky_enabled else [])
  96. +
  97. (['--mount type=bind,src=' + matrix_bridge_rustpush_config_path + '/registration.yaml,dst=/matrix-rustpush-bridge-registration.yaml,ro'] if matrix_bridge_rustpush_enabled else [])
  98. +
  99. (['--mount type=bind,src=' + matrix_bridge_mautrix_discord_config_path + '/registration.yaml,dst=/matrix-mautrix-discord-registration.yaml,ro'] if matrix_bridge_mautrix_discord_enabled else [])
  100. +
  101. (['--mount type=bind,src=' + matrix_bridge_mautrix_slack_config_path + '/registration.yaml,dst=/matrix-mautrix-slack-registration.yaml,ro'] if matrix_bridge_mautrix_slack_enabled else [])
  102. +
  103. (['--mount type=bind,src=' + matrix_bridge_mautrix_googlechat_config_path + '/registration.yaml,dst=/matrix-mautrix-googlechat-registration.yaml,ro'] if matrix_bridge_mautrix_googlechat_enabled else [])
  104. +
  105. (['--mount type=bind,src=' + matrix_bridge_mautrix_signal_config_path + '/registration.yaml,dst=/matrix-mautrix-signal-registration.yaml,ro'] if matrix_bridge_mautrix_signal_enabled else [])
  106. +
  107. (['--mount type=bind,src=' + matrix_bridge_mautrix_meta_messenger_config_path + '/registration.yaml,dst=/matrix-mautrix-meta-messenger-registration.yaml,ro'] if matrix_bridge_mautrix_meta_messenger_enabled else [])
  108. +
  109. (['--mount type=bind,src=' + matrix_bridge_mautrix_meta_instagram_config_path + '/registration.yaml,dst=/matrix-mautrix-meta-instagram-registration.yaml,ro'] if matrix_bridge_mautrix_meta_instagram_enabled else [])
  110. +
  111. (['--mount type=bind,src=' + matrix_bridge_mautrix_telegram_config_path + '/registration.yaml,dst=/matrix-mautrix-telegram-registration.yaml,ro'] if matrix_bridge_mautrix_telegram_enabled else [])
  112. +
  113. (['--mount type=bind,src=' + matrix_bridge_mautrix_twitter_config_path + '/registration.yaml,dst=/matrix-mautrix-twitter-registration.yaml,ro'] if matrix_bridge_mautrix_twitter_enabled else [])
  114. +
  115. (['--mount type=bind,src=' + matrix_bridge_mautrix_gmessages_config_path + '/registration.yaml,dst=/matrix-mautrix-gmessages-registration.yaml,ro'] if matrix_bridge_mautrix_gmessages_enabled else [])
  116. +
  117. (['--mount type=bind,src=' + matrix_bridge_mautrix_gvoice_config_path + '/registration.yaml,dst=/matrix-mautrix-gvoice-registration.yaml,ro'] if matrix_bridge_mautrix_gvoice_enabled else [])
  118. +
  119. (['--mount type=bind,src=' + matrix_bridge_mautrix_linkedin_config_path + '/registration.yaml,dst=/matrix-mautrix-linkedin-registration.yaml,ro'] if matrix_bridge_mautrix_linkedin_enabled else [])
  120. +
  121. (['--mount type=bind,src=' + matrix_bridge_mautrix_whatsapp_config_path + '/registration.yaml,dst=/matrix-mautrix-whatsapp-registration.yaml,ro'] if matrix_bridge_mautrix_whatsapp_enabled else [])
  122. +
  123. (['--mount type=bind,src=' + matrix_bridge_mautrix_wsproxy_config_path + '/androidsms-registration.yaml,dst=/matrix-mautrix-androidsms-registration.yaml,ro'] if matrix_bridge_mautrix_wsproxy_enabled else [])
  124. +
  125. (['--mount type=bind,src=' + matrix_bridge_mautrix_wsproxy_config_path + '/imessage-registration.yaml,dst=/matrix-mautrix-imessage-registration.yaml,ro'] if matrix_bridge_mautrix_wsproxy_enabled else [])
  126. +
  127. (['--mount type=bind,src=' + matrix_bridge_mx_puppet_groupme_config_path + '/registration.yaml,dst=/matrix-mx-puppet-groupme-registration.yaml,ro'] if matrix_bridge_mx_puppet_groupme_enabled else [])
  128. +
  129. (['--mount type=bind,src=' + matrix_bridge_mx_puppet_steam_config_path + '/registration.yaml,dst=/matrix-mx-puppet-steam-registration.yaml,ro'] if matrix_bridge_mx_puppet_steam_enabled else [])
  130. +
  131. (['--mount type=bind,src=' + matrix_bridge_sms_config_path + '/registration.yaml,dst=/matrix-sms-bridge-registration.yaml,ro'] if matrix_bridge_sms_enabled else [])
  132. +
  133. (['--mount type=bind,src=' + matrix_bridge_steam_config_path + '/registration.yaml,dst=/matrix-steam-bridge-registration.yaml,ro'] if matrix_bridge_steam_enabled else [])
  134. +
  135. (['--mount type=bind,src=' + matrix_cactus_comments_app_service_config_file + ',dst=/matrix-cactus-comments.yaml,ro'] if matrix_cactus_comments_enabled else [])
  136. }}
  137. matrix_homeserver_app_service_config_files_auto: |
  138. {{
  139. (['/matrix-appservice-discord-registration.yaml'] if matrix_bridge_appservice_discord_enabled else [])
  140. +
  141. (['/matrix-appservice-draupnir-for-all-registration.yaml'] if matrix_appservice_draupnir_for_all_enabled else [])
  142. +
  143. (['/matrix-bot-meowlnir-registration.yaml'] if matrix_bot_meowlnir_enabled else [])
  144. +
  145. (['/matrix-appservice-double-puppet-registration.yaml'] if matrix_appservice_double_puppet_enabled else [])
  146. +
  147. (['/matrix-appservice-irc-registration.yaml'] if matrix_bridge_appservice_irc_enabled else [])
  148. +
  149. (['/matrix-beeper-linkedin-registration.yaml'] if matrix_bridge_beeper_linkedin_enabled else [])
  150. +
  151. (['/matrix-beeper-line-registration.yaml'] if matrix_bridge_beeper_line_enabled else [])
  152. +
  153. (['/matrix-wechat-registration.yaml'] if matrix_bridge_wechat_enabled else [])
  154. +
  155. (['/heisenbridge-registration.yaml'] if matrix_bridge_heisenbridge_enabled else [])
  156. +
  157. (['/hookshot-registration.yml'] if matrix_bridge_hookshot_enabled else [])
  158. +
  159. (['/matrix-mautrix-bluesky-registration.yaml'] if matrix_bridge_mautrix_bluesky_enabled else [])
  160. +
  161. (['/matrix-rustpush-bridge-registration.yaml'] if matrix_bridge_rustpush_enabled else [])
  162. +
  163. (['/matrix-mautrix-discord-registration.yaml'] if matrix_bridge_mautrix_discord_enabled else [])
  164. +
  165. (['/matrix-mautrix-slack-registration.yaml'] if matrix_bridge_mautrix_slack_enabled else [])
  166. +
  167. (['/matrix-mautrix-googlechat-registration.yaml'] if matrix_bridge_mautrix_googlechat_enabled else [])
  168. +
  169. (['/matrix-mautrix-signal-registration.yaml'] if matrix_bridge_mautrix_signal_enabled else [])
  170. +
  171. (['/matrix-mautrix-meta-messenger-registration.yaml'] if matrix_bridge_mautrix_meta_messenger_enabled else [])
  172. +
  173. (['/matrix-mautrix-meta-instagram-registration.yaml'] if matrix_bridge_mautrix_meta_instagram_enabled else [])
  174. +
  175. (['/matrix-mautrix-telegram-registration.yaml'] if matrix_bridge_mautrix_telegram_enabled else [])
  176. +
  177. (['/matrix-mautrix-twitter-registration.yaml'] if matrix_bridge_mautrix_twitter_enabled else [])
  178. +
  179. (['/matrix-mautrix-gmessages-registration.yaml'] if matrix_bridge_mautrix_gmessages_enabled else [])
  180. +
  181. (['/matrix-mautrix-gvoice-registration.yaml'] if matrix_bridge_mautrix_gvoice_enabled else [])
  182. +
  183. (['/matrix-mautrix-linkedin-registration.yaml'] if matrix_bridge_mautrix_linkedin_enabled else [])
  184. +
  185. (['/matrix-mautrix-whatsapp-registration.yaml'] if matrix_bridge_mautrix_whatsapp_enabled else [])
  186. +
  187. (['/matrix-mautrix-androidsms-registration.yaml'] if matrix_bridge_mautrix_wsproxy_enabled else [])
  188. +
  189. (['/matrix-mautrix-imessage-registration.yaml'] if matrix_bridge_mautrix_wsproxy_enabled else [])
  190. +
  191. (['/matrix-mx-puppet-groupme-registration.yaml'] if matrix_bridge_mx_puppet_groupme_enabled else [])
  192. +
  193. (['/matrix-mx-puppet-steam-registration.yaml'] if matrix_bridge_mx_puppet_steam_enabled else [])
  194. +
  195. (['/matrix-sms-bridge-registration.yaml'] if matrix_bridge_sms_enabled else [])
  196. +
  197. (['/matrix-cactus-comments.yaml'] if matrix_cactus_comments_enabled else [])
  198. +
  199. (['/matrix-steam-bridge-registration.yaml'] if matrix_bridge_steam_enabled else [])
  200. }}
  201. 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 }}"
  202. 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 }}"
  203. matrix_addons_homeserver_systemd_services_list: |
  204. {{
  205. (
  206. matrix_homeserver_systemd_services_list
  207. +
  208. (
  209. [traefik_identifier + '.service']
  210. if matrix_playbook_reverse_proxy_type == 'playbook-managed-traefik'
  211. else []
  212. )
  213. )
  214. if matrix_playbook_internal_matrix_client_api_traefik_entrypoint_enabled
  215. else matrix_homeserver_systemd_services_list
  216. }}
  217. ########################################################################
  218. # #
  219. # /base #
  220. # #
  221. ########################################################################
  222. ########################################################################
  223. # #
  224. # com.devture.ansible.role.systemd_service_manager #
  225. # #
  226. ########################################################################
  227. # This list is not exhaustive and final.
  228. # Synapse workers are still injected into the list at runtime.
  229. # Additional JVB workers (jitsi_jvb.yml — roles/galaxy/jitsi/tasks/init_additional_jvb.yml) override this variable at runtime as well.
  230. #
  231. # Priority levels are like this:
  232. # - Traefik starts first with a level of 250, so that:
  233. # - it can get an early start on obtaining SSL certificates and routing to other services as soon as they start (later)
  234. # - so that addon services (starting later) can communicte with the homeserver via Traefik's internal entrypoint
  235. # (see `matrix_playbook_internal_matrix_client_api_traefik_entrypoint_enabled`)
  236. # - core services (the homeserver) get a level of ~1000
  237. # - services that the homeserver depends on (database, Redis, ntfy, etc.) get a lower level — between 500 and 1000
  238. # - coturn gets a higher priority level (= starts later) in all cases, to intentionally delay it in relation to the homeserver, because:
  239. # - when starting services one by one, the service manager waits for each service to fully start before proceeding to the next one
  240. # - if coturn has a lower priority than the homeserver, it would be started before it
  241. # - 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
  242. # - 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.
  243. # - only later, when the homeserver actually starts, would that certificate be fetched and dumped
  244. # - 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`
  245. # - reverse-proxying services get level 3000
  246. # - Matrix utility services (bridges, bots) get a level of 2000/2200, so that:
  247. # - they can start before the reverse-proxy
  248. # - so that, when the reverse-proxy is up (Matrix is up), all bots and bridges can be interacted with
  249. # - monitoring services (Prometheus, Grafana, …) get a level of 4000 — they can start later than all-of-Matrix
  250. # - services which aren't time-sensitive (various crons and timers) get a level of 5000 — they can start later than all-of-Matrix
  251. # The systemd_service_manager role supports conditional restart — only restarting services
  252. # whose configuration or container image actually changed, leaving unchanged services running.
  253. # This is controlled by `devture_systemd_service_manager_conditional_restart_enabled` (default: true in the role).
  254. #
  255. # We override it here to automatically match the intent of the playbook tags being used:
  256. # - install-* tags (regular upgrades): conditional restart ON — only changed services restart, reducing downtime
  257. # - setup-* tags (full setup/reconfiguration): conditional restart OFF — all services restart unconditionally
  258. #
  259. # This ensures consistent behavior whether users invoke the playbook via `just` shortcuts
  260. # or raw `ansible-playbook --tags=...` commands.
  261. devture_systemd_service_manager_conditional_restart_enabled: "{{ ansible_run_tags | select('match', 'setup-') | list | length == 0 }}"
  262. devture_systemd_service_manager_services_list_auto: |
  263. {{
  264. ([{
  265. 'name': (backup_borg_identifier + '.timer'),
  266. 'priority': 5000,
  267. 'restart_necessary': (backup_borg_restart_necessary | bool),
  268. 'groups': ['matrix', 'backup', 'borg'],
  269. }] if backup_borg_enabled else [])
  270. +
  271. ([{
  272. 'name': 'matrix-alertmanager-receiver.service',
  273. 'priority': 2200,
  274. 'restart_necessary': (matrix_alertmanager_receiver_restart_necessary | bool),
  275. 'groups': ['matrix', 'alertmanager-receiver'],
  276. }] if matrix_alertmanager_receiver_enabled else [])
  277. +
  278. ([{
  279. 'name': 'matrix-authentication-service.service',
  280. 'priority': 2200,
  281. 'restart_necessary': (matrix_authentication_service_restart_necessary | bool),
  282. 'groups': ['matrix', 'matrix-authentication-service'],
  283. }] if matrix_authentication_service_enabled else [])
  284. +
  285. ([{
  286. 'name': 'matrix-bot-buscarron.service',
  287. 'priority': 2200,
  288. 'restart_necessary': (matrix_bot_buscarron_restart_necessary | bool),
  289. 'groups': ['matrix', 'bots', 'buscarron', 'bot-buscarron'],
  290. }] if matrix_bot_buscarron_enabled else [])
  291. +
  292. ([{
  293. 'name': 'matrix-bot-baibot.service',
  294. 'priority': 2200,
  295. 'restart_necessary': (matrix_bot_baibot_restart_necessary | bool),
  296. 'groups': ['matrix', 'bots', 'baibot', 'bot-baibot'],
  297. }] if matrix_bot_baibot_enabled else [])
  298. +
  299. ([{
  300. 'name': 'matrix-bot-honoroit.service',
  301. 'priority': 2200,
  302. 'restart_necessary': (matrix_bot_honoroit_restart_necessary | bool),
  303. 'groups': ['matrix', 'bots', 'honoroit', 'bot-honoroit'],
  304. }] if matrix_bot_honoroit_enabled else [])
  305. +
  306. ([{
  307. 'name': 'matrix-bot-matrix-reminder-bot.service',
  308. 'priority': 2200,
  309. 'restart_necessary': (matrix_bot_matrix_reminder_bot_restart_necessary | bool),
  310. 'groups': ['matrix', 'bots', 'reminder-bot', 'bot-matrix-reminder-bot'],
  311. }] if matrix_bot_matrix_reminder_bot_enabled else [])
  312. +
  313. ([{
  314. 'name': 'matrix-bot-maubot.service',
  315. 'priority': 2200,
  316. 'restart_necessary': (matrix_bot_maubot_restart_necessary | bool),
  317. 'groups': ['matrix', 'bots', 'maubot', 'bot-maubot'],
  318. }] if matrix_bot_maubot_enabled else [])
  319. +
  320. ([{
  321. 'name': 'matrix-bot-mjolnir.service',
  322. 'priority': 4000,
  323. 'restart_necessary': (matrix_bot_mjolnir_restart_necessary | bool),
  324. 'groups': ['matrix', 'bots', 'mjolnir', 'bot-mjolnir'],
  325. }] if matrix_bot_mjolnir_enabled else [])
  326. +
  327. ([{
  328. 'name': 'matrix-bot-draupnir.service',
  329. 'priority': 4000,
  330. 'restart_necessary': (matrix_bot_draupnir_restart_necessary | bool),
  331. 'groups': ['matrix', 'bots', 'draupnir', 'bot-draupnir'],
  332. }] if matrix_bot_draupnir_enabled else [])
  333. +
  334. ([{
  335. 'name': 'matrix-bot-meowlnir.service',
  336. 'priority': 4000,
  337. 'restart_necessary': (matrix_bot_meowlnir_restart_necessary | bool),
  338. 'groups': ['matrix', 'bots', 'meowlnir', 'bot-meowlnir'],
  339. }] if matrix_bot_meowlnir_enabled else [])
  340. +
  341. ([{
  342. 'name': 'matrix-appservice-discord.service',
  343. 'priority': 2000,
  344. 'restart_necessary': (matrix_bridge_appservice_discord_restart_necessary | bool),
  345. 'groups': ['matrix', 'bridges', 'appservice-discord'],
  346. }] if matrix_bridge_appservice_discord_enabled else [])
  347. +
  348. ([{
  349. 'name': 'matrix-appservice-draupnir-for-all.service',
  350. 'priority': 4000,
  351. 'restart_necessary': (matrix_appservice_draupnir_for_all_restart_necessary | bool),
  352. 'groups': ['matrix', 'bridges', 'draupnir-for-all', 'appservice-draupnir-for-all'],
  353. }] if matrix_appservice_draupnir_for_all_enabled else [])
  354. +
  355. ([{
  356. 'name': 'matrix-appservice-irc.service',
  357. 'priority': 2000,
  358. 'restart_necessary': (matrix_bridge_appservice_irc_restart_necessary | bool),
  359. 'groups': ['matrix', 'bridges', 'appservice-irc'],
  360. }] if matrix_bridge_appservice_irc_enabled else [])
  361. +
  362. ([{
  363. 'name': 'matrix-beeper-linkedin.service',
  364. 'priority': 2000,
  365. 'restart_necessary': (matrix_bridge_beeper_linkedin_restart_necessary | bool),
  366. 'groups': ['matrix', 'bridges', 'beeper-linkedin'],
  367. }] if matrix_bridge_beeper_linkedin_enabled else [])
  368. +
  369. ([{
  370. 'name': 'matrix-beeper-line.service',
  371. 'priority': 2000,
  372. 'restart_necessary': (matrix_bridge_beeper_line_restart_necessary | bool),
  373. 'groups': ['matrix', 'bridges', 'beeper-line'],
  374. }] if matrix_bridge_beeper_line_enabled else [])
  375. +
  376. ([{
  377. 'name': 'matrix-wechat.service',
  378. 'priority': 2000,
  379. 'restart_necessary': (matrix_bridge_wechat_restart_necessary | bool),
  380. 'groups': ['matrix', 'bridges', 'wechat'],
  381. }] if matrix_bridge_wechat_enabled else [])
  382. +
  383. ([{
  384. 'name': 'matrix-wechat-agent.service',
  385. 'priority': 2000,
  386. 'restart_necessary': (matrix_bridge_wechat_restart_necessary | bool),
  387. 'groups': ['matrix', 'bridges', 'wechat'],
  388. }] if matrix_bridge_wechat_enabled else [])
  389. +
  390. ([{
  391. 'name': 'matrix-heisenbridge.service',
  392. 'priority': 2000,
  393. 'restart_necessary': (matrix_bridge_heisenbridge_restart_necessary | bool),
  394. 'groups': ['matrix', 'bridges', 'heisenbridge'],
  395. }] if matrix_bridge_heisenbridge_enabled else [])
  396. +
  397. ([{
  398. 'name': 'matrix-hookshot.service',
  399. 'priority': 2000,
  400. 'restart_necessary': (matrix_bridge_hookshot_restart_necessary | bool),
  401. 'groups': ['matrix', 'bridges', 'hookshot', 'bridge-hookshot'],
  402. }] if matrix_bridge_hookshot_enabled else [])
  403. +
  404. ([{
  405. 'name': 'matrix-meshtastic-relay.service',
  406. 'priority': 2000,
  407. 'restart_necessary': (matrix_bridge_meshtastic_relay_restart_necessary | bool),
  408. 'groups': ['matrix', 'bridges', 'meshtastic-relay'],
  409. }] if matrix_bridge_meshtastic_relay_enabled else [])
  410. +
  411. ([{
  412. 'name': 'matrix-mautrix-bluesky.service',
  413. 'priority': 2000,
  414. 'restart_necessary': (matrix_bridge_mautrix_bluesky_restart_necessary | bool),
  415. 'groups': ['matrix', 'bridges', 'mautrix-bluesky'],
  416. }] if matrix_bridge_mautrix_bluesky_enabled else [])
  417. +
  418. ([{
  419. 'name': 'matrix-rustpush-bridge.service',
  420. 'priority': 2000,
  421. 'restart_necessary': (matrix_bridge_rustpush_restart_necessary | bool),
  422. 'groups': ['matrix', 'bridges', 'matrix-rustpush-bridge'],
  423. }] if matrix_bridge_rustpush_enabled else [])
  424. +
  425. ([{
  426. 'name': 'matrix-mautrix-discord.service',
  427. 'priority': 2000,
  428. 'restart_necessary': (matrix_bridge_mautrix_discord_restart_necessary | bool),
  429. 'groups': ['matrix', 'bridges', 'mautrix-discord'],
  430. }] if matrix_bridge_mautrix_discord_enabled else [])
  431. +
  432. ([{
  433. 'name': 'matrix-mautrix-slack.service',
  434. 'priority': 2000,
  435. 'restart_necessary': (matrix_bridge_mautrix_slack_restart_necessary | bool),
  436. 'groups': ['matrix', 'bridges', 'mautrix-slack'],
  437. }] if matrix_bridge_mautrix_slack_enabled else [])
  438. +
  439. ([{
  440. 'name': 'matrix-mautrix-googlechat.service',
  441. 'priority': 2000,
  442. 'restart_necessary': (matrix_bridge_mautrix_googlechat_restart_necessary | bool),
  443. 'groups': ['matrix', 'bridges', 'mautrix-googlechat'],
  444. }] if matrix_bridge_mautrix_googlechat_enabled else [])
  445. +
  446. ([{
  447. 'name': 'matrix-mautrix-signal.service',
  448. 'priority': 2000,
  449. 'restart_necessary': (matrix_bridge_mautrix_signal_restart_necessary | bool),
  450. 'groups': ['matrix', 'bridges', 'mautrix-signal', 'mautrix-signal'],
  451. }] if matrix_bridge_mautrix_signal_enabled else [])
  452. +
  453. ([{
  454. 'name': (matrix_bridge_mautrix_meta_messenger_identifier + '.service'),
  455. 'priority': 2000,
  456. 'restart_necessary': (matrix_bridge_mautrix_meta_messenger_restart_necessary | bool),
  457. 'groups': ['matrix', 'bridges', 'mautrix-meta', 'mautrix-meta-messenger'],
  458. }] if matrix_bridge_mautrix_meta_messenger_enabled else [])
  459. +
  460. ([{
  461. 'name': (matrix_bridge_mautrix_meta_instagram_identifier + '.service'),
  462. 'priority': 2000,
  463. 'restart_necessary': (matrix_bridge_mautrix_meta_instagram_restart_necessary | bool),
  464. 'groups': ['matrix', 'bridges', 'mautrix-meta', 'mautrix-meta-instagram'],
  465. }] if matrix_bridge_mautrix_meta_instagram_enabled else [])
  466. +
  467. ([{
  468. 'name': 'matrix-mautrix-telegram.service',
  469. 'priority': 2000,
  470. 'restart_necessary': (matrix_bridge_mautrix_telegram_restart_necessary | bool),
  471. 'groups': ['matrix', 'bridges', 'mautrix-telegram'],
  472. }] if matrix_bridge_mautrix_telegram_enabled else [])
  473. +
  474. ([{
  475. 'name': 'matrix-mautrix-twitter.service',
  476. 'priority': 2000,
  477. 'restart_necessary': (matrix_bridge_mautrix_twitter_restart_necessary | bool),
  478. 'groups': ['matrix', 'bridges', 'mautrix-twitter'],
  479. }] if matrix_bridge_mautrix_twitter_enabled else [])
  480. +
  481. ([{
  482. 'name': 'matrix-mautrix-gmessages.service',
  483. 'priority': 2000,
  484. 'restart_necessary': (matrix_bridge_mautrix_gmessages_restart_necessary | bool),
  485. 'groups': ['matrix', 'bridges', 'mautrix-gmessages'],
  486. }] if matrix_bridge_mautrix_gmessages_enabled else [])
  487. +
  488. ([{
  489. 'name': 'matrix-mautrix-gvoice.service',
  490. 'priority': 2000,
  491. 'restart_necessary': (matrix_bridge_mautrix_gvoice_restart_necessary | bool),
  492. 'groups': ['matrix', 'bridges', 'mautrix-gvoice'],
  493. }] if matrix_bridge_mautrix_gvoice_enabled else [])
  494. +
  495. ([{
  496. 'name': 'matrix-mautrix-linkedin.service',
  497. 'priority': 2000,
  498. 'restart_necessary': (matrix_bridge_mautrix_linkedin_restart_necessary | bool),
  499. 'groups': ['matrix', 'bridges', 'mautrix-linkedin'],
  500. }] if matrix_bridge_mautrix_linkedin_enabled else [])
  501. +
  502. ([{
  503. 'name': 'matrix-mautrix-whatsapp.service',
  504. 'priority': 2000,
  505. 'restart_necessary': (matrix_bridge_mautrix_whatsapp_restart_necessary | bool),
  506. 'groups': ['matrix', 'bridges', 'mautrix-whatsapp'],
  507. }] if matrix_bridge_mautrix_whatsapp_enabled else [])
  508. +
  509. ([{
  510. 'name': 'matrix-mautrix-wsproxy.service',
  511. 'priority': 2000,
  512. 'restart_necessary': (matrix_bridge_mautrix_wsproxy_restart_necessary | bool),
  513. 'groups': ['matrix', 'bridges', 'mautrix-wsproxy'],
  514. }] if matrix_bridge_mautrix_wsproxy_enabled else [])
  515. +
  516. ([{
  517. 'name': 'matrix-mautrix-wsproxy-syncproxy.service',
  518. 'priority': 2000,
  519. 'restart_necessary': (matrix_bridge_mautrix_wsproxy_syncproxy_restart_necessary | bool),
  520. 'groups': ['matrix', 'bridges', 'mautrix-wsproxy-syncproxy'],
  521. }] if matrix_bridge_mautrix_wsproxy_enabled else [])
  522. +
  523. ([{
  524. 'name': 'matrix-mx-puppet-groupme.service',
  525. 'priority': 2000,
  526. 'restart_necessary': (matrix_bridge_mx_puppet_groupme_restart_necessary | bool),
  527. 'groups': ['matrix', 'bridges', 'mx-puppet-groupme'],
  528. }] if matrix_bridge_mx_puppet_groupme_enabled else [])
  529. +
  530. ([{
  531. 'name': 'matrix-mx-puppet-steam.service',
  532. 'priority': 2000,
  533. 'restart_necessary': (matrix_bridge_mx_puppet_steam_restart_necessary | bool),
  534. 'groups': ['matrix', 'bridges', 'mx-puppet-steam'],
  535. }] if matrix_bridge_mx_puppet_steam_enabled else [])
  536. +
  537. ([{
  538. 'name': 'matrix-postmoogle.service',
  539. 'priority': 2200,
  540. 'restart_necessary': (matrix_bridge_postmoogle_restart_necessary | bool),
  541. 'groups': ['matrix', 'bridges', 'postmoogle'],
  542. }] if matrix_bridge_postmoogle_enabled else [])
  543. +
  544. ([{
  545. 'name': 'matrix-sms-bridge.service',
  546. 'priority': 2000,
  547. 'restart_necessary': (matrix_bridge_sms_restart_necessary | bool),
  548. 'groups': ['matrix', 'bridges', 'sms'],
  549. }] if matrix_bridge_sms_enabled else [])
  550. +
  551. ([{
  552. 'name': 'matrix-steam-bridge.service',
  553. 'priority': 2000,
  554. 'restart_necessary': (matrix_bridge_steam_restart_necessary | bool),
  555. 'groups': ['matrix', 'bridges', 'matrix-steam-bridge'],
  556. }] if matrix_bridge_steam_enabled else [])
  557. +
  558. ([{
  559. 'name': 'matrix-cactus-comments.service',
  560. 'priority': 2000,
  561. 'restart_necessary': (matrix_cactus_comments_restart_necessary | bool),
  562. 'groups': ['matrix', 'cactus-comments'],
  563. }] if matrix_cactus_comments_enabled else [])
  564. +
  565. ([{
  566. 'name': 'matrix-cactus-comments-client.service',
  567. 'priority': 2000,
  568. 'restart_necessary': (matrix_cactus_comments_client_restart_necessary | bool),
  569. 'groups': ['matrix', 'cactus-comments-client'],
  570. }] if matrix_cactus_comments_client_enabled else [])
  571. +
  572. ([{
  573. 'name': (cinny_identifier + '.service'),
  574. 'priority': 2000,
  575. 'restart_necessary': (cinny_restart_necessary | bool),
  576. 'groups': ['matrix', 'clients', 'cinny', 'client-cinny'],
  577. }] if cinny_enabled else [])
  578. +
  579. ([{
  580. 'name': (sable_identifier + '.service'),
  581. 'priority': 2000,
  582. 'restart_necessary': (sable_restart_necessary | bool),
  583. 'groups': ['matrix', 'clients', 'sable', 'client-sable'],
  584. }] if sable_enabled else [])
  585. +
  586. ([{
  587. 'name': 'matrix-client-element.service',
  588. 'priority': 2000,
  589. 'restart_necessary': (matrix_client_element_restart_necessary | bool),
  590. 'groups': ['matrix', 'clients', 'element', 'client-element'],
  591. }] if matrix_client_element_enabled else [])
  592. +
  593. ([{
  594. 'name': (hydrogen_identifier + '.service'),
  595. 'priority': 2000,
  596. 'restart_necessary': (hydrogen_restart_necessary | bool),
  597. 'groups': ['matrix', 'clients', 'hydrogen', 'client-hydrogen'],
  598. }] if hydrogen_enabled else [])
  599. +
  600. ([{
  601. 'name': 'matrix-client-schildichat.service',
  602. 'priority': 2000,
  603. 'restart_necessary': (matrix_client_schildichat_restart_necessary | bool),
  604. 'groups': ['matrix', 'clients', 'schildichat', 'client-schildichat'],
  605. }] if matrix_client_schildichat_enabled else [])
  606. +
  607. ([{
  608. 'name': 'matrix-client-commet.service',
  609. 'priority': 2000,
  610. 'restart_necessary': (matrix_client_commet_restart_necessary | bool),
  611. 'groups': ['matrix', 'clients', 'commet', 'client-commet'],
  612. }] if matrix_client_commet_enabled else [])
  613. +
  614. ([{
  615. 'name': 'matrix-client-fluffychat.service',
  616. 'priority': 2000,
  617. 'restart_necessary': (matrix_client_fluffychat_restart_necessary | bool),
  618. 'groups': ['matrix', 'clients', 'fluffychat', 'client-fluffychat'],
  619. }] if matrix_client_fluffychat_enabled else [])
  620. +
  621. ([{
  622. 'name': ('matrix-' + matrix_homeserver_implementation + '.service'),
  623. 'priority': matrix_homeserver_systemd_service_manager_priority,
  624. 'restart_necessary': (
  625. (matrix_conduit_restart_necessary | bool) if matrix_homeserver_implementation == 'conduit'
  626. else (matrix_continuwuity_restart_necessary | bool) if matrix_homeserver_implementation == 'continuwuity'
  627. else (matrix_tuwunel_restart_necessary | bool) if matrix_homeserver_implementation == 'tuwunel'
  628. else (matrix_dendrite_restart_necessary | bool) if matrix_homeserver_implementation == 'dendrite'
  629. else true
  630. ),
  631. 'groups': ['matrix', 'homeservers', matrix_homeserver_implementation],
  632. }] if matrix_homeserver_enabled else [])
  633. +
  634. ([{
  635. 'name': 'matrix-corporal.service',
  636. 'priority': (matrix_homeserver_systemd_service_manager_priority + 500),
  637. 'restart_necessary': (matrix_corporal_restart_necessary | bool),
  638. 'groups': ['matrix', 'corporal'],
  639. }] if matrix_corporal_enabled else [])
  640. +
  641. ([{
  642. 'name': 'matrix-matrixto.service',
  643. 'priority': 4000,
  644. 'restart_necessary': (matrix_matrixto_restart_necessary | bool),
  645. 'groups': ['matrix', 'matrixto'],
  646. }] if matrix_matrixto_enabled else [])
  647. +
  648. ([{
  649. 'name': 'matrix-rageshake.service',
  650. 'priority': 4000,
  651. 'restart_necessary': (matrix_rageshake_restart_necessary | bool),
  652. 'groups': ['matrix', 'rageshake'],
  653. }] if matrix_rageshake_enabled else [])
  654. +
  655. ([{
  656. 'name': (coturn_identifier + '.service'),
  657. 'priority': (matrix_homeserver_systemd_service_manager_priority + 500),
  658. 'restart_necessary': (coturn_restart_necessary | bool),
  659. 'groups': ['matrix', 'coturn'],
  660. }] if coturn_enabled else [])
  661. +
  662. ([{
  663. 'name': (coturn_identifier + '-reload.timer'),
  664. 'priority': 5000,
  665. 'restart_necessary': (coturn_restart_necessary | bool),
  666. 'groups': ['matrix', 'coturn'],
  667. }] if (coturn_enabled and coturn_tls_enabled) else [])
  668. +
  669. ([{
  670. 'name': (ddclient_identifier + '.service'),
  671. 'priority': 5000,
  672. 'restart_necessary': (ddclient_restart_necessary | bool),
  673. 'groups': ['matrix', 'ddclient', 'dynamic-dns'],
  674. }] if ddclient_enabled else [])
  675. +
  676. ([{
  677. 'name': (etherpad_identifier + '.service'),
  678. 'priority': 4000,
  679. 'restart_necessary': (etherpad_restart_necessary | bool),
  680. 'groups': ['matrix', 'etherpad'],
  681. }] if etherpad_enabled else [])
  682. +
  683. ([{
  684. 'name': (grafana_identifier + '.service'),
  685. 'priority': 4000,
  686. 'restart_necessary': (grafana_restart_necessary | bool),
  687. 'groups': ['matrix', 'monitoring', 'grafana'],
  688. }] if grafana_enabled else [])
  689. +
  690. ([{
  691. 'name': (jitsi_identifier + '-web.service'),
  692. 'priority': 4200,
  693. 'restart_necessary': (jitsi_web_restart_necessary | bool),
  694. 'groups': ['matrix', 'jitsi', 'jitsi-web'],
  695. }] if jitsi_enabled else [])
  696. +
  697. ([{
  698. 'name': (jitsi_identifier + '-prosody.service'),
  699. 'priority': 4000,
  700. 'restart_necessary': (jitsi_prosody_restart_necessary | bool),
  701. 'groups': ['matrix', 'jitsi', 'jitsi-prosody'],
  702. }] if jitsi_enabled else [])
  703. +
  704. ([{
  705. 'name': (jitsi_identifier + '-jicofo.service'),
  706. 'priority': 4100,
  707. 'restart_necessary': (jitsi_jicofo_restart_necessary | bool),
  708. 'groups': ['matrix', 'jitsi', 'jitsi-jicofo'],
  709. }] if jitsi_enabled else [])
  710. +
  711. ([{
  712. 'name': (jitsi_identifier + '-jvb.service'),
  713. 'priority': 4100,
  714. 'restart_necessary': (jitsi_jvb_restart_necessary | bool),
  715. 'groups': ['matrix', 'jitsi', 'jitsi-jvb'],
  716. }] if jitsi_enabled else [])
  717. +
  718. ([{
  719. 'name': (matrix_media_repo_identifier + '.service'),
  720. 'priority': 4000,
  721. 'restart_necessary': (matrix_media_repo_restart_necessary | bool),
  722. 'groups': ['matrix', 'matrix-media-repo'],
  723. }] if matrix_media_repo_enabled else [])
  724. +
  725. ([{
  726. 'name': (exim_relay_identifier ~ '.service'),
  727. 'priority': 800,
  728. 'restart_necessary': (exim_relay_restart_necessary | bool),
  729. 'groups': ['matrix', 'mailer', 'exim-relay'],
  730. }] if exim_relay_enabled else [])
  731. +
  732. ([{
  733. 'name': (ntfy_identifier + '.service'),
  734. 'priority': 800,
  735. 'restart_necessary': (ntfy_restart_necessary | bool),
  736. 'groups': ['matrix', 'ntfy'],
  737. }] if ntfy_enabled else [])
  738. +
  739. ([{
  740. 'name': (postgres_identifier + '.service'),
  741. 'priority': 500,
  742. 'restart_necessary': (postgres_restart_necessary | bool),
  743. 'groups': ['matrix', 'postgres'],
  744. }] if postgres_enabled else [])
  745. +
  746. ([{
  747. 'name': (postgres_backup_identifier + '.service'),
  748. 'priority': 5000,
  749. 'restart_necessary': (postgres_backup_restart_necessary | bool),
  750. 'groups': ['matrix', 'backup', 'postgres-backup'],
  751. }] if postgres_backup_enabled else [])
  752. +
  753. ([{
  754. 'name': (prometheus_identifier + '.service'),
  755. 'priority': 4000,
  756. 'restart_necessary': (prometheus_restart_necessary | bool),
  757. 'groups': ['matrix', 'monitoring', 'prometheus'],
  758. }] if prometheus_enabled else [])
  759. +
  760. ([{
  761. 'name': (prometheus_node_exporter_identifier + '.service'),
  762. 'priority': 3900,
  763. 'restart_necessary': (prometheus_node_exporter_restart_necessary | bool),
  764. 'groups': ['matrix', 'monitoring', 'prometheus-exporters', 'prometheus-node-exporter'],
  765. }] if prometheus_node_exporter_enabled else [])
  766. +
  767. ([{
  768. 'name': (prometheus_postgres_exporter_identifier + '.service'),
  769. 'priority': 3900,
  770. 'restart_necessary': (prometheus_postgres_exporter_restart_necessary | bool),
  771. 'groups': ['matrix', 'monitoring', 'prometheus-exporters', 'prometheus-postgres-exporter'],
  772. }] if prometheus_postgres_exporter_enabled else [])
  773. +
  774. ([{
  775. 'name': (prometheus_nginxlog_exporter_identifier + '.service'),
  776. 'priority': 3900,
  777. 'restart_necessary': (prometheus_nginxlog_exporter_restart_necessary | bool),
  778. 'groups': ['matrix', 'monitoring', 'prometheus-exporters', 'prometheus-nginxlog-exporter'],
  779. }] if prometheus_nginxlog_exporter_enabled else [])
  780. +
  781. ([{
  782. 'name': (valkey_identifier + '.service'),
  783. 'priority': 750,
  784. 'restart_necessary': (valkey_restart_necessary | bool),
  785. 'groups': ['matrix', 'valkey'],
  786. }] if valkey_enabled else [])
  787. +
  788. ([{
  789. 'name': 'matrix-pantalaimon.service',
  790. 'priority': 4000,
  791. 'restart_necessary': (matrix_pantalaimon_restart_necessary | bool),
  792. 'groups': ['matrix', 'pantalaimon'],
  793. }] if matrix_pantalaimon_enabled else [])
  794. +
  795. ([{
  796. 'name': 'matrix-element-admin.service',
  797. 'priority': 4000,
  798. 'restart_necessary': (matrix_element_admin_restart_necessary | bool),
  799. 'groups': ['matrix', 'element-admin'],
  800. }] if matrix_element_admin_enabled else [])
  801. +
  802. ([{
  803. 'name': 'matrix-element-call.service',
  804. 'priority': 4000,
  805. 'restart_necessary': (matrix_element_call_restart_necessary | bool),
  806. 'groups': ['matrix', 'element-call'],
  807. }] if matrix_element_call_enabled else [])
  808. +
  809. ([{
  810. 'name': 'matrix-livekit-jwt-service.service',
  811. 'priority': 3500,
  812. 'restart_necessary': (matrix_livekit_jwt_service_restart_necessary | bool),
  813. 'groups': ['matrix', 'livekit-jwt-service'],
  814. }] if matrix_livekit_jwt_service_enabled else [])
  815. +
  816. ([{
  817. 'name': (livekit_server_identifier + '.service'),
  818. 'priority': 3000,
  819. 'restart_necessary': (livekit_server_restart_necessary | bool),
  820. 'groups': ['matrix', 'livekit-server'],
  821. }] if livekit_server_enabled else [])
  822. +
  823. ([{
  824. 'name': 'matrix-sygnal.service',
  825. 'priority': 800,
  826. 'restart_necessary': (matrix_sygnal_restart_necessary | bool),
  827. 'groups': ['matrix', 'sygnal'],
  828. }] if matrix_sygnal_enabled else [])
  829. +
  830. ([{
  831. 'name': 'matrix-goofys.service',
  832. 'priority': 800,
  833. 'restart_necessary': (matrix_goofys_restart_necessary | bool),
  834. 'groups': ['matrix', 'goofys'],
  835. }] if (matrix_synapse_enabled and matrix_s3_media_store_enabled) else [])
  836. +
  837. ([{
  838. 'name': 'matrix-synapse-s3-storage-provider-migrate.timer',
  839. 'priority': 5000,
  840. 'restart_necessary': (matrix_synapse_s3_storage_provider_restart_necessary | bool),
  841. 'groups': ['matrix'],
  842. }] if (matrix_synapse_enabled and matrix_synapse_ext_synapse_s3_storage_provider_enabled) else [])
  843. +
  844. ([{
  845. 'name': 'matrix-synapse-auto-compressor.timer',
  846. 'priority': 5000,
  847. 'restart_necessary': (matrix_synapse_auto_compressor_restart_necessary | bool),
  848. 'groups': ['matrix', 'synapse-auto-compressor'],
  849. }] if matrix_synapse_auto_compressor_enabled else [])
  850. +
  851. ([{
  852. 'name': 'matrix-ketesa.service',
  853. 'priority': 4000,
  854. 'restart_necessary': (matrix_ketesa_restart_necessary | bool),
  855. 'groups': ['matrix', 'ketesa'],
  856. }] if matrix_ketesa_enabled else [])
  857. +
  858. ([{
  859. 'name': (matrix_synapse_usage_exporter_identifier + '.service'),
  860. 'priority': 4000,
  861. 'restart_necessary': (matrix_synapse_usage_exporter_restart_necessary | bool),
  862. 'groups': ['matrix', 'synapse-usage-exporter'],
  863. }] if matrix_synapse_usage_exporter_enabled else [])
  864. +
  865. ([{
  866. 'name': 'matrix-synapse-reverse-proxy-companion.service',
  867. 'priority': 1500,
  868. 'restart_necessary': (matrix_synapse_reverse_proxy_companion_restart_necessary | bool),
  869. 'groups': ['matrix', 'homeservers', 'synapse', 'synapse-reverse-proxy-companion', 'reverse-proxies'],
  870. }] if matrix_synapse_reverse_proxy_companion_enabled else [])
  871. +
  872. ([{
  873. 'name': 'matrix-user-verification-service.service',
  874. 'priority': 800,
  875. 'restart_necessary': (matrix_user_verification_service_restart_necessary | bool),
  876. 'groups': ['matrix', 'matrix-user-verification-service'],
  877. }] if matrix_user_verification_service_enabled else [])
  878. +
  879. ([{
  880. 'name': (matrix_static_files_identifier + '.service'),
  881. 'priority': 4000,
  882. 'restart_necessary': (matrix_static_files_restart_necessary | bool),
  883. 'groups': ['matrix', 'matrix-static-files'],
  884. }] if matrix_static_files_enabled else [])
  885. +
  886. ([{
  887. 'name': (container_socket_proxy_identifier + '.service'),
  888. 'priority': 200,
  889. 'restart_necessary': (container_socket_proxy_restart_necessary | bool),
  890. 'groups': ['matrix', 'reverse-proxies', 'container-socket-proxy'],
  891. }] if container_socket_proxy_enabled else [])
  892. +
  893. ([{
  894. 'name': (traefik_identifier + '.service'),
  895. 'priority': 250,
  896. 'restart_necessary': (traefik_restart_necessary | bool),
  897. 'groups': ['matrix', 'traefik', 'reverse-proxies'],
  898. }] if traefik_enabled else [])
  899. +
  900. ([{
  901. 'name': (traefik_certs_dumper_identifier + '.service'),
  902. 'priority': 300,
  903. 'restart_necessary': (traefik_certs_dumper_restart_necessary | bool),
  904. 'groups': ['matrix', 'traefik-certs-dumper'],
  905. }] if traefik_certs_dumper_enabled else [])
  906. }}
  907. ########################################################################
  908. # #
  909. # /com.devture.ansible.role.systemd_service_manager #
  910. # #
  911. ########################################################################
  912. ########################################################################
  913. # #
  914. # com.devture.ansible.role.timesync #
  915. # #
  916. ########################################################################
  917. # To completely disable installing systemd-timesyncd/ntpd, use `devture_timesync_installation_enabled: false`.
  918. ########################################################################
  919. # #
  920. # /com.devture.ansible.role.timesync #
  921. # #
  922. ########################################################################
  923. ######################################################################
  924. #
  925. # com.devture.ansible.role.playbook_state_preserver
  926. #
  927. ######################################################################
  928. # To completely disable this feature, use `devture_playbook_state_preserver_enabled: false`.
  929. devture_playbook_state_preserver_uid: "{{ matrix_user_uid }}"
  930. devture_playbook_state_preserver_gid: "{{ matrix_user_gid }}"
  931. devture_playbook_state_preserver_vars_preservation_dst: "{{ matrix_base_data_path }}/vars.yml"
  932. devture_playbook_state_preserver_commit_hash_preservation_dst: "{{ matrix_base_data_path }}/git_hash.yml"
  933. ######################################################################
  934. #
  935. # /com.devture.ansible.role.playbook_state_preserver
  936. #
  937. ######################################################################
  938. ########################################################################
  939. # #
  940. # geerlingguy/ansible-role-docker #
  941. # #
  942. ########################################################################
  943. docker_daemon_options: "{{ matrix_playbook_docker_installation_daemon_options }}"
  944. ########################################################################
  945. # #
  946. # /geerlingguy/ansible-role-docker #
  947. # #
  948. ########################################################################
  949. ######################################################################
  950. #
  951. # matrix-base
  952. #
  953. ######################################################################
  954. matrix_homeserver_systemd_services_list: |-
  955. {{
  956. (
  957. ([('matrix-' + matrix_homeserver_implementation + '.service')] if matrix_homeserver_implementation != 'synapse' else [])
  958. +
  959. ([('matrix-' + matrix_homeserver_implementation + '.service')] if matrix_homeserver_implementation == 'synapse' and not matrix_synapse_reverse_proxy_companion_enabled else [])
  960. +
  961. (['matrix-synapse-reverse-proxy-companion.service'] if matrix_synapse_reverse_proxy_companion_enabled else [])
  962. ) | unique
  963. }}
  964. matrix_homeserver_container_client_api_endpoint: |-
  965. {{
  966. {
  967. '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)),
  968. 'dendrite': ('matrix-dendrite:' + matrix_dendrite_http_bind_port | default('8008') | string),
  969. 'conduit': ('matrix-conduit:' + matrix_conduit_port_number | default('8008') | string),
  970. 'continuwuity': ('matrix-continuwuity:' + matrix_continuwuity_config_port_number | default('8008') | string),
  971. 'tuwunel': ('matrix-tuwunel:' + matrix_tuwunel_config_port_number | default('8008') | string),
  972. }[matrix_homeserver_implementation]
  973. }}
  974. matrix_homeserver_container_federation_api_endpoint: |-
  975. {{
  976. {
  977. '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)),
  978. 'dendrite': ('matrix-dendrite:' + matrix_dendrite_http_bind_port | default('8008') | string),
  979. 'conduit': ('matrix-conduit:' + matrix_conduit_port_number | default('8008') | string),
  980. 'continuwuity': ('matrix-continuwuity:' + matrix_continuwuity_config_port_number | default('8008') | string),
  981. 'tuwunel': ('matrix-tuwunel:' + matrix_tuwunel_config_port_number | default('8008') | string),
  982. }[matrix_homeserver_implementation]
  983. }}
  984. matrix_integration_manager_rest_url: ""
  985. matrix_integration_manager_ui_url: ""
  986. ######################################################################
  987. #
  988. # /matrix-base
  989. #
  990. ######################################################################
  991. ######################################################################
  992. #
  993. # matrix-alertmanager-receiver
  994. #
  995. ######################################################################
  996. # We don't enable this by default.
  997. matrix_alertmanager_receiver_enabled: false
  998. 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 }}"
  999. matrix_alertmanager_receiver_container_image_self_build: "{{ matrix_architecture != 'amd64' }}"
  1000. matrix_alertmanager_receiver_container_network: "{{ matrix_addons_container_network }}"
  1001. matrix_alertmanager_receiver_container_additional_networks_auto: |-
  1002. {{
  1003. (
  1004. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  1005. +
  1006. ([matrix_playbook_reverse_proxyable_services_additional_network] if (matrix_playbook_reverse_proxyable_services_additional_network and matrix_alertmanager_receiver_container_labels_traefik_enabled) else [])
  1007. ) | unique
  1008. }}
  1009. matrix_alertmanager_receiver_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  1010. matrix_alertmanager_receiver_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  1011. matrix_alertmanager_receiver_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  1012. matrix_alertmanager_receiver_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  1013. matrix_alertmanager_receiver_container_labels_metrics_middleware_basic_auth_enabled: "{{ matrix_metrics_exposure_http_basic_auth_enabled }}"
  1014. matrix_alertmanager_receiver_container_labels_metrics_middleware_basic_auth_users: "{{ matrix_metrics_exposure_http_basic_auth_users }}"
  1015. matrix_alertmanager_receiver_systemd_required_services_list_auto: "{{ matrix_addons_homeserver_systemd_services_list }}"
  1016. matrix_alertmanager_receiver_config_matrix_homeserver_url: "{{ matrix_addons_homeserver_client_api_url }}"
  1017. matrix_alertmanager_receiver_metrics_enabled: "{{ prometheus_enabled or matrix_metrics_exposure_enabled }}"
  1018. matrix_alertmanager_receiver_metrics_proxying_enabled: "{{ matrix_alertmanager_receiver_config_http_metrics_enabled and matrix_metrics_exposure_enabled }}"
  1019. matrix_alertmanager_receiver_metrics_proxying_hostname: "{{ matrix_metrics_exposure_hostname }}"
  1020. matrix_alertmanager_receiver_metrics_proxying_path: "{{ matrix_metrics_exposure_path_prefix }}/matrix-alertmanager-receiver"
  1021. ######################################################################
  1022. #
  1023. # /matrix-alertmanager-receiver
  1024. #
  1025. ######################################################################
  1026. ######################################################################
  1027. #
  1028. # matrix-authentication-service
  1029. #
  1030. ######################################################################
  1031. matrix_authentication_service_enabled: false
  1032. matrix_authentication_service_hostname: "{{ matrix_server_fqn_matrix }}"
  1033. matrix_authentication_service_path_prefix: /auth
  1034. matrix_playbook_matrix_authentication_service_uses_managed_postgres: "{{ postgres_enabled }}"
  1035. 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 '') }}"
  1036. matrix_authentication_service_config_database_password: "{{ (matrix_homeserver_generic_secret_key + ':mas.db') | hash('sha512') | to_uuid }}"
  1037. # unix socket connection
  1038. matrix_authentication_service_config_database_socket_enabled: "{{ matrix_playbook_matrix_authentication_service_uses_managed_postgres and postgres_container_unix_socket_enabled }}"
  1039. # path to the Postgres socket's parent dir inside the MAS container
  1040. matrix_authentication_service_config_database_socket_path: "{{ '/run-postgres' if matrix_playbook_matrix_authentication_service_uses_managed_postgres else '' }}"
  1041. # path to the Postgres socket on the host
  1042. matrix_authentication_service_config_database_socket_path_host: "{{ postgres_run_path if matrix_playbook_matrix_authentication_service_uses_managed_postgres else '' }}"
  1043. matrix_authentication_service_config_matrix_homeserver: "{{ matrix_domain }}"
  1044. matrix_authentication_service_config_matrix_secret: "{{ (matrix_homeserver_generic_secret_key + ':mas.hs.secret') | hash('sha512') | to_uuid }}"
  1045. matrix_authentication_service_config_matrix_endpoint: "{{ matrix_homeserver_container_url }}"
  1046. # We're using a non-default configuration which:
  1047. # - allows passwords from Synapse (hashed with bcrypt) to be imported with scheme version 1 so existing users will be able to login
  1048. # - as soon as they do one login, the hash will be 'upgraded' to argon2id
  1049. matrix_authentication_service_config_passwords_schemes:
  1050. - version: 1
  1051. secret: "{{ matrix_synapse_password_config_pepper }}"
  1052. algorithm: bcrypt
  1053. unicode_normalization: true
  1054. - version: 2
  1055. algorithm: argon2id
  1056. matrix_authentication_service_config_email_transport: "{{ 'smtp' if exim_relay_enabled else 'blackhole' }}"
  1057. matrix_authentication_service_config_email_hostname: "{{ exim_relay_identifier if exim_relay_enabled else '' }}"
  1058. matrix_authentication_service_config_email_port: "{{ 8025 if exim_relay_enabled else 587 }}"
  1059. matrix_authentication_service_config_email_mode: "{{ 'plain' if exim_relay_enabled else 'starttls' }}"
  1060. matrix_authentication_service_config_email_from_address: "{{ exim_relay_sender_address }}"
  1061. matrix_authentication_service_admin_api_enabled: "{{ matrix_element_admin_enabled or matrix_ketesa_enabled }}"
  1062. 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 }}"
  1063. matrix_authentication_service_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm64'] }}"
  1064. matrix_authentication_service_container_network: "{{ matrix_homeserver_container_network }}"
  1065. matrix_authentication_service_container_additional_networks_auto: |-
  1066. {{
  1067. (
  1068. ([postgres_container_network] if (matrix_playbook_matrix_authentication_service_uses_managed_postgres and not matrix_authentication_service_config_database_socket_enabled) else [])
  1069. +
  1070. ([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 [])
  1071. +
  1072. ([matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network and matrix_authentication_service_container_labels_traefik_enabled else [])
  1073. ) | unique
  1074. }}
  1075. matrix_authentication_service_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  1076. matrix_authentication_service_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  1077. matrix_authentication_service_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  1078. matrix_authentication_service_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  1079. matrix_authentication_service_container_labels_public_compatibility_layer_enabled: "{{ not matrix_authentication_service_migration_in_progress}}"
  1080. matrix_authentication_service_container_labels_public_compatibility_layer_hostname: "{{ matrix_server_fqn_matrix }}"
  1081. matrix_authentication_service_container_labels_internal_compatibility_layer_enabled: "{{ not matrix_authentication_service_migration_in_progress}}"
  1082. matrix_authentication_service_container_labels_internal_compatibility_layer_entrypoints: "{{ matrix_playbook_internal_matrix_client_api_traefik_entrypoint_name }}"
  1083. # MAS somewhat depends on the homeserver service, but the homeserver also depends on MAS.
  1084. # To avoid a circular dependency, we make MAS not depend on the homeserver here.
  1085. # The homeserver is more lost without MAS than MAS is without the homeserver, so we'll define the dependency on the homeserver side.
  1086. # We'll put our dependency on the homeserver as a "want", rather than a requirement.
  1087. matrix_authentication_service_systemd_required_services_list_auto: |
  1088. {{
  1089. ([postgres_identifier ~ '.service'] if matrix_playbook_matrix_authentication_service_uses_managed_postgres else [])
  1090. }}
  1091. # See more information about this homeserver "want" in the comment for `matrix_authentication_service_systemd_required_services_list_auto` above.
  1092. matrix_authentication_service_systemd_wanted_services_list_auto: |
  1093. {{
  1094. ['matrix-' + matrix_homeserver_implementation + '.service']
  1095. +
  1096. ([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 [])
  1097. }}
  1098. 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 }}"
  1099. matrix_authentication_service_syn2mas_synapse_homeserver_config_path: "{{ matrix_synapse_config_dir_path + '/homeserver.yaml' if matrix_synapse_enabled else '' }}"
  1100. matrix_authentication_service_syn2mas_synapse_database_socket_enabled: "{{ matrix_synapse_database_socket_enabled if matrix_synapse_enabled else false }}"
  1101. matrix_authentication_service_syn2mas_synapse_database_socket_path: "{{ matrix_synapse_database_socket_path if matrix_synapse_enabled else '' }}"
  1102. matrix_authentication_service_syn2mas_synapse_database_socket_path_host: "{{ matrix_synapse_database_socket_path_host if matrix_synapse_enabled else '' }}"
  1103. ######################################################################
  1104. #
  1105. # /matrix-authentication-service
  1106. #
  1107. ######################################################################
  1108. ######################################################################
  1109. #
  1110. # matrix-bridge-appservice-discord
  1111. #
  1112. ######################################################################
  1113. # We don't enable bridges by default.
  1114. matrix_bridge_appservice_discord_enabled: false
  1115. matrix_bridge_appservice_discord_systemd_required_services_list_auto: |
  1116. {{
  1117. matrix_addons_homeserver_systemd_services_list
  1118. +
  1119. ([postgres_identifier ~ '.service'] if (postgres_enabled and matrix_bridge_appservice_discord_database_hostname == postgres_connection_hostname) else [])
  1120. }}
  1121. matrix_bridge_appservice_discord_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_bridge_appservice_discord_container_image_registry_prefix_upstream_default }}"
  1122. matrix_bridge_appservice_discord_container_http_host_bind_port: "{{ (matrix_playbook_service_host_bind_interface_prefix ~ '9005') if matrix_playbook_service_host_bind_interface_prefix else '' }}"
  1123. matrix_bridge_appservice_discord_container_network: "{{ matrix_addons_container_network }}"
  1124. matrix_bridge_appservice_discord_container_additional_networks_auto: |-
  1125. {{
  1126. (
  1127. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  1128. +
  1129. ([postgres_container_network] if (postgres_enabled and matrix_bridge_appservice_discord_database_hostname == postgres_connection_hostname and matrix_bridge_appservice_discord_container_network != postgres_container_network) else [])
  1130. ) | unique
  1131. }}
  1132. # If the homeserver disables presence, it's likely better (less wasteful) to also disable presence on the bridge side.
  1133. matrix_bridge_appservice_discord_bridge_disablePresence: "{{ (not matrix_synapse_presence_enabled) if matrix_homeserver_implementation == 'synapse' else false }}"
  1134. matrix_bridge_appservice_discord_appservice_token: "{{ (matrix_homeserver_generic_secret_key + ':discord.as.token') | hash('sha512') | to_uuid }}"
  1135. matrix_bridge_appservice_discord_homeserver_token: "{{ (matrix_homeserver_generic_secret_key + ':discord.hs.token') | hash('sha512') | to_uuid }}"
  1136. # We only make this use Postgres if our own Postgres server is enabled.
  1137. # It's only then (for now) that we can automatically create the necessary database and user for this service.
  1138. matrix_bridge_appservice_discord_database_engine: "{{ 'postgres' if postgres_enabled else 'sqlite' }}"
  1139. matrix_bridge_appservice_discord_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  1140. matrix_bridge_appservice_discord_database_password: "{{ (matrix_homeserver_generic_secret_key + ':as.discord.db') | hash('sha512') | to_uuid }}"
  1141. ######################################################################
  1142. #
  1143. # /matrix-bridge-appservice-discord
  1144. #
  1145. ######################################################################
  1146. ######################################################################
  1147. #
  1148. # matrix-bridge-appservice-irc
  1149. #
  1150. ######################################################################
  1151. # We don't enable bridges by default.
  1152. matrix_bridge_appservice_irc_enabled: false
  1153. matrix_bridge_appservice_irc_systemd_required_services_list_auto: |
  1154. {{
  1155. matrix_addons_homeserver_systemd_services_list
  1156. +
  1157. ([postgres_identifier ~ '.service'] if (postgres_enabled and matrix_bridge_appservice_irc_database_hostname == postgres_connection_hostname) else [])
  1158. }}
  1159. matrix_bridge_appservice_irc_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_bridge_appservice_irc_container_image_registry_prefix_upstream_default }}"
  1160. matrix_bridge_appservice_irc_container_image_self_build: "{{ matrix_architecture != 'amd64' }}"
  1161. matrix_bridge_appservice_irc_container_http_host_bind_port: "{{ (matrix_playbook_service_host_bind_interface_prefix ~ '9999') if matrix_playbook_service_host_bind_interface_prefix else '' }}"
  1162. matrix_bridge_appservice_irc_container_network: "{{ matrix_addons_container_network }}"
  1163. matrix_bridge_appservice_irc_container_additional_networks_auto: |-
  1164. {{
  1165. (
  1166. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  1167. +
  1168. ([postgres_container_network] if (postgres_enabled and matrix_bridge_appservice_irc_database_hostname == postgres_connection_hostname and matrix_bridge_appservice_irc_container_network != postgres_container_network) else [])
  1169. +
  1170. [matrix_playbook_reverse_proxyable_services_additional_network] if (matrix_bridge_appservice_irc_container_labels_traefik_enabled and matrix_playbook_reverse_proxyable_services_additional_network) else []
  1171. ) | unique
  1172. }}
  1173. # The IRC bridge docs say that if homeserver presence is disabled, it's better to also disable
  1174. # IRC bridge presence, for performance reasons.
  1175. matrix_bridge_appservice_irc_homeserver_enablePresence: "{{ matrix_synapse_presence_enabled if matrix_homeserver_implementation == 'synapse' else true }}"
  1176. matrix_bridge_appservice_irc_appservice_token: "{{ (matrix_homeserver_generic_secret_key + ':irc.as.token') | hash('sha512') | to_uuid }}"
  1177. matrix_bridge_appservice_irc_homeserver_url: "{{ matrix_addons_homeserver_client_api_url }}"
  1178. matrix_bridge_appservice_irc_homeserver_token: "{{ (matrix_homeserver_generic_secret_key + ':irc.hs.token') | hash('sha512') | to_uuid }}"
  1179. matrix_bridge_appservice_irc_database_engine: "{{ 'postgres' if postgres_enabled else 'nedb' }}"
  1180. matrix_bridge_appservice_irc_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  1181. matrix_bridge_appservice_irc_database_password: "{{ (matrix_homeserver_generic_secret_key + ':as.irc.db') | hash('sha512') | to_uuid }}"
  1182. matrix_bridge_appservice_irc_database_container_network: "{{ postgres_container_network if postgres_enabled else '' }}"
  1183. matrix_bridge_appservice_irc_ircService_mediaProxy_publicUrl_scheme: "{{ 'https' if matrix_playbook_ssl_enabled else 'http' }}" # noqa var-naming
  1184. matrix_bridge_appservice_irc_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  1185. matrix_bridge_appservice_irc_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  1186. matrix_bridge_appservice_irc_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  1187. matrix_bridge_appservice_irc_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}" # noqa var-naming
  1188. ######################################################################
  1189. #
  1190. # /matrix-bridge-appservice-irc
  1191. #
  1192. ######################################################################
  1193. ######################################################################
  1194. #
  1195. # matrix-bridge-beeper-linkedin
  1196. #
  1197. ######################################################################
  1198. # We don't enable bridges by default.
  1199. matrix_bridge_beeper_linkedin_enabled: false
  1200. matrix_bridge_beeper_linkedin_systemd_required_services_list_auto: |
  1201. {{
  1202. matrix_addons_homeserver_systemd_services_list
  1203. +
  1204. ([postgres_identifier ~ '.service'] if (postgres_enabled and matrix_bridge_beeper_linkedin_database_hostname == postgres_connection_hostname) else [])
  1205. }}
  1206. matrix_bridge_beeper_linkedin_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_bridge_beeper_linkedin_container_image_registry_prefix_upstream_default }}"
  1207. matrix_bridge_beeper_linkedin_container_image_self_build: "{{ matrix_architecture not in ['amd64'] }}"
  1208. matrix_bridge_beeper_linkedin_container_network: "{{ matrix_addons_container_network }}"
  1209. matrix_bridge_beeper_linkedin_container_additional_networks_auto: |-
  1210. {{
  1211. (
  1212. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  1213. +
  1214. ([postgres_container_network] if (postgres_enabled and matrix_bridge_beeper_linkedin_database_hostname == postgres_connection_hostname and matrix_bridge_beeper_linkedin_container_network != postgres_container_network) else [])
  1215. ) | unique
  1216. }}
  1217. matrix_bridge_beeper_linkedin_appservice_token: "{{ (matrix_homeserver_generic_secret_key + ':linked.as.token') | hash('sha512') | to_uuid }}"
  1218. matrix_bridge_beeper_linkedin_homeserver_address: "{{ matrix_addons_homeserver_client_api_url }}"
  1219. matrix_bridge_beeper_linkedin_homeserver_token: "{{ (matrix_homeserver_generic_secret_key + ':linked.hs.token') | hash('sha512') | to_uuid }}"
  1220. matrix_bridge_beeper_linkedin_homeserver_async_media: "{{ matrix_homeserver_implementation in ['synapse'] }}"
  1221. matrix_bridge_beeper_linkedin_bridge_login_shared_secret_map_auto: |-
  1222. {{
  1223. ({
  1224. matrix_bridge_beeper_linkedin_homeserver_domain: ("as_token:" + matrix_appservice_double_puppet_registration_as_token)
  1225. })
  1226. if matrix_appservice_double_puppet_enabled
  1227. else (
  1228. {matrix_bridge_beeper_linkedin_homeserver_domain: matrix_synapse_ext_password_provider_shared_secret_auth_shared_secret}
  1229. if matrix_synapse_ext_password_provider_shared_secret_auth_enabled
  1230. else {}
  1231. )
  1232. }}
  1233. matrix_bridge_beeper_linkedin_bridge_presence: "{{ (matrix_synapse_presence_enabled if matrix_synapse_enabled else true) if matrix_homeserver_implementation == 'synapse' else true }}"
  1234. matrix_bridge_beeper_linkedin_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  1235. matrix_bridge_beeper_linkedin_database_password: "{{ (matrix_homeserver_generic_secret_key + ':maulinkedin.db') | hash('sha512') | to_uuid }}"
  1236. ######################################################################
  1237. #
  1238. # /matrix-bridge-beeper-linkedin
  1239. #
  1240. ######################################################################
  1241. ######################################################################
  1242. #
  1243. # matrix-bridge-beeper-line
  1244. #
  1245. ######################################################################
  1246. # We don't enable bridges by default.
  1247. matrix_bridge_beeper_line_enabled: false
  1248. matrix_bridge_beeper_line_systemd_required_services_list_auto: |
  1249. {{
  1250. matrix_addons_homeserver_systemd_services_list
  1251. +
  1252. ([postgres_identifier ~ '.service'] if (postgres_enabled and matrix_bridge_beeper_line_database_hostname == postgres_connection_hostname) else [])
  1253. }}
  1254. matrix_bridge_beeper_line_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_bridge_beeper_line_container_image_registry_prefix_upstream_default }}"
  1255. matrix_bridge_beeper_line_container_image_self_build: "{{ matrix_architecture not in ['amd64'] }}"
  1256. matrix_bridge_beeper_line_container_network: "{{ matrix_addons_container_network }}"
  1257. matrix_bridge_beeper_line_container_additional_networks_auto: |-
  1258. {{
  1259. (
  1260. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  1261. +
  1262. ([postgres_container_network] if (postgres_enabled and matrix_bridge_beeper_line_database_hostname == postgres_connection_hostname and matrix_bridge_beeper_line_container_network != postgres_container_network) else [])
  1263. +
  1264. ([matrix_playbook_reverse_proxyable_services_additional_network] if (matrix_playbook_reverse_proxyable_services_additional_network and matrix_bridge_beeper_line_container_labels_traefik_enabled) else [])
  1265. ) | unique
  1266. }}
  1267. matrix_bridge_beeper_line_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  1268. matrix_bridge_beeper_line_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  1269. matrix_bridge_beeper_line_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  1270. matrix_bridge_beeper_line_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  1271. matrix_bridge_beeper_line_appservice_token: "{{ (matrix_homeserver_generic_secret_key + ':line.as.token') | hash('sha512') | to_uuid }}"
  1272. matrix_bridge_beeper_line_homeserver_address: "{{ matrix_addons_homeserver_client_api_url }}"
  1273. matrix_bridge_beeper_line_homeserver_token: "{{ (matrix_homeserver_generic_secret_key + ':line.hs.token') | hash('sha512') | to_uuid }}"
  1274. matrix_bridge_beeper_line_homeserver_async_media: "{{ matrix_homeserver_implementation in ['synapse'] }}"
  1275. matrix_bridge_beeper_line_provisioning_shared_secret: "{{ (matrix_homeserver_generic_secret_key + ':line.prov') | hash('sha512') | to_uuid }}"
  1276. matrix_bridge_beeper_line_double_puppet_secrets_auto: |-
  1277. {{
  1278. ({
  1279. matrix_bridge_beeper_line_homeserver_domain: ("as_token:" + matrix_appservice_double_puppet_registration_as_token)
  1280. })
  1281. if matrix_appservice_double_puppet_enabled
  1282. else {}
  1283. }}
  1284. matrix_bridge_beeper_line_scheme: "{{ 'https' if matrix_playbook_ssl_enabled else 'http' }}"
  1285. matrix_bridge_beeper_line_exposure_enabled: "{{ matrix_bridges_exposure_enabled }}"
  1286. matrix_bridge_beeper_line_exposure_hostname: "{{ matrix_bridges_exposure_hostname }}"
  1287. matrix_bridge_beeper_line_exposure_path_prefix: "{{ matrix_bridges_exposure_path_prefix }}/line"
  1288. matrix_bridge_beeper_line_database_engine: "{{ 'postgres' if postgres_enabled else 'sqlite' }}"
  1289. matrix_bridge_beeper_line_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  1290. matrix_bridge_beeper_line_database_password: "{{ (matrix_homeserver_generic_secret_key + ':line.db') | hash('sha512') | to_uuid }}"
  1291. ######################################################################
  1292. #
  1293. # /matrix-bridge-beeper-line
  1294. #
  1295. ######################################################################
  1296. ######################################################################
  1297. #
  1298. # matrix-bridge-mautrix-bluesky
  1299. #
  1300. ######################################################################
  1301. # We don't enable bridges by default.
  1302. matrix_bridge_mautrix_bluesky_enabled: false
  1303. matrix_bridge_mautrix_bluesky_systemd_required_services_list_auto: |
  1304. {{
  1305. matrix_addons_homeserver_systemd_services_list
  1306. +
  1307. ([postgres_identifier ~ '.service'] if (postgres_enabled and matrix_bridge_mautrix_bluesky_database_hostname == postgres_connection_hostname) else [])
  1308. }}
  1309. matrix_bridge_mautrix_bluesky_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_bridge_mautrix_bluesky_container_image_registry_prefix_upstream_default }}"
  1310. matrix_bridge_mautrix_bluesky_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm64'] }}"
  1311. matrix_bridge_mautrix_bluesky_container_network: "{{ matrix_addons_container_network }}"
  1312. matrix_bridge_mautrix_bluesky_container_additional_networks_auto: |-
  1313. {{
  1314. (
  1315. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  1316. +
  1317. ([postgres_container_network] if (postgres_enabled and matrix_bridge_mautrix_bluesky_database_hostname == postgres_connection_hostname and matrix_bridge_mautrix_bluesky_container_network != postgres_container_network) else [])
  1318. +
  1319. ([matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network and matrix_bridge_mautrix_bluesky_container_labels_traefik_enabled else [])
  1320. ) | unique
  1321. }}
  1322. matrix_bridge_mautrix_bluesky_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  1323. matrix_bridge_mautrix_bluesky_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  1324. matrix_bridge_mautrix_bluesky_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  1325. matrix_bridge_mautrix_bluesky_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  1326. matrix_bridge_mautrix_bluesky_appservice_token: "{{ (matrix_homeserver_generic_secret_key + ':bsky.as.token') | hash('sha512') | to_uuid }}"
  1327. matrix_bridge_mautrix_bluesky_homeserver_address: "{{ matrix_addons_homeserver_client_api_url }}"
  1328. matrix_bridge_mautrix_bluesky_homeserver_token: "{{ (matrix_homeserver_generic_secret_key + ':bsky.hs.token') | hash('sha512') | to_uuid }}"
  1329. matrix_bridge_mautrix_bluesky_homeserver_async_media: "{{ matrix_homeserver_implementation in ['synapse'] }}"
  1330. matrix_bridge_mautrix_bluesky_provisioning_shared_secret: "{{ (matrix_homeserver_generic_secret_key + ':mau.bsky.prov') | hash('sha512') | to_uuid }}"
  1331. matrix_bridge_mautrix_bluesky_double_puppet_secrets_auto: |-
  1332. {{
  1333. ({
  1334. matrix_bridge_mautrix_bluesky_homeserver_domain: ("as_token:" + matrix_appservice_double_puppet_registration_as_token)
  1335. })
  1336. if matrix_appservice_double_puppet_enabled
  1337. else {}
  1338. }}
  1339. matrix_bridge_mautrix_bluesky_scheme: "{{ 'https' if matrix_playbook_ssl_enabled else 'http' }}"
  1340. matrix_bridge_mautrix_bluesky_exposure_enabled: "{{ matrix_bridges_exposure_enabled }}"
  1341. matrix_bridge_mautrix_bluesky_exposure_hostname: "{{ matrix_bridges_exposure_hostname }}"
  1342. matrix_bridge_mautrix_bluesky_exposure_path_prefix: "{{ matrix_bridges_exposure_path_prefix }}/bluesky"
  1343. matrix_bridge_mautrix_bluesky_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  1344. matrix_bridge_mautrix_bluesky_database_password: "{{ (matrix_homeserver_generic_secret_key + ':mau.twt.db') | hash('sha512') | to_uuid if postgres_enabled else '' }}"
  1345. ######################################################################
  1346. #
  1347. # /matrix-bridge-mautrix-bluesky
  1348. #
  1349. ######################################################################
  1350. ######################################################################
  1351. #
  1352. # matrix-bridge-rustpush
  1353. #
  1354. ######################################################################
  1355. # We don't enable bridges by default.
  1356. matrix_bridge_rustpush_enabled: false
  1357. matrix_bridge_rustpush_systemd_required_services_list_auto: |
  1358. {{
  1359. matrix_addons_homeserver_systemd_services_list
  1360. +
  1361. ([postgres_identifier ~ '.service'] if (postgres_enabled and matrix_bridge_rustpush_database_hostname == postgres_connection_hostname) else [])
  1362. }}
  1363. matrix_bridge_rustpush_container_network: "{{ matrix_addons_container_network }}"
  1364. matrix_bridge_rustpush_container_additional_networks_auto: |-
  1365. {{
  1366. (
  1367. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  1368. +
  1369. ([postgres_container_network] if (postgres_enabled and matrix_bridge_rustpush_database_hostname == postgres_connection_hostname and matrix_bridge_rustpush_container_network != postgres_container_network) else [])
  1370. +
  1371. ([matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network and matrix_bridge_rustpush_container_labels_traefik_enabled else [])
  1372. ) | unique
  1373. }}
  1374. matrix_bridge_rustpush_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  1375. matrix_bridge_rustpush_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  1376. matrix_bridge_rustpush_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  1377. matrix_bridge_rustpush_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  1378. matrix_bridge_rustpush_appservice_token: "{{ (matrix_homeserver_generic_secret_key + ':imsg.as.token') | hash('sha512') | to_uuid }}"
  1379. matrix_bridge_rustpush_homeserver_address: "{{ matrix_addons_homeserver_client_api_url }}"
  1380. matrix_bridge_rustpush_homeserver_token: "{{ (matrix_homeserver_generic_secret_key + ':imsg.hs.token') | hash('sha512') | to_uuid }}"
  1381. matrix_bridge_rustpush_homeserver_async_media: "{{ matrix_homeserver_implementation in ['synapse'] }}"
  1382. matrix_bridge_rustpush_provisioning_shared_secret: "{{ (matrix_homeserver_generic_secret_key + ':mau.imsg.prov') | hash('sha512') | to_uuid }}"
  1383. matrix_bridge_rustpush_exposure_enabled: "{{ matrix_bridges_exposure_enabled }}"
  1384. matrix_bridge_rustpush_exposure_hostname: "{{ matrix_bridges_exposure_hostname }}"
  1385. matrix_bridge_rustpush_exposure_path_prefix: "{{ matrix_bridges_exposure_path_prefix }}/imessage"
  1386. matrix_bridge_rustpush_double_puppet_secrets_auto: |-
  1387. {{
  1388. ({
  1389. matrix_bridge_rustpush_homeserver_domain: ("as_token:" + matrix_appservice_double_puppet_registration_as_token)
  1390. })
  1391. if matrix_appservice_double_puppet_enabled
  1392. else {}
  1393. }}
  1394. matrix_bridge_rustpush_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  1395. matrix_bridge_rustpush_database_password: "{{ (matrix_homeserver_generic_secret_key + ':mau.imsg.db') | hash('sha512') | to_uuid if postgres_enabled else '' }}"
  1396. ######################################################################
  1397. #
  1398. # /matrix-bridge-rustpush
  1399. #
  1400. ######################################################################
  1401. ######################################################################
  1402. #
  1403. # matrix-bridge-mautrix-discord
  1404. #
  1405. ######################################################################
  1406. # We don't enable bridges by default.
  1407. matrix_bridge_mautrix_discord_enabled: false
  1408. matrix_bridge_mautrix_discord_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_bridge_mautrix_discord_container_image_registry_prefix_upstream_default }}"
  1409. matrix_bridge_mautrix_discord_container_image_self_build: "{{ matrix_architecture not in ['arm64', 'amd64'] }}"
  1410. matrix_bridge_mautrix_discord_container_network: "{{ matrix_addons_container_network }}"
  1411. matrix_bridge_mautrix_discord_container_additional_networks_auto: |-
  1412. {{
  1413. (
  1414. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  1415. +
  1416. ([postgres_container_network] if postgres_enabled and matrix_bridge_mautrix_discord_database_hostname == postgres_connection_hostname else [])
  1417. +
  1418. ([matrix_playbook_reverse_proxyable_services_additional_network] if (matrix_playbook_reverse_proxyable_services_additional_network and matrix_bridge_mautrix_discord_container_labels_traefik_enabled) else [])
  1419. ) | unique
  1420. }}
  1421. matrix_bridge_mautrix_discord_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  1422. matrix_bridge_mautrix_discord_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  1423. matrix_bridge_mautrix_discord_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  1424. matrix_bridge_mautrix_discord_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  1425. matrix_bridge_mautrix_discord_systemd_required_services_list_auto: |
  1426. {{
  1427. matrix_addons_homeserver_systemd_services_list
  1428. +
  1429. ([postgres_identifier ~ '.service'] if (postgres_enabled and matrix_bridge_mautrix_discord_database_hostname == postgres_connection_hostname) else [])
  1430. }}
  1431. matrix_bridge_mautrix_discord_appservice_token: "{{ (matrix_homeserver_generic_secret_key + ':maudisc.as.tok') | hash('sha512') | to_uuid }}"
  1432. matrix_bridge_mautrix_discord_homeserver_address: "{{ matrix_addons_homeserver_client_api_url }}"
  1433. matrix_bridge_mautrix_discord_homeserver_token: "{{ (matrix_homeserver_generic_secret_key + ':maudisc.hs.tok') | hash('sha512') | to_uuid }}"
  1434. matrix_bridge_mautrix_discord_homeserver_async_media: "{{ matrix_homeserver_implementation in ['synapse'] }}"
  1435. matrix_bridge_mautrix_discord_bridge_avatar_proxy_key: "{{ (matrix_homeserver_generic_secret_key + ':maudisc.avatar') | hash('sha512') | to_uuid }}"
  1436. matrix_bridge_mautrix_discord_hostname: "{{ matrix_server_fqn_matrix }}"
  1437. matrix_bridge_mautrix_discord_scheme: "{{ 'https' if matrix_playbook_ssl_enabled else 'http' }}"
  1438. matrix_bridge_mautrix_discord_bridge_login_shared_secret_map_auto: |-
  1439. {{
  1440. ({
  1441. matrix_bridge_mautrix_discord_homeserver_domain: ("as_token:" + matrix_appservice_double_puppet_registration_as_token)
  1442. })
  1443. if matrix_appservice_double_puppet_enabled
  1444. else (
  1445. {matrix_bridge_mautrix_discord_homeserver_domain: matrix_synapse_ext_password_provider_shared_secret_auth_shared_secret}
  1446. if matrix_synapse_ext_password_provider_shared_secret_auth_enabled
  1447. else {}
  1448. )
  1449. }}
  1450. # Postgres is the default, except if not using internal Postgres server
  1451. matrix_bridge_mautrix_discord_database_engine: "{{ 'postgres' if postgres_enabled else 'sqlite' }}"
  1452. matrix_bridge_mautrix_discord_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  1453. matrix_bridge_mautrix_discord_database_password: "{{ (matrix_homeserver_generic_secret_key + ':maudiscord.db') | hash('sha512') | to_uuid }}"
  1454. ######################################################################
  1455. #
  1456. # /matrix-bridge-mautrix-discord
  1457. #
  1458. ######################################################################
  1459. ######################################################################
  1460. #
  1461. # matrix-bridge-mautrix-slack
  1462. #
  1463. ######################################################################
  1464. # We don't enable bridges by default.
  1465. matrix_bridge_mautrix_slack_enabled: false
  1466. matrix_bridge_mautrix_slack_systemd_required_services_list_auto: |
  1467. {{
  1468. matrix_addons_homeserver_systemd_services_list
  1469. +
  1470. ([postgres_identifier ~ '.service'] if (postgres_enabled and matrix_bridge_mautrix_slack_database_hostname == postgres_connection_hostname) else [])
  1471. }}
  1472. matrix_bridge_mautrix_slack_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_bridge_mautrix_slack_container_image_registry_prefix_upstream_default }}"
  1473. matrix_bridge_mautrix_slack_container_image_self_build: "{{ matrix_architecture not in ['arm64', 'amd64'] }}"
  1474. matrix_bridge_mautrix_slack_container_network: "{{ matrix_addons_container_network }}"
  1475. matrix_bridge_mautrix_slack_container_additional_networks_auto: |-
  1476. {{
  1477. (
  1478. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  1479. +
  1480. ([postgres_container_network] if (postgres_enabled and matrix_bridge_mautrix_slack_database_hostname == postgres_connection_hostname and matrix_bridge_mautrix_slack_container_network != postgres_container_network) else [])
  1481. +
  1482. ([matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network and matrix_bridge_mautrix_slack_container_labels_traefik_enabled else [])
  1483. ) | unique
  1484. }}
  1485. matrix_bridge_mautrix_slack_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  1486. matrix_bridge_mautrix_slack_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  1487. matrix_bridge_mautrix_slack_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  1488. matrix_bridge_mautrix_slack_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  1489. matrix_bridge_mautrix_slack_appservice_token: "{{ (matrix_homeserver_generic_secret_key + ':mauslack.as.tok') | hash('sha512') | to_uuid }}"
  1490. matrix_bridge_mautrix_slack_homeserver_address: "{{ matrix_addons_homeserver_client_api_url }}"
  1491. matrix_bridge_mautrix_slack_homeserver_token: "{{ (matrix_homeserver_generic_secret_key + ':mauslack.hs.tok') | hash('sha512') | to_uuid }}"
  1492. matrix_bridge_mautrix_slack_homeserver_async_media: "{{ matrix_homeserver_implementation in ['synapse'] }}"
  1493. matrix_bridge_mautrix_slack_double_puppet_secrets_auto: |-
  1494. {{
  1495. {
  1496. matrix_bridge_mautrix_slack_homeserver_domain: ("as_token:" + matrix_appservice_double_puppet_registration_as_token)
  1497. }
  1498. if matrix_appservice_double_puppet_enabled
  1499. else {}
  1500. }}
  1501. # Postgres is the default, except if not using internal Postgres server
  1502. matrix_bridge_mautrix_slack_database_engine: "{{ 'postgres' if postgres_enabled else 'sqlite' }}"
  1503. matrix_bridge_mautrix_slack_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  1504. matrix_bridge_mautrix_slack_database_password: "{{ (matrix_homeserver_generic_secret_key + ':mauslack.db') | hash('sha512') | to_uuid }}"
  1505. matrix_bridge_mautrix_slack_provisioning_shared_secret: "{{ (matrix_homeserver_generic_secret_key + ':mau.slack.prov') | hash('sha512') | to_uuid }}"
  1506. matrix_bridge_mautrix_slack_public_media_signing_key: "{{ (matrix_homeserver_generic_secret_key + ':mau.slack.pmed') | hash('sha512') | to_uuid }}"
  1507. matrix_bridge_mautrix_slack_scheme: "{{ 'https' if matrix_playbook_ssl_enabled else 'http' }}"
  1508. matrix_bridge_mautrix_slack_exposure_enabled: "{{ matrix_bridges_exposure_enabled }}"
  1509. matrix_bridge_mautrix_slack_exposure_hostname: "{{ matrix_bridges_exposure_hostname }}"
  1510. matrix_bridge_mautrix_slack_exposure_path_prefix: "{{ matrix_bridges_exposure_path_prefix }}/slack"
  1511. ######################################################################
  1512. #
  1513. # /matrix-bridge-mautrix-slack
  1514. #
  1515. ######################################################################
  1516. ######################################################################
  1517. #
  1518. # matrix-bridge-mautrix-googlechat
  1519. #
  1520. ######################################################################
  1521. # We don't enable bridges by default.
  1522. matrix_bridge_mautrix_googlechat_enabled: false
  1523. matrix_bridge_mautrix_googlechat_systemd_required_services_list_auto: |
  1524. {{
  1525. matrix_addons_homeserver_systemd_services_list
  1526. +
  1527. ([postgres_identifier ~ '.service'] if (postgres_enabled and matrix_bridge_mautrix_googlechat_database_hostname == postgres_connection_hostname) else [])
  1528. }}
  1529. matrix_bridge_mautrix_googlechat_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_bridge_mautrix_googlechat_container_image_registry_prefix_upstream_default }}"
  1530. matrix_bridge_mautrix_googlechat_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm64'] }}"
  1531. matrix_bridge_mautrix_googlechat_container_http_host_bind_port: "{{ (matrix_playbook_service_host_bind_interface_prefix ~ '9007') if matrix_playbook_service_host_bind_interface_prefix else '' }}"
  1532. matrix_bridge_mautrix_googlechat_container_network: "{{ matrix_addons_container_network }}"
  1533. matrix_bridge_mautrix_googlechat_container_additional_networks_auto: |-
  1534. {{
  1535. (
  1536. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  1537. +
  1538. ([postgres_container_network] if (postgres_enabled and matrix_bridge_mautrix_googlechat_database_hostname == postgres_connection_hostname and matrix_bridge_mautrix_googlechat_container_network != postgres_container_network) else [])
  1539. +
  1540. ([matrix_playbook_reverse_proxyable_services_additional_network] if (matrix_playbook_reverse_proxyable_services_additional_network and matrix_bridge_mautrix_gmessages_container_labels_traefik_enabled) else [])
  1541. ) | unique
  1542. }}
  1543. matrix_bridge_mautrix_googlechat_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  1544. matrix_bridge_mautrix_googlechat_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  1545. matrix_bridge_mautrix_googlechat_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  1546. matrix_bridge_mautrix_googlechat_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  1547. matrix_bridge_mautrix_googlechat_container_labels_public_endpoint_hostname: "{{ matrix_server_fqn_matrix }}"
  1548. matrix_bridge_mautrix_googlechat_container_labels_metrics_middleware_basic_auth_enabled: "{{ matrix_metrics_exposure_http_basic_auth_enabled }}"
  1549. matrix_bridge_mautrix_googlechat_container_labels_metrics_middleware_basic_auth_users: "{{ matrix_metrics_exposure_http_basic_auth_users }}"
  1550. matrix_bridge_mautrix_googlechat_appservice_token: "{{ (matrix_homeserver_generic_secret_key + ':gc.as.token') | hash('sha512') | to_uuid }}"
  1551. matrix_bridge_mautrix_googlechat_homeserver_address: "{{ matrix_addons_homeserver_client_api_url }}"
  1552. matrix_bridge_mautrix_googlechat_homeserver_token: "{{ (matrix_homeserver_generic_secret_key + ':gc.hs.token') | hash('sha512') | to_uuid }}"
  1553. matrix_bridge_mautrix_googlechat_login_shared_secret: |-
  1554. {{
  1555. ("as_token:" + matrix_appservice_double_puppet_registration_as_token)
  1556. if matrix_appservice_double_puppet_enabled
  1557. else (
  1558. matrix_synapse_ext_password_provider_shared_secret_auth_shared_secret if matrix_synapse_ext_password_provider_shared_secret_auth_enabled
  1559. if matrix_synapse_ext_password_provider_shared_secret_auth_enabled
  1560. else ""
  1561. )
  1562. }}
  1563. matrix_bridge_mautrix_googlechat_metrics_enabled: "{{ prometheus_enabled or matrix_metrics_exposure_enabled }}"
  1564. matrix_bridge_mautrix_googlechat_metrics_proxying_enabled: "{{ matrix_bridge_mautrix_googlechat_metrics_enabled and matrix_metrics_exposure_enabled }}"
  1565. matrix_bridge_mautrix_googlechat_metrics_proxying_hostname: "{{ matrix_metrics_exposure_hostname }}"
  1566. matrix_bridge_mautrix_googlechat_metrics_proxying_path_prefix: "{{ matrix_metrics_exposure_path_prefix }}/mautrix-googlechat"
  1567. # Postgres is the default, except if not using internal Postgres server
  1568. matrix_bridge_mautrix_googlechat_database_engine: "{{ 'postgres' if postgres_enabled else 'sqlite' }}"
  1569. matrix_bridge_mautrix_googlechat_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  1570. matrix_bridge_mautrix_googlechat_database_password: "{{ (matrix_homeserver_generic_secret_key + ':mau.gc.db') | hash('sha512') | to_uuid }}"
  1571. ######################################################################
  1572. #
  1573. # /matrix-bridge-mautrix-googlechat
  1574. #
  1575. ######################################################################
  1576. ######################################################################
  1577. #
  1578. # matrix-bridge-mautrix-signal
  1579. #
  1580. ######################################################################
  1581. # We don't enable bridges by default.
  1582. matrix_bridge_mautrix_signal_enabled: false
  1583. matrix_bridge_mautrix_signal_systemd_required_services_list_auto: |
  1584. {{
  1585. matrix_addons_homeserver_systemd_services_list
  1586. +
  1587. ([postgres_identifier ~ '.service'] if (postgres_enabled and matrix_bridge_mautrix_signal_database_hostname == postgres_connection_hostname) else [])
  1588. }}
  1589. matrix_bridge_mautrix_signal_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_bridge_mautrix_signal_container_image_registry_prefix_upstream_default }}"
  1590. matrix_bridge_mautrix_signal_container_image_self_build: "{{ matrix_architecture not in ['arm64', 'amd64'] }}"
  1591. matrix_bridge_mautrix_signal_container_network: "{{ matrix_addons_container_network }}"
  1592. matrix_bridge_mautrix_signal_container_additional_networks_auto: |-
  1593. {{
  1594. (
  1595. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  1596. +
  1597. ([postgres_container_network] if (postgres_enabled and matrix_bridge_mautrix_signal_database_hostname == postgres_connection_hostname and matrix_bridge_mautrix_signal_container_network != postgres_container_network) else [])
  1598. +
  1599. ([matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network and matrix_bridge_mautrix_signal_container_labels_traefik_enabled else [])
  1600. ) | unique
  1601. }}
  1602. matrix_bridge_mautrix_signal_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  1603. matrix_bridge_mautrix_signal_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  1604. matrix_bridge_mautrix_signal_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  1605. matrix_bridge_mautrix_signal_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  1606. matrix_bridge_mautrix_signal_homeserver_domain: '{{ matrix_domain }}'
  1607. matrix_bridge_mautrix_signal_homeserver_address: "{{ matrix_addons_homeserver_client_api_url }}"
  1608. matrix_bridge_mautrix_signal_homeserver_token: "{{ (matrix_homeserver_generic_secret_key + ':si.hs.token') | hash('sha512') | to_uuid }}"
  1609. matrix_bridge_mautrix_signal_homeserver_async_media: "{{ matrix_homeserver_implementation in ['synapse'] }}"
  1610. matrix_bridge_mautrix_signal_appservice_token: "{{ (matrix_homeserver_generic_secret_key + ':si.as.token') | hash('sha512') | to_uuid }}"
  1611. matrix_bridge_mautrix_signal_double_puppet_secrets_auto: |-
  1612. {{
  1613. {
  1614. matrix_bridge_mautrix_signal_homeserver_domain: ("as_token:" + matrix_appservice_double_puppet_registration_as_token)
  1615. }
  1616. if matrix_appservice_double_puppet_enabled
  1617. else {}
  1618. }}
  1619. matrix_bridge_mautrix_signal_scheme: "{{ 'https' if matrix_playbook_ssl_enabled else 'http' }}"
  1620. matrix_bridge_mautrix_signal_exposure_enabled: "{{ matrix_bridges_exposure_enabled }}"
  1621. matrix_bridge_mautrix_signal_exposure_hostname: "{{ matrix_bridges_exposure_hostname }}"
  1622. matrix_bridge_mautrix_signal_exposure_path_prefix: "{{ matrix_bridges_exposure_path_prefix }}/signal"
  1623. matrix_bridge_mautrix_signal_database_engine: "{{ 'postgres' if postgres_enabled else 'sqlite' }}"
  1624. matrix_bridge_mautrix_signal_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  1625. matrix_bridge_mautrix_signal_database_password: "{{ (matrix_homeserver_generic_secret_key + ':mau.signal.db') | hash('sha512') | to_uuid }}"
  1626. matrix_bridge_mautrix_signal_provisioning_shared_secret: "{{ (matrix_homeserver_generic_secret_key + ':mau.signal.prov') | hash('sha512') | to_uuid }}"
  1627. matrix_bridge_mautrix_signal_public_media_signing_key: "{{ (matrix_homeserver_generic_secret_key + ':mau.signal.pmed') | hash('sha512') | to_uuid }}"
  1628. ######################################################################
  1629. #
  1630. # /matrix-bridge-mautrix-signal
  1631. #
  1632. ######################################################################
  1633. ######################################################################
  1634. #
  1635. # matrix-bridge-mautrix-meta-messenger
  1636. #
  1637. ######################################################################
  1638. # We don't enable bridges by default.
  1639. matrix_bridge_mautrix_meta_messenger_enabled: false
  1640. matrix_bridge_mautrix_meta_messenger_systemd_required_services_list_auto: |
  1641. {{
  1642. matrix_addons_homeserver_systemd_services_list
  1643. +
  1644. ([postgres_identifier ~ '.service'] if (postgres_enabled and matrix_bridge_mautrix_meta_messenger_database_hostname == postgres_connection_hostname) else [])
  1645. }}
  1646. matrix_bridge_mautrix_meta_messenger_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_bridge_mautrix_meta_messenger_container_image_registry_prefix_upstream_default }}"
  1647. matrix_bridge_mautrix_meta_messenger_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm64'] }}"
  1648. matrix_bridge_mautrix_meta_messenger_container_network: "{{ matrix_addons_container_network }}"
  1649. matrix_bridge_mautrix_meta_messenger_container_additional_networks_auto: |-
  1650. {{
  1651. (
  1652. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  1653. +
  1654. ([postgres_container_network] if (postgres_enabled and matrix_bridge_mautrix_meta_messenger_database_hostname == postgres_connection_hostname and matrix_bridge_mautrix_meta_messenger_container_network != postgres_container_network) else [])
  1655. +
  1656. ([matrix_playbook_reverse_proxyable_services_additional_network] if (matrix_playbook_reverse_proxyable_services_additional_network and matrix_bridge_mautrix_meta_messenger_container_labels_traefik_enabled) else [])
  1657. ) | unique
  1658. }}
  1659. matrix_bridge_mautrix_meta_messenger_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  1660. matrix_bridge_mautrix_meta_messenger_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  1661. matrix_bridge_mautrix_meta_messenger_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  1662. matrix_bridge_mautrix_meta_messenger_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  1663. matrix_bridge_mautrix_meta_messenger_appservice_token: "{{ (matrix_homeserver_generic_secret_key + ':mau.meta.fb.as') | hash('sha512') | to_uuid }}"
  1664. matrix_bridge_mautrix_meta_messenger_homeserver_address: "{{ matrix_addons_homeserver_client_api_url }}"
  1665. matrix_bridge_mautrix_meta_messenger_homeserver_token: "{{ (matrix_homeserver_generic_secret_key + ':mau.meta.fb.hs') | hash('sha512') | to_uuid }}"
  1666. matrix_bridge_mautrix_meta_messenger_provisioning_shared_secret: "{{ (matrix_homeserver_generic_secret_key + ':mau.meta.fb.prov') | hash('sha512') | to_uuid }}"
  1667. matrix_bridge_mautrix_meta_messenger_homeserver_async_media: "{{ matrix_homeserver_implementation in ['synapse'] }}"
  1668. matrix_bridge_mautrix_meta_messenger_double_puppet_secrets_auto: |-
  1669. {{
  1670. {
  1671. matrix_bridge_mautrix_meta_messenger_homeserver_domain: ("as_token:" + matrix_appservice_double_puppet_registration_as_token)
  1672. }
  1673. if matrix_appservice_double_puppet_enabled
  1674. else {}
  1675. }}
  1676. matrix_bridge_mautrix_meta_messenger_scheme: "{{ 'https' if matrix_playbook_ssl_enabled else 'http' }}"
  1677. matrix_bridge_mautrix_meta_messenger_exposure_enabled: "{{ matrix_bridges_exposure_enabled }}"
  1678. matrix_bridge_mautrix_meta_messenger_exposure_hostname: "{{ matrix_bridges_exposure_hostname }}"
  1679. matrix_bridge_mautrix_meta_messenger_exposure_path_prefix: "{{ matrix_bridges_exposure_path_prefix }}/meta-messenger"
  1680. # We'd like to force-set people with external Postgres to SQLite, so the bridge role can complain
  1681. # and point them to a migration path.
  1682. matrix_bridge_mautrix_meta_messenger_database_engine: "{{ 'postgres' if postgres_enabled else 'sqlite3-fk-wal' }}"
  1683. matrix_bridge_mautrix_meta_messenger_database_hostname: "{{ postgres_connection_hostname if (postgres_enabled and matrix_bridge_mautrix_meta_messenger_database_engine == 'postgres') else '' }}"
  1684. matrix_bridge_mautrix_meta_messenger_database_password: "{{ ((matrix_homeserver_generic_secret_key + ':mau.fb.db') | hash('sha512') | to_uuid) if (postgres_enabled and matrix_bridge_mautrix_meta_messenger_database_engine == 'postgres') else '' }}"
  1685. ######################################################################
  1686. #
  1687. # /matrix-bridge-mautrix-meta-messenger
  1688. #
  1689. ######################################################################
  1690. ######################################################################
  1691. #
  1692. # matrix-bridge-mautrix-meta-instagram
  1693. #
  1694. ######################################################################
  1695. # We don't enable bridges by default.
  1696. matrix_bridge_mautrix_meta_instagram_enabled: false
  1697. matrix_bridge_mautrix_meta_instagram_systemd_required_services_list_auto: |
  1698. {{
  1699. matrix_addons_homeserver_systemd_services_list
  1700. +
  1701. ([postgres_identifier ~ '.service'] if (postgres_enabled and matrix_bridge_mautrix_meta_instagram_database_hostname == postgres_connection_hostname) else [])
  1702. }}
  1703. matrix_bridge_mautrix_meta_instagram_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_bridge_mautrix_meta_instagram_container_image_registry_prefix_upstream_default }}"
  1704. matrix_bridge_mautrix_meta_instagram_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm64'] }}"
  1705. matrix_bridge_mautrix_meta_instagram_container_network: "{{ matrix_addons_container_network }}"
  1706. matrix_bridge_mautrix_meta_instagram_container_additional_networks_auto: |-
  1707. {{
  1708. (
  1709. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  1710. +
  1711. ([postgres_container_network] if (postgres_enabled and matrix_bridge_mautrix_meta_instagram_database_hostname == postgres_connection_hostname and matrix_bridge_mautrix_meta_instagram_container_network != postgres_container_network) else [])
  1712. +
  1713. ([matrix_playbook_reverse_proxyable_services_additional_network] if (matrix_playbook_reverse_proxyable_services_additional_network and matrix_bridge_mautrix_meta_instagram_container_labels_traefik_enabled) else [])
  1714. ) | unique
  1715. }}
  1716. matrix_bridge_mautrix_meta_instagram_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  1717. matrix_bridge_mautrix_meta_instagram_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  1718. matrix_bridge_mautrix_meta_instagram_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  1719. matrix_bridge_mautrix_meta_instagram_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  1720. matrix_bridge_mautrix_meta_instagram_appservice_token: "{{ (matrix_homeserver_generic_secret_key + ':mau.meta.ig.as') | hash('sha512') | to_uuid }}"
  1721. matrix_bridge_mautrix_meta_instagram_homeserver_address: "{{ matrix_addons_homeserver_client_api_url }}"
  1722. matrix_bridge_mautrix_meta_instagram_homeserver_token: "{{ (matrix_homeserver_generic_secret_key + ':mau.meta.ig.hs') | hash('sha512') | to_uuid }}"
  1723. matrix_bridge_mautrix_meta_instagram_provisioning_shared_secret: "{{ (matrix_homeserver_generic_secret_key + ':mau.meta.ig.prov') | hash('sha512') | to_uuid }}"
  1724. matrix_bridge_mautrix_meta_instagram_homeserver_async_media: "{{ matrix_homeserver_implementation in ['synapse'] }}"
  1725. matrix_bridge_mautrix_meta_instagram_double_puppet_secrets_auto: |-
  1726. {{
  1727. {
  1728. matrix_bridge_mautrix_meta_instagram_homeserver_domain: ("as_token:" + matrix_appservice_double_puppet_registration_as_token)
  1729. }
  1730. if matrix_appservice_double_puppet_enabled
  1731. else {}
  1732. }}
  1733. matrix_bridge_mautrix_meta_instagram_scheme: "{{ 'https' if matrix_playbook_ssl_enabled else 'http' }}"
  1734. matrix_bridge_mautrix_meta_instagram_exposure_enabled: "{{ matrix_bridges_exposure_enabled }}"
  1735. matrix_bridge_mautrix_meta_instagram_exposure_hostname: "{{ matrix_bridges_exposure_hostname }}"
  1736. matrix_bridge_mautrix_meta_instagram_exposure_path_prefix: "{{ matrix_bridges_exposure_path_prefix }}/meta-instagram"
  1737. # We'd like to force-set people with external Postgres to SQLite, so the bridge role can complain
  1738. # and point them to a migration path.
  1739. matrix_bridge_mautrix_meta_instagram_database_engine: "{{ 'postgres' if postgres_enabled else 'sqlite3-fk-wal' }}"
  1740. matrix_bridge_mautrix_meta_instagram_database_hostname: "{{ postgres_connection_hostname if (postgres_enabled and matrix_bridge_mautrix_meta_instagram_database_engine == 'postgres') else '' }}"
  1741. matrix_bridge_mautrix_meta_instagram_database_password: "{{ ((matrix_homeserver_generic_secret_key + ':mau.fb.db') | hash('sha512') | to_uuid) if (postgres_enabled and matrix_bridge_mautrix_meta_instagram_database_engine == 'postgres') else '' }}"
  1742. ######################################################################
  1743. #
  1744. # /matrix-bridge-mautrix-meta-instagram
  1745. #
  1746. ######################################################################
  1747. ######################################################################
  1748. #
  1749. # matrix-bridge-mautrix-telegram
  1750. #
  1751. ######################################################################
  1752. # We don't enable bridges by default.
  1753. matrix_bridge_mautrix_telegram_enabled: false
  1754. matrix_bridge_mautrix_telegram_systemd_required_services_list_auto: |
  1755. {{
  1756. matrix_addons_homeserver_systemd_services_list
  1757. +
  1758. ([postgres_identifier ~ '.service'] if (postgres_enabled and matrix_bridge_mautrix_telegram_database_hostname == postgres_connection_hostname) else [])
  1759. }}
  1760. matrix_bridge_mautrix_telegram_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_bridge_mautrix_telegram_container_image_registry_prefix_upstream_default }}"
  1761. matrix_bridge_mautrix_telegram_container_image_self_build: "{{ matrix_architecture not in ['arm64', 'amd64'] }}"
  1762. matrix_bridge_mautrix_telegram_container_network: "{{ matrix_addons_container_network }}"
  1763. matrix_bridge_mautrix_telegram_container_additional_networks_auto: |-
  1764. {{
  1765. (
  1766. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  1767. +
  1768. ([postgres_container_network] if (postgres_enabled and matrix_bridge_mautrix_telegram_database_hostname == postgres_connection_hostname and matrix_bridge_mautrix_telegram_container_network != postgres_container_network) else [])
  1769. +
  1770. ([matrix_playbook_reverse_proxyable_services_additional_network] if (matrix_playbook_reverse_proxyable_services_additional_network and matrix_bridge_mautrix_telegram_container_labels_traefik_enabled) else [])
  1771. ) | unique
  1772. }}
  1773. matrix_bridge_mautrix_telegram_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  1774. matrix_bridge_mautrix_telegram_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  1775. matrix_bridge_mautrix_telegram_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  1776. matrix_bridge_mautrix_telegram_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  1777. matrix_bridge_mautrix_telegram_appservice_token: "{{ (matrix_homeserver_generic_secret_key + ':telegr.as.token') | hash('sha512') | to_uuid }}"
  1778. matrix_bridge_mautrix_telegram_homeserver_domain: "{{ matrix_domain }}"
  1779. matrix_bridge_mautrix_telegram_homeserver_address: "{{ matrix_addons_homeserver_client_api_url }}"
  1780. matrix_bridge_mautrix_telegram_homeserver_token: "{{ (matrix_homeserver_generic_secret_key + ':telegr.hs.token') | hash('sha512') | to_uuid }}"
  1781. matrix_bridge_mautrix_telegram_homeserver_async_media: "{{ matrix_homeserver_implementation in ['synapse'] }}"
  1782. matrix_bridge_mautrix_telegram_provisioning_shared_secret: "{{ (matrix_homeserver_generic_secret_key + ':mau.telegram.prov') | hash('sha512') | to_uuid }}"
  1783. matrix_bridge_mautrix_telegram_double_puppet_secrets_auto: |-
  1784. {{
  1785. {
  1786. matrix_bridge_mautrix_telegram_homeserver_domain: ("as_token:" + matrix_appservice_double_puppet_registration_as_token)
  1787. }
  1788. if matrix_appservice_double_puppet_enabled
  1789. else {}
  1790. }}
  1791. matrix_bridge_mautrix_telegram_scheme: "{{ 'https' if matrix_playbook_ssl_enabled else 'http' }}"
  1792. matrix_bridge_mautrix_telegram_exposure_enabled: "{{ matrix_bridges_exposure_enabled }}"
  1793. matrix_bridge_mautrix_telegram_exposure_hostname: "{{ matrix_bridges_exposure_hostname }}"
  1794. matrix_bridge_mautrix_telegram_exposure_path_prefix: "{{ matrix_bridges_exposure_path_prefix }}/telegram"
  1795. # Postgres is the default, except if not using internal Postgres server
  1796. matrix_bridge_mautrix_telegram_database_engine: "{{ 'postgres' if postgres_enabled else 'sqlite' }}"
  1797. matrix_bridge_mautrix_telegram_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  1798. matrix_bridge_mautrix_telegram_database_password: "{{ (matrix_homeserver_generic_secret_key + ':mau.telegram.db') | hash('sha512') | to_uuid }}"
  1799. ######################################################################
  1800. #
  1801. # /matrix-bridge-mautrix-telegram
  1802. #
  1803. ######################################################################
  1804. ######################################################################
  1805. #
  1806. # matrix-bridge-mautrix-twitter
  1807. #
  1808. ######################################################################
  1809. # We don't enable bridges by default.
  1810. matrix_bridge_mautrix_twitter_enabled: false
  1811. matrix_bridge_mautrix_twitter_systemd_required_services_list_auto: |
  1812. {{
  1813. matrix_addons_homeserver_systemd_services_list
  1814. +
  1815. ([postgres_identifier ~ '.service'] if (postgres_enabled and matrix_bridge_mautrix_twitter_database_hostname == postgres_connection_hostname) else [])
  1816. }}
  1817. matrix_bridge_mautrix_twitter_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_bridge_mautrix_twitter_container_image_registry_prefix_upstream_default }}"
  1818. matrix_bridge_mautrix_twitter_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm64'] }}"
  1819. matrix_bridge_mautrix_twitter_container_network: "{{ matrix_addons_container_network }}"
  1820. matrix_bridge_mautrix_twitter_container_additional_networks_auto: |-
  1821. {{
  1822. (
  1823. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  1824. +
  1825. ([postgres_container_network] if (postgres_enabled and matrix_bridge_mautrix_twitter_database_hostname == postgres_connection_hostname and matrix_bridge_mautrix_twitter_container_network != postgres_container_network) else [])
  1826. +
  1827. ([matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network and matrix_bridge_mautrix_twitter_container_labels_traefik_enabled else [])
  1828. ) | unique
  1829. }}
  1830. matrix_bridge_mautrix_twitter_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  1831. matrix_bridge_mautrix_twitter_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  1832. matrix_bridge_mautrix_twitter_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  1833. matrix_bridge_mautrix_twitter_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  1834. matrix_bridge_mautrix_twitter_appservice_token: "{{ (matrix_homeserver_generic_secret_key + ':twt.as.token') | hash('sha512') | to_uuid }}"
  1835. matrix_bridge_mautrix_twitter_homeserver_address: "{{ matrix_addons_homeserver_client_api_url }}"
  1836. matrix_bridge_mautrix_twitter_homeserver_token: "{{ (matrix_homeserver_generic_secret_key + ':twt.hs.token') | hash('sha512') | to_uuid }}"
  1837. matrix_bridge_mautrix_twitter_homeserver_async_media: "{{ matrix_homeserver_implementation in ['synapse'] }}"
  1838. matrix_bridge_mautrix_twitter_provisioning_shared_secret: "{{ (matrix_homeserver_generic_secret_key + ':mau.twit.prov') | hash('sha512') | to_uuid }}"
  1839. matrix_bridge_mautrix_twitter_double_puppet_secrets_auto: |-
  1840. {{
  1841. ({
  1842. matrix_bridge_mautrix_twitter_homeserver_domain: ("as_token:" + matrix_appservice_double_puppet_registration_as_token)
  1843. })
  1844. if matrix_appservice_double_puppet_enabled
  1845. else {}
  1846. }}
  1847. matrix_bridge_mautrix_twitter_scheme: "{{ 'https' if matrix_playbook_ssl_enabled else 'http' }}"
  1848. matrix_bridge_mautrix_twitter_exposure_enabled: "{{ matrix_bridges_exposure_enabled }}"
  1849. matrix_bridge_mautrix_twitter_exposure_hostname: "{{ matrix_bridges_exposure_hostname }}"
  1850. matrix_bridge_mautrix_twitter_exposure_path_prefix: "{{ matrix_bridges_exposure_path_prefix }}/twitter"
  1851. matrix_bridge_mautrix_twitter_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  1852. matrix_bridge_mautrix_twitter_database_password: "{{ (matrix_homeserver_generic_secret_key + ':mau.twt.db') | hash('sha512') | to_uuid if postgres_enabled else '' }}"
  1853. ######################################################################
  1854. #
  1855. # /matrix-bridge-mautrix-twitter
  1856. #
  1857. ######################################################################
  1858. ######################################################################
  1859. #
  1860. # matrix-bridge-mautrix-gmessages
  1861. #
  1862. ######################################################################
  1863. # We don't enable bridges by default.
  1864. matrix_bridge_mautrix_gmessages_enabled: false
  1865. matrix_bridge_mautrix_gmessages_systemd_required_services_list_auto: |
  1866. {{
  1867. matrix_addons_homeserver_systemd_services_list
  1868. +
  1869. ([postgres_identifier ~ '.service'] if (postgres_enabled and matrix_bridge_mautrix_gmessages_database_hostname == postgres_connection_hostname) else [])
  1870. }}
  1871. matrix_bridge_mautrix_gmessages_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_bridge_mautrix_gmessages_container_image_registry_prefix_upstream_default }}"
  1872. matrix_bridge_mautrix_gmessages_container_image_self_build: "{{ matrix_architecture not in ['arm64', 'amd64'] }}"
  1873. matrix_bridge_mautrix_gmessages_container_network: "{{ matrix_addons_container_network }}"
  1874. matrix_bridge_mautrix_gmessages_container_additional_networks_auto: |-
  1875. {{
  1876. (
  1877. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  1878. +
  1879. ([postgres_container_network] if (postgres_enabled and matrix_bridge_mautrix_gmessages_database_hostname == postgres_connection_hostname and matrix_bridge_mautrix_gmessages_container_network != postgres_container_network) else [])
  1880. +
  1881. ([matrix_playbook_reverse_proxyable_services_additional_network] if (matrix_playbook_reverse_proxyable_services_additional_network and matrix_bridge_mautrix_gmessages_container_labels_traefik_enabled) else [])
  1882. ) | unique
  1883. }}
  1884. matrix_bridge_mautrix_gmessages_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  1885. matrix_bridge_mautrix_gmessages_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  1886. matrix_bridge_mautrix_gmessages_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  1887. matrix_bridge_mautrix_gmessages_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  1888. matrix_bridge_mautrix_gmessages_appservice_token: "{{ (matrix_homeserver_generic_secret_key + ':gmessa.as.token') | hash('sha512') | to_uuid }}"
  1889. matrix_bridge_mautrix_gmessages_homeserver_address: "{{ matrix_addons_homeserver_client_api_url }}"
  1890. matrix_bridge_mautrix_gmessages_homeserver_token: "{{ (matrix_homeserver_generic_secret_key + ':gmessa.hs.token') | hash('sha512') | to_uuid }}"
  1891. matrix_bridge_mautrix_gmessages_provisioning_shared_secret: "{{ (matrix_homeserver_generic_secret_key + ':gmessa.prov') | hash('sha512') | to_uuid }}"
  1892. matrix_bridge_mautrix_gmessages_homeserver_async_media: "{{ matrix_homeserver_implementation in ['synapse'] }}"
  1893. matrix_bridge_mautrix_gmessages_double_puppet_secrets_auto: |-
  1894. {{
  1895. {
  1896. matrix_bridge_mautrix_gmessages_homeserver_domain: ("as_token:" + matrix_appservice_double_puppet_registration_as_token)
  1897. }
  1898. if matrix_appservice_double_puppet_enabled
  1899. else {}
  1900. }}
  1901. matrix_bridge_mautrix_gmessages_scheme: "{{ 'https' if matrix_playbook_ssl_enabled else 'http' }}"
  1902. matrix_bridge_mautrix_gmessages_exposure_enabled: "{{ matrix_bridges_exposure_enabled }}"
  1903. matrix_bridge_mautrix_gmessages_exposure_hostname: "{{ matrix_bridges_exposure_hostname }}"
  1904. matrix_bridge_mautrix_gmessages_exposure_path_prefix: "{{ matrix_bridges_exposure_path_prefix }}/gmessages"
  1905. # Postgres is the default, except if not using internal Postgres server
  1906. matrix_bridge_mautrix_gmessages_database_engine: "{{ 'postgres' if postgres_enabled else 'sqlite' }}"
  1907. matrix_bridge_mautrix_gmessages_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  1908. matrix_bridge_mautrix_gmessages_database_password: "{{ (matrix_homeserver_generic_secret_key + ':maugmessages.db') | hash('sha512') | to_uuid }}"
  1909. ######################################################################
  1910. #
  1911. # /matrix-bridge-mautrix-gmessages
  1912. #
  1913. ######################################################################
  1914. ######################################################################
  1915. #
  1916. # matrix-bridge-mautrix-gvoice
  1917. #
  1918. ######################################################################
  1919. # We don't enable bridges by default.
  1920. matrix_bridge_mautrix_gvoice_enabled: false
  1921. matrix_bridge_mautrix_gvoice_systemd_required_services_list_auto: |
  1922. {{
  1923. matrix_addons_homeserver_systemd_services_list
  1924. +
  1925. ([postgres_identifier ~ '.service'] if (postgres_enabled and matrix_bridge_mautrix_gvoice_database_hostname == postgres_connection_hostname) else [])
  1926. }}
  1927. matrix_bridge_mautrix_gvoice_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_bridge_mautrix_gvoice_container_image_registry_prefix_upstream_default }}"
  1928. matrix_bridge_mautrix_gvoice_container_image_self_build: "{{ matrix_architecture not in ['arm64', 'amd64'] }}"
  1929. matrix_bridge_mautrix_gvoice_container_network: "{{ matrix_addons_container_network }}"
  1930. matrix_bridge_mautrix_gvoice_container_additional_networks_auto: |-
  1931. {{
  1932. (
  1933. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  1934. +
  1935. ([postgres_container_network] if (postgres_enabled and matrix_bridge_mautrix_gvoice_database_hostname == postgres_connection_hostname and matrix_bridge_mautrix_gvoice_container_network != postgres_container_network) else [])
  1936. +
  1937. ([matrix_playbook_reverse_proxyable_services_additional_network] if (matrix_playbook_reverse_proxyable_services_additional_network and matrix_bridge_mautrix_gvoice_container_labels_traefik_enabled) else [])
  1938. ) | unique
  1939. }}
  1940. matrix_bridge_mautrix_gvoice_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  1941. matrix_bridge_mautrix_gvoice_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  1942. matrix_bridge_mautrix_gvoice_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  1943. matrix_bridge_mautrix_gvoice_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  1944. matrix_bridge_mautrix_gvoice_appservice_token: "{{ (matrix_homeserver_generic_secret_key + ':gvoice.as.token') | hash('sha512') | to_uuid }}"
  1945. matrix_bridge_mautrix_gvoice_homeserver_address: "{{ matrix_addons_homeserver_client_api_url }}"
  1946. matrix_bridge_mautrix_gvoice_homeserver_token: "{{ (matrix_homeserver_generic_secret_key + ':gvoice.hs.token') | hash('sha512') | to_uuid }}"
  1947. matrix_bridge_mautrix_gvoice_provisioning_shared_secret: "{{ (matrix_homeserver_generic_secret_key + ':gvoice.prov') | hash('sha512') | to_uuid }}"
  1948. matrix_bridge_mautrix_gvoice_homeserver_async_media: "{{ matrix_homeserver_implementation in ['synapse'] }}"
  1949. matrix_bridge_mautrix_gvoice_double_puppet_secrets_auto: |-
  1950. {{
  1951. {
  1952. matrix_bridge_mautrix_gvoice_homeserver_domain: ("as_token:" + matrix_appservice_double_puppet_registration_as_token)
  1953. }
  1954. if matrix_appservice_double_puppet_enabled
  1955. else {}
  1956. }}
  1957. matrix_bridge_mautrix_gvoice_scheme: "{{ 'https' if matrix_playbook_ssl_enabled else 'http' }}"
  1958. matrix_bridge_mautrix_gvoice_exposure_enabled: "{{ matrix_bridges_exposure_enabled }}"
  1959. matrix_bridge_mautrix_gvoice_exposure_hostname: "{{ matrix_bridges_exposure_hostname }}"
  1960. matrix_bridge_mautrix_gvoice_exposure_path_prefix: "{{ matrix_bridges_exposure_path_prefix }}/gvoice"
  1961. # Postgres is the default, except if not using internal Postgres server
  1962. matrix_bridge_mautrix_gvoice_database_engine: "{{ 'postgres' if postgres_enabled else 'sqlite' }}"
  1963. matrix_bridge_mautrix_gvoice_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  1964. matrix_bridge_mautrix_gvoice_database_password: "{{ (matrix_homeserver_generic_secret_key + ':maugvoice.db') | hash('sha512') | to_uuid }}"
  1965. ######################################################################
  1966. #
  1967. # /matrix-bridge-mautrix-gvoice
  1968. #
  1969. ######################################################################
  1970. ######################################################################
  1971. #
  1972. # matrix-bridge-mautrix-linkedin
  1973. #
  1974. ######################################################################
  1975. # We don't enable bridges by default.
  1976. matrix_bridge_mautrix_linkedin_enabled: false
  1977. matrix_bridge_mautrix_linkedin_systemd_required_services_list_auto: |
  1978. {{
  1979. matrix_addons_homeserver_systemd_services_list
  1980. +
  1981. ([postgres_identifier ~ '.service'] if (postgres_enabled and matrix_bridge_mautrix_linkedin_database_hostname == postgres_connection_hostname) else [])
  1982. }}
  1983. matrix_bridge_mautrix_linkedin_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_bridge_mautrix_linkedin_container_image_registry_prefix_upstream_default }}"
  1984. matrix_bridge_mautrix_linkedin_container_image_self_build: "{{ matrix_architecture not in ['arm64', 'amd64'] }}"
  1985. matrix_bridge_mautrix_linkedin_container_network: "{{ matrix_addons_container_network }}"
  1986. matrix_bridge_mautrix_linkedin_container_additional_networks_auto: |-
  1987. {{
  1988. (
  1989. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  1990. +
  1991. ([postgres_container_network] if (postgres_enabled and matrix_bridge_mautrix_linkedin_database_hostname == postgres_connection_hostname and matrix_bridge_mautrix_linkedin_container_network != postgres_container_network) else [])
  1992. +
  1993. ([matrix_playbook_reverse_proxyable_services_additional_network] if (matrix_playbook_reverse_proxyable_services_additional_network and matrix_bridge_mautrix_linkedin_container_labels_traefik_enabled) else [])
  1994. ) | unique
  1995. }}
  1996. matrix_bridge_mautrix_linkedin_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  1997. matrix_bridge_mautrix_linkedin_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  1998. matrix_bridge_mautrix_linkedin_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  1999. matrix_bridge_mautrix_linkedin_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  2000. matrix_bridge_mautrix_linkedin_appservice_token: "{{ (matrix_homeserver_generic_secret_key + ':linkedin.as.token') | hash('sha512') | to_uuid }}"
  2001. matrix_bridge_mautrix_linkedin_homeserver_address: "{{ matrix_addons_homeserver_client_api_url }}"
  2002. matrix_bridge_mautrix_linkedin_homeserver_token: "{{ (matrix_homeserver_generic_secret_key + ':linkedin.hs.token') | hash('sha512') | to_uuid }}"
  2003. matrix_bridge_mautrix_linkedin_provisioning_shared_secret: "{{ (matrix_homeserver_generic_secret_key + ':linkedin.prov') | hash('sha512') | to_uuid }}"
  2004. matrix_bridge_mautrix_linkedin_homeserver_async_media: "{{ matrix_homeserver_implementation in ['synapse'] }}"
  2005. matrix_bridge_mautrix_linkedin_double_puppet_secrets_auto: |-
  2006. {{
  2007. {
  2008. matrix_bridge_mautrix_linkedin_homeserver_domain: ("as_token:" + matrix_appservice_double_puppet_registration_as_token)
  2009. }
  2010. if matrix_appservice_double_puppet_enabled
  2011. else {}
  2012. }}
  2013. matrix_bridge_mautrix_linkedin_scheme: "{{ 'https' if matrix_playbook_ssl_enabled else 'http' }}"
  2014. matrix_bridge_mautrix_linkedin_exposure_enabled: "{{ matrix_bridges_exposure_enabled }}"
  2015. matrix_bridge_mautrix_linkedin_exposure_hostname: "{{ matrix_bridges_exposure_hostname }}"
  2016. matrix_bridge_mautrix_linkedin_exposure_path_prefix: "{{ matrix_bridges_exposure_path_prefix }}/linkedin"
  2017. # Postgres is the default, except if not using internal Postgres server
  2018. matrix_bridge_mautrix_linkedin_database_engine: "{{ 'postgres' if postgres_enabled else 'sqlite' }}"
  2019. matrix_bridge_mautrix_linkedin_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  2020. matrix_bridge_mautrix_linkedin_database_password: "{{ (matrix_homeserver_generic_secret_key + ':mau.linkedin.db') | hash('sha512') | to_uuid }}"
  2021. ######################################################################
  2022. #
  2023. # /matrix-bridge-mautrix-linkedin
  2024. #
  2025. ######################################################################
  2026. ######################################################################
  2027. #
  2028. # matrix-bridge-mautrix-wsproxy
  2029. #
  2030. ######################################################################
  2031. # We don't enable bridges by default.
  2032. matrix_bridge_mautrix_wsproxy_enabled: false
  2033. matrix_bridge_mautrix_wsproxy_systemd_required_services_list_default: |
  2034. {{
  2035. matrix_addons_homeserver_systemd_services_list
  2036. +
  2037. ([postgres_identifier ~ '.service'] if (postgres_enabled and matrix_bridge_mautrix_wsproxy_syncproxy_database_hostname == postgres_connection_hostname) else [])
  2038. }}
  2039. matrix_bridge_mautrix_wsproxy_homeserver_address: "{{ matrix_addons_homeserver_client_api_url }}"
  2040. matrix_bridge_mautrix_wsproxy_hostname: "wsproxy.{{ matrix_bridge_mautrix_wsproxy_homeserver_domain }}"
  2041. matrix_bridge_mautrix_wsproxy_syncproxy_homeserver_url: "{{ matrix_addons_homeserver_client_api_url }}"
  2042. matrix_bridge_mautrix_wsproxy_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_bridge_mautrix_wsproxy_container_image_registry_prefix_upstream_default }}"
  2043. matrix_bridge_mautrix_wsproxy_container_network: "{{ matrix_addons_container_network }}"
  2044. matrix_bridge_mautrix_wsproxy_container_additional_networks: |
  2045. {{
  2046. (
  2047. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  2048. +
  2049. ([matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network else [])
  2050. +
  2051. ([postgres_container_network] if (postgres_enabled and matrix_bridge_mautrix_wsproxy_syncproxy_database_hostname == postgres_connection_hostname and postgres_container_network != matrix_bridge_mautrix_wsproxy_container_network) else [])
  2052. ) | unique
  2053. }}
  2054. matrix_bridge_mautrix_wsproxy_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  2055. matrix_bridge_mautrix_wsproxy_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  2056. matrix_bridge_mautrix_wsproxy_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  2057. matrix_bridge_mautrix_wsproxy_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  2058. matrix_bridge_mautrix_wsproxy_syncproxy_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  2059. matrix_bridge_mautrix_wsproxy_syncproxy_database_password: "{{ (matrix_homeserver_generic_secret_key + ':wsproxy.db') | hash('sha512') | to_uuid }}"
  2060. ######################################################################
  2061. #
  2062. # /matrix-bridge-mautrix-wsproxy
  2063. #
  2064. ######################################################################
  2065. ######################################################################
  2066. #
  2067. # matrix-bridge-wechat
  2068. #
  2069. ######################################################################
  2070. # We don't enable bridges by default.
  2071. matrix_bridge_wechat_enabled: false
  2072. matrix_bridge_wechat_systemd_required_services_list_auto: |
  2073. {{
  2074. matrix_addons_homeserver_systemd_services_list
  2075. +
  2076. ([postgres_identifier ~ '.service'] if (postgres_enabled and matrix_bridge_wechat_database_hostname == postgres_connection_hostname) else [])
  2077. }}
  2078. matrix_bridge_wechat_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_bridge_wechat_container_image_registry_prefix_upstream_default }}"
  2079. matrix_bridge_wechat_agent_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_bridge_wechat_agent_container_image_registry_prefix_upstream_default }}"
  2080. matrix_bridge_wechat_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm64'] }}"
  2081. matrix_bridge_wechat_agent_container_image_self_build: "{{ matrix_architecture not in ['amd64'] }}"
  2082. matrix_bridge_wechat_container_network: "{{ matrix_addons_container_network }}"
  2083. matrix_bridge_wechat_container_additional_networks_auto: |-
  2084. {{
  2085. (
  2086. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  2087. +
  2088. ([postgres_container_network] if (postgres_enabled and matrix_bridge_wechat_database_hostname == postgres_connection_hostname and matrix_bridge_wechat_container_network != postgres_container_network) else [])
  2089. ) | unique
  2090. }}
  2091. matrix_bridge_wechat_appservice_token: "{{ (matrix_homeserver_generic_secret_key + ':wechat.as.token') | hash('sha512') | to_uuid }}"
  2092. matrix_bridge_wechat_homeserver_address: "{{ matrix_addons_homeserver_client_api_url }}"
  2093. matrix_bridge_wechat_homeserver_token: "{{ (matrix_homeserver_generic_secret_key + ':wechat.hs.token') | hash('sha512') | to_uuid }}"
  2094. matrix_bridge_wechat_homeserver_async_media: "{{ matrix_homeserver_implementation in ['synapse'] }}"
  2095. matrix_bridge_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 '' }}"
  2096. matrix_bridge_wechat_bridge_listen_secret: "{{ (matrix_homeserver_generic_secret_key + ':wechat.lstn') | hash('sha512') | to_uuid }}"
  2097. # Postgres is the default, except if not using internal Postgres server
  2098. matrix_bridge_wechat_database_engine: "{{ 'postgres' if postgres_enabled else 'sqlite' }}"
  2099. matrix_bridge_wechat_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  2100. matrix_bridge_wechat_database_password: "{{ (matrix_homeserver_generic_secret_key + ':gowechat.db') | hash('sha512') | to_uuid }}"
  2101. ######################################################################
  2102. #
  2103. # /matrix-bridge-wechat
  2104. #
  2105. ######################################################################
  2106. ######################################################################
  2107. #
  2108. # matrix-bridge-mautrix-whatsapp
  2109. #
  2110. ######################################################################
  2111. # We don't enable bridges by default.
  2112. matrix_bridge_mautrix_whatsapp_enabled: false
  2113. matrix_bridge_mautrix_whatsapp_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_bridge_mautrix_whatsapp_container_image_registry_prefix_upstream_default }}"
  2114. matrix_bridge_mautrix_whatsapp_container_image_self_build: "{{ matrix_architecture not in ['arm64', 'amd64'] }}"
  2115. matrix_bridge_mautrix_whatsapp_container_network: "{{ matrix_addons_container_network }}"
  2116. matrix_bridge_mautrix_whatsapp_container_additional_networks_auto: |-
  2117. {{
  2118. (
  2119. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  2120. +
  2121. ([postgres_container_network] if postgres_enabled and matrix_bridge_mautrix_whatsapp_database_hostname == postgres_connection_hostname else [])
  2122. +
  2123. ([matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network and matrix_bridge_mautrix_whatsapp_container_labels_traefik_enabled else [])
  2124. ) | unique
  2125. }}
  2126. matrix_bridge_mautrix_whatsapp_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  2127. matrix_bridge_mautrix_whatsapp_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  2128. matrix_bridge_mautrix_whatsapp_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  2129. matrix_bridge_mautrix_whatsapp_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  2130. matrix_bridge_mautrix_whatsapp_systemd_required_services_list_auto: |
  2131. {{
  2132. matrix_addons_homeserver_systemd_services_list
  2133. +
  2134. ([postgres_identifier ~ '.service'] if postgres_enabled and matrix_bridge_mautrix_whatsapp_database_hostname == postgres_connection_hostname else [])
  2135. }}
  2136. matrix_bridge_mautrix_whatsapp_appservice_token: "{{ (matrix_homeserver_generic_secret_key + ':wa.as.token') | hash('sha512') | to_uuid }}"
  2137. matrix_bridge_mautrix_whatsapp_homeserver_address: "{{ matrix_addons_homeserver_client_api_url }}"
  2138. matrix_bridge_mautrix_whatsapp_homeserver_token: "{{ (matrix_homeserver_generic_secret_key + ':wa.hs.token') | hash('sha512') | to_uuid }}"
  2139. matrix_bridge_mautrix_whatsapp_provisioning_shared_secret: "{{ (matrix_homeserver_generic_secret_key + ':wa.prov') | hash('sha512') | to_uuid }}"
  2140. matrix_bridge_mautrix_whatsapp_homeserver_async_media: "{{ matrix_homeserver_implementation in ['synapse'] }}"
  2141. matrix_bridge_mautrix_whatsapp_double_puppet_secrets_auto: |-
  2142. {{
  2143. {
  2144. matrix_bridge_mautrix_whatsapp_homeserver_domain: ("as_token:" + matrix_appservice_double_puppet_registration_as_token)
  2145. }
  2146. if matrix_appservice_double_puppet_enabled
  2147. else {}
  2148. }}
  2149. matrix_bridge_mautrix_whatsapp_scheme: "{{ 'https' if matrix_playbook_ssl_enabled else 'http' }}"
  2150. matrix_bridge_mautrix_whatsapp_exposure_enabled: "{{ matrix_bridges_exposure_enabled }}"
  2151. matrix_bridge_mautrix_whatsapp_exposure_hostname: "{{ matrix_bridges_exposure_hostname }}"
  2152. matrix_bridge_mautrix_whatsapp_exposure_path_prefix: "{{ matrix_bridges_exposure_path_prefix }}/whatsapp"
  2153. # Postgres is the default, except if not using internal Postgres server
  2154. matrix_bridge_mautrix_whatsapp_database_engine: "{{ 'postgres' if postgres_enabled else 'sqlite' }}"
  2155. matrix_bridge_mautrix_whatsapp_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  2156. matrix_bridge_mautrix_whatsapp_database_password: "{{ (matrix_homeserver_generic_secret_key + ':mauwhatsapp.db') | hash('sha512') | to_uuid }}"
  2157. ######################################################################
  2158. #
  2159. # /matrix-bridge-mautrix-whatsapp
  2160. #
  2161. ######################################################################
  2162. ######################################################################
  2163. #
  2164. # matrix-sms-bridge
  2165. #
  2166. ######################################################################
  2167. # We don't enable bridges by default.
  2168. matrix_bridge_sms_enabled: false
  2169. matrix_bridge_sms_systemd_required_services_list_auto: |
  2170. {{
  2171. matrix_addons_homeserver_systemd_services_list
  2172. }}
  2173. matrix_bridge_sms_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_bridge_sms_container_image_registry_prefix_upstream_default }}"
  2174. matrix_bridge_sms_container_network: "{{ matrix_addons_container_network }}"
  2175. matrix_bridge_sms_container_additional_networks_auto: |-
  2176. {{
  2177. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  2178. }}
  2179. matrix_bridge_sms_appservice_token: "{{ (matrix_homeserver_generic_secret_key + ':sms.as.token') | hash('sha512') | to_uuid }}"
  2180. matrix_bridge_sms_homeserver_hostname: "{{ (matrix_homeserver_container_client_api_endpoint | split(':'))[0] }}"
  2181. matrix_bridge_sms_homeserver_port: "{{ (matrix_homeserver_container_client_api_endpoint | split(':'))[1] }}"
  2182. matrix_bridge_sms_homeserver_token: "{{ (matrix_homeserver_generic_secret_key + ':sms.hs.token') | hash('sha512') | to_uuid }}"
  2183. ######################################################################
  2184. #
  2185. # /matrix-sms-bridge
  2186. #
  2187. ######################################################################
  2188. ######################################################################
  2189. #
  2190. # matrix-bridge-heisenbridge
  2191. #
  2192. ######################################################################
  2193. # We don't enable bridges by default.
  2194. matrix_bridge_heisenbridge_enabled: false
  2195. matrix_bridge_heisenbridge_scheme: "{{ 'https' if matrix_playbook_ssl_enabled else 'http' }}"
  2196. matrix_bridge_heisenbridge_systemd_required_services_list_auto: |
  2197. {{
  2198. matrix_addons_homeserver_systemd_services_list
  2199. }}
  2200. matrix_bridge_heisenbridge_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_bridge_heisenbridge_container_image_registry_prefix_upstream_default }}"
  2201. matrix_bridge_heisenbridge_container_network: "{{ matrix_addons_container_network }}"
  2202. matrix_bridge_heisenbridge_container_additional_networks_auto: |-
  2203. {{
  2204. (
  2205. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  2206. +
  2207. [matrix_playbook_reverse_proxyable_services_additional_network] if (matrix_bridge_heisenbridge_container_labels_traefik_enabled and matrix_playbook_reverse_proxyable_services_additional_network) else []
  2208. ) | unique
  2209. }}
  2210. matrix_bridge_heisenbridge_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  2211. matrix_bridge_heisenbridge_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  2212. matrix_bridge_heisenbridge_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  2213. matrix_bridge_heisenbridge_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  2214. matrix_bridge_heisenbridge_appservice_token: "{{ (matrix_homeserver_generic_secret_key + ':heisen.as.tok') | hash('sha512') | to_uuid }}"
  2215. matrix_bridge_heisenbridge_homeserver_token: "{{ (matrix_homeserver_generic_secret_key + ':heisen.hs.tok') | hash('sha512') | to_uuid }}"
  2216. matrix_bridge_heisenbridge_homeserver_url: "{{ matrix_addons_homeserver_client_api_url }}"
  2217. ######################################################################
  2218. #
  2219. # /matrix-bridge-heisenbridge
  2220. #
  2221. ######################################################################
  2222. ######################################################################
  2223. #
  2224. # matrix-bridge-hookshot
  2225. #
  2226. ######################################################################
  2227. # We don't enable bridges by default.
  2228. matrix_bridge_hookshot_enabled: false
  2229. matrix_bridge_hookshot_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_bridge_hookshot_container_image_registry_prefix_upstream_default }}"
  2230. matrix_bridge_hookshot_container_image_self_build: "{{ matrix_architecture not in ['arm64', 'amd64'] }}"
  2231. matrix_bridge_hookshot_appservice_token: "{{ (matrix_homeserver_generic_secret_key + ':hookshot.as.tok') | hash('sha512') | to_uuid }}"
  2232. matrix_bridge_hookshot_homeserver_token: "{{ (matrix_homeserver_generic_secret_key + ':hookshot.hs.tok') | hash('sha512') | to_uuid }}"
  2233. matrix_bridge_hookshot_homeserver_address: "{{ matrix_addons_homeserver_client_api_url }}"
  2234. matrix_bridge_hookshot_systemd_wanted_services_list: |
  2235. {{
  2236. matrix_addons_homeserver_systemd_services_list
  2237. +
  2238. ([(valkey_identifier + '.service')] if valkey_enabled and matrix_bridge_hookshot_cache_redis_host == valkey_identifier else [])
  2239. }}
  2240. # Hookshot's experimental encryption feature (and possibly others) may benefit from Redis, if available.
  2241. # We only connect to Redis if encryption is enabled (not for everyone who has Redis enabled),
  2242. # because connectivity is still potentially troublesome and is to be investigated.
  2243. matrix_bridge_hookshot_cache_redis_host: "{{ valkey_identifier if valkey_enabled else '' }}"
  2244. matrix_bridge_hookshot_container_network: "{{ matrix_addons_container_network }}"
  2245. matrix_bridge_hookshot_container_additional_networks_auto: |
  2246. {{
  2247. (
  2248. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  2249. +
  2250. ([valkey_container_network] if valkey_enabled and matrix_bridge_hookshot_cache_redis_host == valkey_identifier else [])
  2251. +
  2252. ([matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network and matrix_bridge_hookshot_container_labels_traefik_enabled else [])
  2253. ) | unique
  2254. }}
  2255. matrix_bridge_hookshot_container_http_host_bind_ports_defaultmapping:
  2256. - "{{ matrix_playbook_service_host_bind_interface_prefix }}{{ matrix_bridge_hookshot_appservice_port }}:{{ matrix_bridge_hookshot_appservice_port }}"
  2257. - "{{ matrix_playbook_service_host_bind_interface_prefix }}{{ matrix_bridge_hookshot_metrics_port }}:{{ matrix_bridge_hookshot_metrics_port }}"
  2258. - "{{ matrix_playbook_service_host_bind_interface_prefix }}{{ matrix_bridge_hookshot_webhook_port }}:{{ matrix_bridge_hookshot_webhook_port }}"
  2259. matrix_bridge_hookshot_container_http_host_bind_ports: "{{ matrix_bridge_hookshot_container_http_host_bind_ports_defaultmapping if matrix_playbook_service_host_bind_interface_prefix else [] }}"
  2260. matrix_bridge_hookshot_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  2261. matrix_bridge_hookshot_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  2262. matrix_bridge_hookshot_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  2263. matrix_bridge_hookshot_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  2264. matrix_bridge_hookshot_metrics_enabled: "{{ prometheus_enabled or matrix_metrics_exposure_enabled }}"
  2265. matrix_bridge_hookshot_metrics_proxying_enabled: "{{ matrix_bridge_hookshot_metrics_enabled and matrix_metrics_exposure_enabled }}"
  2266. matrix_bridge_hookshot_metrics_proxying_hostname: "{{ matrix_metrics_exposure_hostname }}"
  2267. matrix_bridge_hookshot_metrics_proxying_path_prefix: "{{ matrix_metrics_exposure_path_prefix }}/hookshot"
  2268. matrix_bridge_hookshot_container_labels_metrics_middleware_basic_auth_enabled: "{{ matrix_metrics_exposure_http_basic_auth_enabled }}"
  2269. matrix_bridge_hookshot_container_labels_metrics_middleware_basic_auth_users: "{{ matrix_metrics_exposure_http_basic_auth_users }}"
  2270. matrix_bridge_hookshot_public_scheme: "{{ 'https' if matrix_playbook_ssl_enabled else 'http' }}"
  2271. ######################################################################
  2272. #
  2273. # /matrix-bridge-hookshot
  2274. #
  2275. ######################################################################
  2276. ######################################################################
  2277. #
  2278. # matrix-bridge-meshtastic-relay
  2279. #
  2280. ######################################################################
  2281. # We don't enable bridges by default.
  2282. matrix_bridge_meshtastic_relay_enabled: false
  2283. matrix_bridge_meshtastic_relay_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_bridge_meshtastic_relay_container_image_registry_prefix_upstream_default }}"
  2284. matrix_bridge_meshtastic_relay_matrix_host: "{{ matrix_domain }}"
  2285. matrix_bridge_meshtastic_relay_matrix_homeserver_url: "{{ matrix_addons_homeserver_client_api_url }}"
  2286. matrix_bridge_meshtastic_relay_container_network: "{{ matrix_addons_container_network }}"
  2287. matrix_bridge_meshtastic_relay_systemd_required_services_list_auto: |
  2288. {{
  2289. matrix_addons_homeserver_systemd_services_list
  2290. }}
  2291. matrix_bridge_meshtastic_relay_container_additional_networks_auto: |
  2292. {{
  2293. ([] if matrix_addons_homeserver_container_network == '' or matrix_addons_homeserver_container_network == matrix_bridge_meshtastic_relay_container_network else [matrix_addons_homeserver_container_network])
  2294. }}
  2295. ######################################################################
  2296. #
  2297. # /matrix-bridge-meshtastic-relay
  2298. #
  2299. ######################################################################
  2300. ######################################################################
  2301. #
  2302. # matrix-bridge-mx-puppet-steam
  2303. #
  2304. ######################################################################
  2305. # We don't enable bridges by default.
  2306. matrix_bridge_mx_puppet_steam_enabled: false
  2307. matrix_bridge_mx_puppet_steam_systemd_required_services_list_auto: |
  2308. {{
  2309. matrix_addons_homeserver_systemd_services_list
  2310. +
  2311. ([postgres_identifier ~ '.service'] if (postgres_enabled and matrix_bridge_mx_puppet_steam_database_hostname == postgres_connection_hostname) else [])
  2312. }}
  2313. matrix_bridge_mx_puppet_steam_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_bridge_mx_puppet_steam_container_image_registry_prefix_upstream_default }}"
  2314. matrix_bridge_mx_puppet_steam_container_image_self_build: "{{ matrix_architecture not in ['arm64', 'amd64'] }}"
  2315. matrix_bridge_mx_puppet_steam_container_network: "{{ matrix_addons_container_network }}"
  2316. matrix_bridge_mx_puppet_steam_container_additional_networks_auto: |-
  2317. {{
  2318. (
  2319. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  2320. +
  2321. ([postgres_container_network] if (postgres_enabled and matrix_bridge_mx_puppet_steam_database_hostname == postgres_connection_hostname and matrix_bridge_mx_puppet_steam_container_network != postgres_container_network) else [])
  2322. ) | unique
  2323. }}
  2324. matrix_bridge_mx_puppet_steam_appservice_token: "{{ (matrix_homeserver_generic_secret_key + ':mxste.as.tok') | hash('sha512') | to_uuid }}"
  2325. matrix_bridge_mx_puppet_steam_homeserver_address: "{{ matrix_addons_homeserver_client_api_url }}"
  2326. matrix_bridge_mx_puppet_steam_homeserver_token: "{{ (matrix_homeserver_generic_secret_key + ':mxste.hs.tok') | hash('sha512') | to_uuid }}"
  2327. matrix_bridge_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 '' }}"
  2328. matrix_bridge_mx_puppet_steam_presence_enabled: "{{ matrix_homeserver_implementation != 'synapse' or matrix_synapse_presence_enabled }}"
  2329. # Postgres is the default, except if not using internal Postgres server
  2330. matrix_bridge_mx_puppet_steam_database_engine: "{{ 'postgres' if postgres_enabled else 'sqlite' }}"
  2331. matrix_bridge_mx_puppet_steam_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  2332. matrix_bridge_mx_puppet_steam_database_password: "{{ (matrix_homeserver_generic_secret_key + ':mxpup.steam.db') | hash('sha512') | to_uuid }}"
  2333. ######################################################################
  2334. #
  2335. # /matrix-bridge-mx-puppet-steam
  2336. #
  2337. ######################################################################
  2338. ######################################################################
  2339. #
  2340. # matrix-bridge-mx-puppet-groupme
  2341. #
  2342. ######################################################################
  2343. # We don't enable bridges by default.
  2344. matrix_bridge_mx_puppet_groupme_enabled: false
  2345. matrix_bridge_mx_puppet_groupme_systemd_required_services_list_auto: |
  2346. {{
  2347. matrix_addons_homeserver_systemd_services_list
  2348. +
  2349. ([postgres_identifier ~ '.service'] if (postgres_enabled and matrix_bridge_mx_puppet_groupme_database_hostname == postgres_connection_hostname) else [])
  2350. }}
  2351. matrix_bridge_mx_puppet_groupme_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_bridge_mx_puppet_groupme_container_image_registry_prefix_upstream_default }}"
  2352. matrix_bridge_mx_puppet_groupme_container_image_self_build: "{{ matrix_architecture != 'amd64' }}"
  2353. matrix_bridge_mx_puppet_groupme_container_network: "{{ matrix_addons_container_network }}"
  2354. matrix_bridge_mx_puppet_groupme_container_additional_networks_auto: |-
  2355. {{
  2356. (
  2357. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  2358. +
  2359. ([postgres_container_network] if (postgres_enabled and matrix_bridge_mx_puppet_groupme_database_hostname == postgres_connection_hostname and matrix_bridge_mx_puppet_groupme_container_network != postgres_container_network) else [])
  2360. ) | unique
  2361. }}
  2362. matrix_bridge_mx_puppet_groupme_appservice_token: "{{ (matrix_homeserver_generic_secret_key + ':mxgro.as.tok') | hash('sha512') | to_uuid }}"
  2363. matrix_bridge_mx_puppet_groupme_homeserver_address: "{{ matrix_addons_homeserver_client_api_url }}"
  2364. matrix_bridge_mx_puppet_groupme_homeserver_token: "{{ (matrix_homeserver_generic_secret_key + ':mxgro.hs.tok') | hash('sha512') | to_uuid }}"
  2365. matrix_bridge_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 '' }}"
  2366. matrix_bridge_mx_puppet_groupme_presence_enabled: "{{ matrix_homeserver_implementation != 'synapse' or matrix_synapse_presence_enabled }}"
  2367. # Postgres is the default, except if not using internal Postgres server
  2368. matrix_bridge_mx_puppet_groupme_database_engine: "{{ 'postgres' if postgres_enabled else 'sqlite' }}"
  2369. matrix_bridge_mx_puppet_groupme_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  2370. matrix_bridge_mx_puppet_groupme_database_password: "{{ (matrix_homeserver_generic_secret_key + ':mxpup.groupme.db') | hash('sha512') | to_uuid }}"
  2371. ######################################################################
  2372. #
  2373. # /matrix-bridge-mx-puppet-groupme
  2374. #
  2375. ######################################################################
  2376. ######################################################################
  2377. #
  2378. # matrix-bridge-postmoogle
  2379. #
  2380. ######################################################################
  2381. # We don't enable bridges by default.
  2382. matrix_bridge_postmoogle_enabled: false
  2383. matrix_bridge_postmoogle_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_bridge_postmoogle_container_image_registry_prefix_upstream_default }}"
  2384. matrix_bridge_postmoogle_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm64'] }}"
  2385. matrix_bridge_postmoogle_ssl_path: |-
  2386. {{
  2387. {
  2388. 'playbook-managed-traefik': (traefik_certs_dumper_dumped_certificates_path if traefik_certs_dumper_enabled else ''),
  2389. 'other-traefik-container': (traefik_certs_dumper_dumped_certificates_path if traefik_certs_dumper_enabled else ''),
  2390. 'none': '',
  2391. }[matrix_playbook_reverse_proxy_type]
  2392. }}
  2393. matrix_playbook_bridge_postmoogle_traefik_tls_cert: "{% for domain in matrix_bridge_postmoogle_domains %}/ssl/{{ domain }}/certificate.crt {% endfor %}"
  2394. matrix_playbook_bridge_postmoogle_traefik_key: "{% for domain in matrix_bridge_postmoogle_domains %}/ssl/{{ domain }}/privatekey.key {% endfor %}"
  2395. matrix_bridge_postmoogle_tls_cert: |-
  2396. {{
  2397. {
  2398. 'playbook-managed-traefik': (matrix_playbook_bridge_postmoogle_traefik_tls_cert if traefik_certs_dumper_enabled else ''),
  2399. 'other-traefik-container': (matrix_playbook_bridge_postmoogle_traefik_tls_cert if traefik_certs_dumper_enabled else ''),
  2400. 'none': '',
  2401. }[matrix_playbook_reverse_proxy_type]
  2402. }}
  2403. matrix_bridge_postmoogle_tls_key: |-
  2404. {{
  2405. {
  2406. 'playbook-managed-traefik': (matrix_playbook_bridge_postmoogle_traefik_key if traefik_certs_dumper_enabled else ''),
  2407. 'other-traefik-container': (matrix_playbook_bridge_postmoogle_traefik_key if traefik_certs_dumper_enabled else ''),
  2408. 'none': '',
  2409. }[matrix_playbook_reverse_proxy_type]
  2410. }}
  2411. matrix_playbook_bridge_postmoogle_traefik_certs_dumper_waiter_services: "{% for domain in matrix_bridge_postmoogle_domains %}{{ traefik_certs_dumper_identifier }}-wait-for-domain@{{ domain }}.service {% endfor %}"
  2412. matrix_bridge_postmoogle_systemd_required_services_list_auto: |
  2413. {{
  2414. matrix_addons_homeserver_systemd_services_list
  2415. +
  2416. ([postgres_identifier ~ '.service'] if postgres_enabled and matrix_bridge_postmoogle_database_hostname == matrix_bridge_postmoogle_database_hostname else [])
  2417. +
  2418. (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 [])
  2419. }}
  2420. # Postgres is the default, except if not using internal Postgres server
  2421. matrix_bridge_postmoogle_database_engine: "{{ 'postgres' if postgres_enabled else 'sqlite' }}"
  2422. matrix_bridge_postmoogle_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  2423. matrix_bridge_postmoogle_database_password: "{{ (matrix_homeserver_generic_secret_key + ':postmoogle.db') | hash('sha512') | to_uuid }}"
  2424. matrix_bridge_postmoogle_homeserver: "{{ matrix_addons_homeserver_client_api_url }}"
  2425. matrix_bridge_postmoogle_container_network: "{{ matrix_addons_container_network }}"
  2426. matrix_bridge_postmoogle_container_additional_networks_auto: |-
  2427. {{
  2428. (
  2429. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  2430. +
  2431. ([postgres_container_network] if postgres_enabled and matrix_bot_matrix_reminder_bot_database_hostname == postgres_connection_hostname else [])
  2432. ) | unique
  2433. }}
  2434. ######################################################################
  2435. #
  2436. # /matrix-bridge-postmoogle
  2437. #
  2438. ######################################################################
  2439. ######################################################################
  2440. #
  2441. # matrix-bridge-steam
  2442. #
  2443. ######################################################################
  2444. # We don't enable bridges by default.
  2445. matrix_bridge_steam_enabled: false
  2446. matrix_bridge_steam_systemd_required_services_list_auto: |
  2447. {{
  2448. matrix_addons_homeserver_systemd_services_list
  2449. +
  2450. ([postgres_identifier ~ '.service'] if (postgres_enabled and matrix_bridge_steam_database_hostname == postgres_connection_hostname) else [])
  2451. }}
  2452. matrix_bridge_steam_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_bridge_steam_container_image_registry_prefix_upstream_default }}"
  2453. matrix_bridge_steam_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm64'] }}"
  2454. matrix_bridge_steam_container_network: "{{ matrix_addons_container_network }}"
  2455. matrix_bridge_steam_container_additional_networks_auto: |-
  2456. {{
  2457. (
  2458. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  2459. +
  2460. ([postgres_container_network] if (postgres_enabled and matrix_bridge_steam_database_hostname == postgres_connection_hostname and matrix_bridge_steam_container_network != postgres_container_network) else [])
  2461. +
  2462. ([matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network and matrix_bridge_steam_container_labels_traefik_enabled else [])
  2463. ) | unique
  2464. }}
  2465. matrix_bridge_steam_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  2466. matrix_bridge_steam_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  2467. matrix_bridge_steam_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  2468. matrix_bridge_steam_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  2469. matrix_bridge_steam_appservice_token: "{{ (matrix_homeserver_generic_secret_key + ':steam.as.token') | hash('sha512') | to_uuid }}"
  2470. matrix_bridge_steam_homeserver_address: "{{ matrix_addons_homeserver_client_api_url }}"
  2471. matrix_bridge_steam_homeserver_token: "{{ (matrix_homeserver_generic_secret_key + ':steam.hs.token') | hash('sha512') | to_uuid }}"
  2472. matrix_bridge_steam_homeserver_async_media: "{{ matrix_homeserver_implementation in ['synapse'] }}"
  2473. matrix_bridge_steam_public_media_signing_key: "{{ ((matrix_homeserver_generic_secret_key + ':steam.pub.key') | hash('sha512') | to_uuid) if matrix_bridge_steam_public_media_enabled else '' }}"
  2474. matrix_bridge_steam_provisioning_shared_secret: "{{ (matrix_homeserver_generic_secret_key + ':steam.prov') | hash('sha512') | to_uuid }}"
  2475. matrix_bridge_steam_exposure_enabled: "{{ matrix_bridges_exposure_enabled }}"
  2476. matrix_bridge_steam_exposure_hostname: "{{ matrix_bridges_exposure_hostname }}"
  2477. matrix_bridge_steam_exposure_path_prefix: "{{ matrix_bridges_exposure_path_prefix }}/steam"
  2478. matrix_bridge_steam_double_puppet_secrets_auto: |-
  2479. {{
  2480. ({
  2481. matrix_bridge_steam_homeserver_domain: ("as_token:" + matrix_appservice_double_puppet_registration_as_token)
  2482. })
  2483. if matrix_appservice_double_puppet_enabled
  2484. else {}
  2485. }}
  2486. matrix_bridge_steam_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  2487. matrix_bridge_steam_database_password: "{{ (matrix_homeserver_generic_secret_key + ':mau.twt.db') | hash('sha512') | to_uuid if postgres_enabled else '' }}"
  2488. ######################################################################
  2489. #
  2490. # /matrix-bridge-steam
  2491. #
  2492. ######################################################################
  2493. ######################################################################
  2494. #
  2495. # matrix-bot-matrix-reminder-bot
  2496. #
  2497. ######################################################################
  2498. # We don't enable bots by default.
  2499. matrix_bot_matrix_reminder_bot_enabled: false
  2500. matrix_bot_matrix_reminder_bot_systemd_required_services_list_auto: |
  2501. {{
  2502. matrix_addons_homeserver_systemd_services_list
  2503. +
  2504. ([postgres_identifier ~ '.service'] if postgres_enabled and matrix_bot_matrix_reminder_bot_database_hostname == postgres_connection_hostname else [])
  2505. }}
  2506. 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 }}"
  2507. matrix_bot_matrix_reminder_bot_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm64'] }}"
  2508. matrix_bot_matrix_reminder_bot_container_network: "{{ matrix_addons_container_network }}"
  2509. matrix_bot_matrix_reminder_bot_container_additional_networks_auto: |-
  2510. {{
  2511. (
  2512. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  2513. +
  2514. ([postgres_container_network] if postgres_enabled and matrix_bot_matrix_reminder_bot_database_hostname == postgres_connection_hostname else [])
  2515. ) | unique
  2516. }}
  2517. matrix_bot_matrix_reminder_bot_matrix_homeserver_url: "{{ matrix_addons_homeserver_client_api_url }}"
  2518. # Postgres is the default, except if not using internal Postgres server
  2519. matrix_bot_matrix_reminder_bot_database_engine: "{{ 'postgres' if postgres_enabled else 'sqlite' }}"
  2520. matrix_bot_matrix_reminder_bot_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  2521. matrix_bot_matrix_reminder_bot_database_password: "{{ (matrix_homeserver_generic_secret_key + ':reminder.bot.db') | hash('sha512') | to_uuid }}"
  2522. matrix_bot_matrix_reminder_bot_allowlist_enabled: true
  2523. matrix_bot_matrix_reminder_bot_allowlist_regexes_auto:
  2524. - "@[a-z0-9-_.]+:{{ matrix_domain }}"
  2525. ######################################################################
  2526. #
  2527. # /matrix-bot-matrix-reminder-bot
  2528. #
  2529. ######################################################################
  2530. ######################################################################
  2531. #
  2532. # matrix-bot-maubot
  2533. #
  2534. ######################################################################
  2535. # We don't enable bots by default.
  2536. matrix_bot_maubot_enabled: false
  2537. matrix_bot_maubot_systemd_required_services_list_auto: |
  2538. {{
  2539. matrix_addons_homeserver_systemd_services_list
  2540. +
  2541. ([postgres_identifier ~ '.service'] if (postgres_enabled and matrix_bot_maubot_database_hostname == postgres_connection_hostname) else [])
  2542. }}
  2543. matrix_bot_maubot_hostname: "{{ matrix_server_fqn_matrix }}"
  2544. matrix_bot_maubot_homeserver_url: "{{ matrix_addons_homeserver_client_api_url }}"
  2545. matrix_bot_maubot_homeserver_secret: |-
  2546. {{
  2547. {
  2548. 'synapse': matrix_synapse_registration_shared_secret | default(''),
  2549. 'dendrite': matrix_dendrite_client_api_registration_shared_secret | default(''),
  2550. }[matrix_homeserver_implementation] | default('')
  2551. }}
  2552. 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 }}"
  2553. matrix_bot_maubot_container_image_self_build: "{{ matrix_architecture not in ['amd64'] }}"
  2554. 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 '' }}"
  2555. matrix_bot_maubot_container_network: "{{ matrix_addons_container_network }}"
  2556. matrix_bot_maubot_container_additional_networks_auto: |-
  2557. {{
  2558. (
  2559. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  2560. +
  2561. ([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 [])
  2562. +
  2563. ([matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network and matrix_bot_maubot_container_labels_traefik_enabled else [])
  2564. ) | unique
  2565. }}
  2566. matrix_bot_maubot_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  2567. matrix_bot_maubot_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  2568. matrix_bot_maubot_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  2569. matrix_bot_maubot_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  2570. matrix_bot_maubot_container_labels_management_hostname: "{{ matrix_server_fqn_matrix }}"
  2571. # Postgres is the default, except if not using internal Postgres server
  2572. matrix_bot_maubot_database_engine: "{{ 'postgres' if postgres_enabled else 'sqlite' }}"
  2573. matrix_bot_maubot_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  2574. matrix_bot_maubot_database_password: "{{ (matrix_homeserver_generic_secret_key + ':mxpup.dsc.db') | hash('sha512') | to_uuid }}"
  2575. ######################################################################
  2576. #
  2577. # /matrix-bot-maubot
  2578. #
  2579. ######################################################################
  2580. ######################################################################
  2581. #
  2582. # matrix-bot-honoroit
  2583. #
  2584. ######################################################################
  2585. # We don't enable bots by default.
  2586. matrix_bot_honoroit_enabled: false
  2587. matrix_bot_honoroit_hostname: "{{ matrix_server_fqn_matrix }}"
  2588. matrix_bot_honoroit_path_prefix: /honoroit
  2589. matrix_bot_honoroit_systemd_required_services_list_auto: |
  2590. {{
  2591. matrix_addons_homeserver_systemd_services_list
  2592. +
  2593. ([postgres_identifier ~ '.service'] if postgres_enabled and matrix_bot_honoroit_database_hostname == postgres_connection_hostname else [])
  2594. }}
  2595. 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 }}"
  2596. matrix_bot_honoroit_container_network: "{{ matrix_addons_container_network }}"
  2597. matrix_bot_honoroit_container_additional_networks: |
  2598. {{
  2599. (
  2600. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  2601. +
  2602. ([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 [])
  2603. +
  2604. ([matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network and matrix_bot_honoroit_container_labels_traefik_enabled else [])
  2605. ) | unique
  2606. }}
  2607. matrix_bot_honoroit_container_labels_traefik_enabled: "{{ matrix_playbook_traefik_labels_enabled }}"
  2608. matrix_bot_honoroit_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  2609. matrix_bot_honoroit_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  2610. matrix_bot_honoroit_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  2611. # For consistency with other things hosted at the Matrix FQN, we adjust the metrics endpoint
  2612. # so that metrics would be served at something like `/metrics/SERVICE_NAME`, and not at the default path for the role (`PREFIX/metrics`).
  2613. matrix_bot_honoroit_container_labels_traefik_metrics_path: "{{ matrix_metrics_exposure_path_prefix }}/honoroit"
  2614. matrix_bot_honoroit_homeserver: "{{ matrix_addons_homeserver_client_api_url }}"
  2615. # Postgres is the default, except if not using internal Postgres server
  2616. matrix_bot_honoroit_database_engine: "{{ 'postgres' if postgres_enabled else 'sqlite' }}"
  2617. matrix_bot_honoroit_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  2618. matrix_bot_honoroit_database_password: "{{ (matrix_homeserver_generic_secret_key + ':honoroit.bot.db') | hash('sha512') | to_uuid }}"
  2619. matrix_bot_honoroit_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm64'] }}"
  2620. ######################################################################
  2621. #
  2622. # /matrix-bot-honoroit
  2623. #
  2624. ######################################################################
  2625. ######################################################################
  2626. #
  2627. # matrix-bot-buscarron
  2628. #
  2629. ######################################################################
  2630. # We don't enable bots by default.
  2631. matrix_bot_buscarron_enabled: false
  2632. matrix_bot_buscarron_hostname: "{{ matrix_server_fqn_buscarron }}"
  2633. matrix_bot_buscarron_systemd_required_services_list_auto: |
  2634. {{
  2635. matrix_addons_homeserver_systemd_services_list
  2636. +
  2637. ([postgres_identifier ~ '.service'] if (postgres_enabled and matrix_bot_buscarron_database_hostname == postgres_connection_hostname) else [])
  2638. }}
  2639. 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 }}"
  2640. matrix_bot_buscarron_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm64'] }}"
  2641. matrix_bot_buscarron_container_network: "{{ matrix_addons_container_network }}"
  2642. matrix_bot_buscarron_container_additional_networks_auto: |-
  2643. {{
  2644. (
  2645. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  2646. +
  2647. ([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 [])
  2648. +
  2649. ([matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network and matrix_bot_buscarron_container_labels_traefik_enabled else [])
  2650. ) | unique
  2651. }}
  2652. matrix_bot_buscarron_container_labels_traefik_enabled: "{{ matrix_playbook_traefik_labels_enabled }}"
  2653. matrix_bot_buscarron_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  2654. matrix_bot_buscarron_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  2655. matrix_bot_buscarron_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  2656. matrix_bot_buscarron_homeserver: "{{ matrix_addons_homeserver_client_api_url }}"
  2657. # Postgres is the default, except if not using internal Postgres server
  2658. matrix_bot_buscarron_database_engine: "{{ 'postgres' if postgres_enabled else 'sqlite' }}"
  2659. matrix_bot_buscarron_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  2660. matrix_bot_buscarron_database_password: "{{ (matrix_homeserver_generic_secret_key + ':buscarron.bot.db') | hash('sha512') | to_uuid }}"
  2661. ######################################################################
  2662. #
  2663. # /matrix-bot-buscarron
  2664. #
  2665. ######################################################################
  2666. ######################################################################
  2667. #
  2668. # matrix-bot-baibot
  2669. #
  2670. ######################################################################
  2671. # We don't enable bots by default.
  2672. matrix_bot_baibot_enabled: false
  2673. 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 }}"
  2674. matrix_bot_baibot_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm64'] }}"
  2675. matrix_bot_baibot_systemd_required_services_list_auto: |
  2676. {{
  2677. matrix_addons_homeserver_systemd_services_list
  2678. }}
  2679. matrix_bot_baibot_config_homeserver_url: "{{ matrix_addons_homeserver_client_api_url }}"
  2680. matrix_bot_baibot_container_network: "{{ matrix_addons_container_network }}"
  2681. matrix_bot_baibot_container_additional_networks_auto: |-
  2682. {{
  2683. (
  2684. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  2685. ) | unique
  2686. }}
  2687. ######################################################################
  2688. #
  2689. # /matrix-bot-baibot
  2690. #
  2691. ######################################################################
  2692. ######################################################################
  2693. #
  2694. # matrix-bot-mjolnir
  2695. #
  2696. ######################################################################
  2697. # We don't enable bots by default.
  2698. matrix_bot_mjolnir_enabled: false
  2699. matrix_bot_mjolnir_systemd_required_services_list_auto: |
  2700. {{
  2701. matrix_addons_homeserver_systemd_services_list
  2702. +
  2703. (['matrix-pantalaimon.service'] if matrix_bot_mjolnir_pantalaimon_use else [])
  2704. }}
  2705. 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 }}"
  2706. matrix_bot_mjolnir_container_image_self_build: "{{ matrix_architecture != 'amd64' }}"
  2707. matrix_bot_mjolnir_container_network: "{{ matrix_addons_container_network }}"
  2708. matrix_bot_mjolnir_container_additional_networks_auto: |-
  2709. {{
  2710. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  2711. }}
  2712. matrix_bot_mjolnir_homeserver_url: "{{ 'http://matrix-pantalaimon:8009' if matrix_bot_mjolnir_pantalaimon_use else matrix_addons_homeserver_client_api_url }}"
  2713. matrix_bot_mjolnir_raw_homeserver_url: "{{ matrix_addons_homeserver_client_api_url }}"
  2714. ######################################################################
  2715. #
  2716. # /matrix-bot-mjolnir
  2717. #
  2718. ######################################################################
  2719. ######################################################################
  2720. #
  2721. # matrix-bot-draupnir
  2722. #
  2723. ######################################################################
  2724. # We don't enable bots by default.
  2725. matrix_bot_draupnir_enabled: false
  2726. 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 '' }}"
  2727. matrix_bot_draupnir_systemd_required_services_list_auto: |
  2728. {{
  2729. matrix_addons_homeserver_systemd_services_list
  2730. +
  2731. (['matrix-pantalaimon.service'] if matrix_bot_draupnir_pantalaimon_use else [])
  2732. }}
  2733. 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 }}"
  2734. matrix_bot_draupnir_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm64'] }}"
  2735. matrix_bot_draupnir_container_network: "{{ matrix_addons_container_network }}"
  2736. matrix_bot_draupnir_container_additional_networks_auto: |-
  2737. {{
  2738. (
  2739. ([] if matrix_addons_homeserver_container_network == '' else
  2740. [matrix_addons_homeserver_container_network])
  2741. +
  2742. ([matrix_playbook_reverse_proxyable_services_additional_network] if
  2743. (matrix_playbook_reverse_proxyable_services_additional_network and matrix_bot_draupnir_container_labels_traefik_enabled) else [])
  2744. +
  2745. ([matrix_pantalaimon_container_network] if (matrix_bot_draupnir_pantalaimon_use and matrix_pantalaimon_container_network != matrix_bot_draupnir_container_network) else [])
  2746. ) | unique
  2747. }}
  2748. 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
  2749. matrix_bot_draupnir_config_rawHomeserverUrl: "{{ matrix_addons_homeserver_client_api_url }}" # noqa var-naming
  2750. 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'] }}"
  2751. matrix_bot_draupnir_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  2752. matrix_bot_draupnir_container_labels_web_abuseReporting_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  2753. matrix_bot_draupnir_container_labels_web_abuseReporting_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  2754. #The salt is size restricted here as a maximum salt size of 16 characters exists due to the functions used.
  2755. matrix_bot_draupnir_config_web_synapseHTTPAntispam_authorization: "{{ (matrix_homeserver_generic_secret_key + ':draupnir.httpmod') | hash('sha512') | to_uuid }}" # noqa var-naming
  2756. ######################################################################
  2757. #
  2758. # /matrix-bot-draupnir
  2759. #
  2760. ######################################################################
  2761. ######################################################################
  2762. #
  2763. # matrix-bot-meowlnir
  2764. #
  2765. ######################################################################
  2766. # We don't enable bots by default.
  2767. matrix_bot_meowlnir_enabled: false
  2768. matrix_bot_meowlnir_container_http_host_bind_port: "{{ (matrix_playbook_service_host_bind_interface_prefix ~ '8772') if matrix_playbook_service_host_bind_interface_prefix else '' }}"
  2769. matrix_bot_meowlnir_systemd_required_services_list_auto: |
  2770. {{
  2771. matrix_addons_homeserver_systemd_services_list
  2772. +
  2773. ([postgres_identifier ~ '.service'] if (postgres_enabled and matrix_bot_meowlnir_database_hostname == postgres_connection_hostname) else [])
  2774. }}
  2775. matrix_bot_meowlnir_container_image_registry_prefix_upstream: "{{ matrix_container_global_registry_prefix_override if matrix_container_global_registry_prefix_override else matrix_bot_meowlnir_container_image_registry_prefix_upstream_default }}"
  2776. matrix_bot_meowlnir_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm64'] }}"
  2777. matrix_bot_meowlnir_container_network: "{{ matrix_addons_container_network }}"
  2778. matrix_bot_meowlnir_container_additional_networks_auto: |-
  2779. {{
  2780. (
  2781. ([] if matrix_addons_homeserver_container_network == '' else
  2782. [matrix_addons_homeserver_container_network])
  2783. +
  2784. ([matrix_playbook_reverse_proxyable_services_additional_network] if
  2785. (matrix_playbook_reverse_proxyable_services_additional_network and matrix_bot_meowlnir_container_labels_traefik_enabled) else [])
  2786. +
  2787. ([postgres_container_network] if (postgres_enabled and matrix_bot_meowlnir_database_hostname == postgres_connection_hostname and matrix_bot_meowlnir_container_network != postgres_container_network) else [])
  2788. ) | unique
  2789. }}
  2790. matrix_bot_meowlnir_config_homeserver_address: "{{ matrix_addons_homeserver_client_api_url }}"
  2791. matrix_bot_meowlnir_config_homeserver_domain: "{{ matrix_domain }}"
  2792. # Only consulted by bots configured with `management_room_auto_create`, and only as the
  2793. # default for those which do not carry their own `initial_managers` list.
  2794. # May legitimately be empty, in which case such bots fail validation and ask to be told who
  2795. # their initial managers should be.
  2796. matrix_bot_meowlnir_initial_managers: "{{ [matrix_admin] if matrix_admin else [] }}"
  2797. matrix_bot_meowlnir_appservice_token: "{{ (matrix_homeserver_generic_secret_key + ':meowlnir.as.token') | hash('sha512') | to_uuid }}"
  2798. matrix_bot_meowlnir_homeserver_token: "{{ (matrix_homeserver_generic_secret_key + ':meowlnir.hs.token') | hash('sha512') | to_uuid }}"
  2799. matrix_bot_meowlnir_config_meowlnir_management_secret: "{{ (matrix_homeserver_generic_secret_key + ':meowlnir.management') | hash('sha512') | to_uuid }}"
  2800. matrix_bot_meowlnir_config_meowlnir_data_secret: "{{ (matrix_homeserver_generic_secret_key + ':meowlnir.data') | hash('sha512') | to_uuid }}"
  2801. matrix_bot_meowlnir_config_antispam_secret: "{{ (matrix_homeserver_generic_secret_key + ':meowlnir.antispam') | hash('sha512') | to_uuid }}"
  2802. # Meowlnir expects a Synapse-style ed25519 private key: `<algorithm> <key ID> <unpadded-base64 32-byte seed>`.
  2803. #
  2804. # Only the seed is stored in this format — Meowlnir derives the actual keypair from it
  2805. # via `ed25519.NewKeyFromSeed`, so no elliptic curve arithmetic happens here. The 32
  2806. # hexadecimal characters sliced out of the hash below serve as the seed's 32 bytes.
  2807. #
  2808. # The key ID is cosmetic: Meowlnir always signs with the hardcoded `ed25519:policy_server`
  2809. # (see `PolicyServerKeyID` upstream), so we use a matching name to avoid confusion.
  2810. #
  2811. # Note that slicing hex text gives the seed 128 bits of entropy, not a full 256.
  2812. # That matches ed25519's own security level, so it is not a practical weakness, but you can
  2813. # override this variable with an independently generated key if you would prefer one.
  2814. matrix_bot_meowlnir_config_policy_server_signing_key: "ed25519 policy_server {{ ((matrix_homeserver_generic_secret_key + ':meowlnir.policy_server.signing_key') | hash('sha512'))[:32] | b64encode | regex_replace('=+$', '') }}"
  2815. matrix_bot_meowlnir_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  2816. matrix_bot_meowlnir_database_password: "{{ (matrix_homeserver_generic_secret_key + ':bot.meowlnir.db') | hash('sha512') | to_uuid }}"
  2817. matrix_bot_meowlnir_synapse_database_uri: "{{ ('postgresql://' + matrix_synapse_database_user + ':' + matrix_synapse_database_password + '@' + matrix_synapse_database_host + ':' + (matrix_synapse_database_port | string) + '/' + matrix_synapse_database_database + '?sslmode=disable') if (matrix_bot_meowlnir_synapse_database_integration_enabled and matrix_synapse_enabled) else '' }}"
  2818. matrix_bot_meowlnir_container_labels_traefik_enabled: "{{ (matrix_bot_meowlnir_config_reporting_enabled or matrix_bot_meowlnir_policy_server_enabled) and matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  2819. matrix_bot_meowlnir_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  2820. matrix_bot_meowlnir_container_labels_reporting_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  2821. matrix_bot_meowlnir_container_labels_reporting_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}" # noqa var-naming
  2822. matrix_bot_meowlnir_container_labels_policy_server_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  2823. matrix_bot_meowlnir_container_labels_policy_server_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}" # noqa var-naming
  2824. ######################################################################
  2825. #
  2826. # /matrix-bot-meowlnir
  2827. #
  2828. ######################################################################
  2829. ######################################################################
  2830. #
  2831. # matrix-appservice-draupnir-for-all
  2832. #
  2833. ######################################################################
  2834. # We don't enable bots by default.
  2835. matrix_appservice_draupnir_for_all_enabled: false
  2836. matrix_appservice_draupnir_for_all_systemd_required_services_list_auto: |
  2837. {{
  2838. matrix_addons_homeserver_systemd_services_list
  2839. +
  2840. ([postgres_identifier ~ '.service'] if (postgres_enabled and matrix_appservice_draupnir_for_all_database_hostname == postgres_connection_hostname) else [])
  2841. }}
  2842. 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 }}"
  2843. matrix_appservice_draupnir_for_all_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm64'] }}"
  2844. matrix_appservice_draupnir_for_all_container_network: "{{ matrix_addons_container_network }}"
  2845. matrix_appservice_draupnir_for_all_container_additional_networks_auto: |-
  2846. {{
  2847. (
  2848. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  2849. +
  2850. ([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 [])
  2851. ) | unique
  2852. }}
  2853. matrix_appservice_draupnir_for_all_appservice_token: "{{ (matrix_homeserver_generic_secret_key + ':d4a.as.token') | hash('sha512') | to_uuid }}"
  2854. matrix_appservice_draupnir_for_all_homeserver_token: "{{ (matrix_homeserver_generic_secret_key + ':d4a.hs.token') | hash('sha512') | to_uuid }}"
  2855. matrix_appservice_draupnir_for_all_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  2856. matrix_appservice_draupnir_for_all_database_password: "{{ (matrix_homeserver_generic_secret_key + ':as.d4a.db') | hash('sha512') | to_uuid }}"
  2857. ######################################################################
  2858. #
  2859. # /matrix-appservice-draupnir-for-all
  2860. #
  2861. ######################################################################
  2862. ######################################################################
  2863. #
  2864. # matrix-appservice-double-puppet
  2865. #
  2866. ######################################################################
  2867. matrix_appservice_double_puppet_enabled: false
  2868. matrix_appservice_double_puppet_registration_as_token: "{{ (matrix_homeserver_generic_secret_key + ':as.doub.pup') | hash('sha512') | to_uuid }}"
  2869. matrix_appservice_double_puppet_registration_hs_token: "{{ (matrix_homeserver_generic_secret_key + ':hs.doub.pup') | hash('sha512') | to_uuid }}"
  2870. ######################################################################
  2871. #
  2872. # /matrix-appservice-double-puppet
  2873. #
  2874. ######################################################################
  2875. ######################################################################
  2876. #
  2877. # matrix-pantalaimon
  2878. #
  2879. ######################################################################
  2880. matrix_pantalaimon_enabled: false
  2881. matrix_pantalaimon_systemd_required_services_list_auto: |
  2882. {{
  2883. matrix_addons_homeserver_systemd_services_list
  2884. }}
  2885. 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 }}"
  2886. matrix_pantalaimon_container_network: "{{ matrix_homeserver_container_network }}"
  2887. matrix_pantalaimon_container_image_self_build: "{{ matrix_architecture not in ['amd64'] }}"
  2888. matrix_pantalaimon_homeserver_url: "{{ matrix_addons_homeserver_client_api_url }}"
  2889. ######################################################################
  2890. #
  2891. # /matrix-pantalaimon
  2892. #
  2893. ######################################################################
  2894. ######################################################################
  2895. #
  2896. # etke/backup_borg
  2897. #
  2898. ######################################################################
  2899. backup_borg_enabled: false
  2900. backup_borg_mariadb_enabled: false
  2901. backup_borg_mysql_enabled: false
  2902. backup_borg_mongodb_enabled: false
  2903. backup_borg_identifier: matrix-backup-borg
  2904. backup_borg_storage_archive_name_format: matrix-{now:%Y-%m-%d-%H%M%S}
  2905. backup_borg_base_path: "{{ matrix_base_data_path }}/backup-borg"
  2906. backup_borg_username: "{{ matrix_user_name }}"
  2907. backup_borg_uid: "{{ matrix_user_uid }}"
  2908. backup_borg_gid: "{{ matrix_user_gid }}"
  2909. 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 }}"
  2910. backup_borg_container_network: "{{ postgres_container_network if postgres_enabled else backup_borg_identifier }}"
  2911. backup_borg_postgresql_version_detection_postgres_role_name: "{{ 'galaxy/postgres' if postgres_enabled else '' }}"
  2912. backup_borg_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm32', 'arm64'] }}"
  2913. backup_borg_postgresql_enabled: "{{ postgres_enabled }}"
  2914. backup_borg_postgresql_databases_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  2915. backup_borg_postgresql_databases_username: "{{ postgres_connection_username if postgres_enabled else '' }}"
  2916. backup_borg_postgresql_databases_password: "{{ postgres_connection_password if postgres_enabled else '' }}"
  2917. backup_borg_postgresql_databases_port: "{{ postgres_connection_port if postgres_enabled else 5432 }}"
  2918. backup_borg_postgresql_databases_auto: "{{ postgres_managed_databases | map(attribute='name') if postgres_enabled else [] }}"
  2919. backup_borg_location_source_directories_auto:
  2920. - "{{ matrix_base_data_path }}"
  2921. # local_thumbnails is deliberately NOT excluded: with dynamic_thumbnails disabled (Synapse's default),
  2922. # nothing regenerates lost thumbnails, so the official Synapse backup guide recommends backing them up.
  2923. backup_borg_location_exclude_patterns_auto: |
  2924. {{
  2925. ([matrix_synapse_media_store_path + '/remote_content', 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 [])
  2926. +
  2927. ([postgres_data_path] if postgres_enabled else [])
  2928. }}
  2929. backup_borg_systemd_required_services_list: |
  2930. {{
  2931. [devture_systemd_docker_base_docker_service_name]
  2932. +
  2933. ([postgres_identifier ~ '.service'] if postgres_enabled else [])
  2934. }}
  2935. ######################################################################
  2936. #
  2937. # /etke/backup_borg
  2938. #
  2939. ######################################################################
  2940. ######################################################################
  2941. #
  2942. # matrix-cactus-comments
  2943. #
  2944. ######################################################################
  2945. matrix_cactus_comments_enabled: false
  2946. matrix_cactus_comments_systemd_required_services_list_auto: |
  2947. {{
  2948. matrix_addons_homeserver_systemd_services_list
  2949. }}
  2950. 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 }}"
  2951. matrix_cactus_comments_container_image_self_build: "{{ matrix_architecture not in ['amd64'] }}"
  2952. matrix_cactus_comments_container_network: "{{ matrix_addons_container_network }}"
  2953. matrix_cactus_comments_container_additional_networks_auto: |-
  2954. {{
  2955. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  2956. }}
  2957. matrix_cactus_comments_as_token: "{{ (matrix_homeserver_generic_secret_key + ':cactus.as.token') | hash('sha512') | to_uuid }}"
  2958. matrix_cactus_comments_hs_token: "{{ (matrix_homeserver_generic_secret_key + ':cactus.hs.token') | hash('sha512') | to_uuid }}"
  2959. matrix_cactus_comments_homeserver_url: "{{ matrix_addons_homeserver_client_api_url }}"
  2960. ######################################################################
  2961. #
  2962. # /matrix-cactus-comments
  2963. #
  2964. ######################################################################
  2965. ######################################################################
  2966. #
  2967. # matrix-cactus-comments-client
  2968. #
  2969. ######################################################################
  2970. matrix_cactus_comments_client_enabled: "{{ matrix_cactus_comments_enabled }}"
  2971. matrix_cactus_comments_client_hostname: "{{ matrix_server_fqn_matrix }}"
  2972. 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 }}"
  2973. matrix_cactus_comments_client_container_network: "{{ matrix_addons_container_network }}"
  2974. matrix_cactus_comments_client_container_additional_networks_auto: |-
  2975. {{
  2976. (
  2977. ([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 [])
  2978. ) | unique
  2979. }}
  2980. matrix_cactus_comments_client_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  2981. matrix_cactus_comments_client_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  2982. matrix_cactus_comments_client_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  2983. matrix_cactus_comments_client_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  2984. ######################################################################
  2985. #
  2986. # /matrix-cactus-comments-client
  2987. #
  2988. ######################################################################
  2989. ######################################################################
  2990. #
  2991. # matrix-corporal
  2992. #
  2993. ######################################################################
  2994. matrix_corporal_enabled: false
  2995. matrix_corporal_systemd_required_services_list_auto: |
  2996. {{
  2997. (['matrix-' + matrix_homeserver_implementation + '.service'])
  2998. }}
  2999. 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 }}"
  3000. matrix_corporal_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm64'] }}"
  3001. 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 '' }}"
  3002. 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 '' }}"
  3003. matrix_corporal_container_network: matrix-corporal
  3004. matrix_corporal_container_additional_networks: |
  3005. {{
  3006. (
  3007. ([matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network else [])
  3008. +
  3009. ([matrix_homeserver_container_network] if matrix_corporal_container_network != matrix_homeserver_container_network else [])
  3010. ) | unique
  3011. }}
  3012. matrix_corporal_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  3013. matrix_corporal_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  3014. matrix_corporal_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  3015. matrix_corporal_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  3016. matrix_corporal_matrix_homeserver_scheme: "{{ 'https' if matrix_playbook_ssl_enabled else 'http' }}"
  3017. matrix_corporal_matrix_homeserver_api_endpoint: "{{ matrix_homeserver_container_url }}"
  3018. matrix_corporal_matrix_auth_shared_secret: "{{ matrix_synapse_ext_password_provider_shared_secret_auth_shared_secret }}"
  3019. # This is only useful if there's REST auth provider to make use of it.
  3020. matrix_corporal_http_gateway_internal_rest_auth_enabled: "{{ matrix_synapse_ext_password_provider_rest_auth_enabled }}"
  3021. matrix_corporal_matrix_registration_shared_secret: "{{ matrix_synapse_registration_shared_secret }}"
  3022. ######################################################################
  3023. #
  3024. # /matrix-corporal
  3025. #
  3026. ######################################################################
  3027. ######################################################################
  3028. #
  3029. # matrix-matrixto
  3030. #
  3031. ######################################################################
  3032. # We don't enable matrixto by default.
  3033. matrix_matrixto_enabled: false
  3034. matrix_matrixto_base_path: "{{ matrix_base_data_path }}/matrixto"
  3035. # The container image is not provided at https://github.com/matrix-org/matrix.to
  3036. matrix_matrixto_container_image_self_build: true
  3037. matrix_matrixto_hostname: "{{ matrix_server_fqn_matrixto }}"
  3038. matrix_matrixto_container_network: matrix-matrixto
  3039. matrix_matrixto_container_additional_networks: "{{ [matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network else [] }}"
  3040. matrix_matrixto_container_http_host_bind_port: "{{ (matrix_playbook_service_host_bind_interface_prefix ~ '5000') if matrix_playbook_service_host_bind_interface_prefix else '' }}"
  3041. matrix_matrixto_container_labels_traefik_enabled: "{{ matrix_playbook_traefik_labels_enabled }}"
  3042. matrix_matrixto_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  3043. matrix_matrixto_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  3044. matrix_matrixto_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  3045. ######################################################################
  3046. #
  3047. # /matrix-matrixto
  3048. #
  3049. ######################################################################
  3050. ######################################################################
  3051. #
  3052. # matrix-rageshake
  3053. #
  3054. ######################################################################
  3055. # We don't enable rageshake by default.
  3056. matrix_rageshake_enabled: false
  3057. matrix_rageshake_container_image_self_build: "{{ matrix_architecture not in ['amd64'] }}"
  3058. matrix_rageshake_hostname: "{{ matrix_server_fqn_rageshake }}"
  3059. 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 }}"
  3060. matrix_rageshake_container_additional_networks: "{{ [matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network else [] }}"
  3061. matrix_rageshake_container_http_host_bind_port: "{{ (matrix_playbook_service_host_bind_interface_prefix ~ '9110') if matrix_playbook_service_host_bind_interface_prefix else '' }}"
  3062. matrix_rageshake_container_labels_traefik_enabled: "{{ matrix_playbook_traefik_labels_enabled }}"
  3063. matrix_rageshake_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  3064. matrix_rageshake_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  3065. matrix_rageshake_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  3066. ######################################################################
  3067. #
  3068. # /matrix-rageshake
  3069. #
  3070. ######################################################################
  3071. ######################################################################
  3072. #
  3073. # coturn
  3074. #
  3075. ######################################################################
  3076. # Coturn is enabled by default only when Jitsi is enabled because Jitsi still
  3077. # depends on legacy TURN integration for compatibility.
  3078. coturn_enabled: "{{ jitsi_enabled | bool }}"
  3079. coturn_identifier: matrix-coturn
  3080. coturn_base_path: "{{ matrix_base_data_path }}/coturn"
  3081. coturn_uid: "{{ matrix_user_uid }}"
  3082. coturn_gid: "{{ matrix_user_gid }}"
  3083. coturn_hostname: "{{ matrix_server_fqn_matrix }}"
  3084. coturn_container_image_registry_prefix: "{{ 'localhost/' if coturn_container_image_self_build else coturn_container_image_registry_prefix_upstream }}"
  3085. 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 }}"
  3086. coturn_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm32', 'arm64'] }}"
  3087. # By default, we use the official public instance.
  3088. coturn_turn_external_ip_address_auto_detection_echoip_service_url: https://ifconfig.co/json
  3089. coturn_turn_static_auth_secret: "{{ ((matrix_homeserver_generic_secret_key + ':coturn.sas') | hash('sha512') | to_uuid) if coturn_authentication_method == 'auth-secret' else '' }}"
  3090. coturn_lt_cred_mech_username: "{{ ((matrix_homeserver_generic_secret_key + ':coturn.user') | hash('sha512') | to_uuid) if coturn_authentication_method == 'lt-cred-mech' else '' }}"
  3091. coturn_lt_cred_mech_password: "{{ ((matrix_homeserver_generic_secret_key + ':coturn.pass') | hash('sha512') | to_uuid) if coturn_authentication_method == 'lt-cred-mech' else '' }}"
  3092. coturn_tls_enabled: "{{ matrix_playbook_ssl_enabled }}"
  3093. coturn_tls_cert_path: |-
  3094. {{
  3095. {
  3096. 'playbook-managed-traefik': ('/certificate.crt' if traefik_certs_dumper_enabled else ''),
  3097. 'other-traefik-container': ('/certificate.crt' if traefik_certs_dumper_enabled else ''),
  3098. 'none': '',
  3099. }[matrix_playbook_reverse_proxy_type]
  3100. }}
  3101. coturn_tls_key_path: |-
  3102. {{
  3103. {
  3104. 'playbook-managed-traefik': ('/privatekey.key' if traefik_certs_dumper_enabled else ''),
  3105. 'other-traefik-container': ('/privatekey.key' if traefik_certs_dumper_enabled else ''),
  3106. 'none': '',
  3107. }[matrix_playbook_reverse_proxy_type]
  3108. }}
  3109. coturn_container_additional_volumes: |
  3110. {{
  3111. (
  3112. [
  3113. {
  3114. 'src': (traefik_certs_dumper_dumped_certificates_path + '/' + coturn_hostname + '/certificate.crt'),
  3115. 'dst': '/certificate.crt',
  3116. 'options': 'ro',
  3117. },
  3118. {
  3119. 'src': (traefik_certs_dumper_dumped_certificates_path + '/' + coturn_hostname + '/privatekey.key'),
  3120. 'dst': '/privatekey.key',
  3121. 'options': 'ro',
  3122. },
  3123. ] 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 []
  3124. )
  3125. }}
  3126. coturn_systemd_required_services_list_auto: |
  3127. {{
  3128. ([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 [])
  3129. }}
  3130. ######################################################################
  3131. #
  3132. # /coturn
  3133. #
  3134. ######################################################################
  3135. ######################################################################
  3136. #
  3137. # etherpad
  3138. #
  3139. ######################################################################
  3140. etherpad_enabled: false
  3141. etherpad_identifier: matrix-etherpad
  3142. etherpad_scheme: "{{ 'https' if matrix_playbook_ssl_enabled else 'http' }}"
  3143. etherpad_base_path: "{{ matrix_base_data_path }}/etherpad"
  3144. etherpad_uid: "{{ matrix_user_uid }}"
  3145. etherpad_gid: "{{ matrix_user_gid }}"
  3146. etherpad_framing_enabled: "{{ jitsi_enabled }}"
  3147. etherpad_hostname: "{{ matrix_server_fqn_etherpad }}"
  3148. 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 }}"
  3149. etherpad_container_image_self_build: "{{ matrix_architecture not in ['amd64'] }}"
  3150. etherpad_container_http_host_bind_port: "{{ (matrix_playbook_service_host_bind_interface_prefix ~ '9001') if matrix_playbook_service_host_bind_interface_prefix else '' }}"
  3151. etherpad_container_network: "{{ matrix_addons_container_network }}"
  3152. etherpad_container_additional_networks_auto: |
  3153. {{
  3154. (
  3155. ([matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network else [])
  3156. +
  3157. ([postgres_container_network] if postgres_enabled and postgres_container_network != etherpad_container_network else [])
  3158. ) | unique
  3159. }}
  3160. etherpad_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  3161. etherpad_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  3162. etherpad_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  3163. etherpad_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  3164. etherpad_systemd_required_services_list_auto: |
  3165. {{
  3166. ([postgres_identifier ~ '.service'] if postgres_enabled else [])
  3167. }}
  3168. etherpad_database_postgres_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  3169. etherpad_database_name: matrix_etherpad
  3170. etherpad_database_postgres_username: matrix_etherpad
  3171. etherpad_database_postgres_password: "{{ (matrix_homeserver_generic_secret_key + ':etherpad.db') | hash('sha512') | to_uuid }}"
  3172. ######################################################################
  3173. #
  3174. # /etherpad
  3175. #
  3176. ######################################################################
  3177. ######################################################################
  3178. #
  3179. # ddclient
  3180. #
  3181. ######################################################################
  3182. ddclient_enabled: false
  3183. ddclient_identifier: matrix-dynamic-dns
  3184. ddclient_base_path: "{{ matrix_base_data_path }}/dynamic-dns"
  3185. ddclient_uid: "{{ matrix_user_uid }}"
  3186. ddclient_gid: "{{ matrix_user_gid }}"
  3187. ddclient_container_image_registry_prefix: "{{ 'localhost/' if ddclient_container_image_self_build else ddclient_container_image_registry_prefix_upstream }}"
  3188. 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 }}"
  3189. ddclient_web: "https://cloudflare.com/cdn-cgi/trace"
  3190. ddclient_web_skip: "ip="
  3191. ######################################################################
  3192. #
  3193. # /ddclient
  3194. #
  3195. ######################################################################
  3196. ######################################################################
  3197. #
  3198. # jitsi
  3199. #
  3200. ######################################################################
  3201. jitsi_enabled: false
  3202. jitsi_architecture: "{{ matrix_architecture }}"
  3203. jitsi_hostname: "{{ matrix_server_fqn_jitsi }}"
  3204. jitsi_identifier: matrix-jitsi
  3205. jitsi_base_path: "{{ matrix_base_data_path }}/jitsi"
  3206. jitsi_uid: "{{ matrix_user_uid }}"
  3207. jitsi_gid: "{{ matrix_user_gid }}"
  3208. jitsi_user_username: "{{ matrix_user_name }}"
  3209. 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 }}"
  3210. jitsi_web_container_http_host_bind_port: "{{ (matrix_playbook_service_host_bind_interface_prefix ~ '13080') if matrix_playbook_service_host_bind_interface_prefix else '' }}"
  3211. jitsi_web_container_additional_networks_auto: |
  3212. {{
  3213. ([matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network else [])
  3214. }}
  3215. 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 }}"
  3216. jitsi_jvb_container_additional_networks_auto: |
  3217. {{
  3218. ([matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network else [])
  3219. }}
  3220. 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 }}"
  3221. jitsi_prosody_container_http_host_bind_port: "{{ (matrix_playbook_service_host_bind_interface_prefix ~ '5280') if matrix_playbook_service_host_bind_interface_prefix else '' }}"
  3222. jitsi_prosody_container_additional_networks_auto: |
  3223. {{
  3224. ([matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network else [])
  3225. }}
  3226. 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 }}"
  3227. jitsi_container_labels_traefik_enabled: "{{ matrix_playbook_traefik_labels_enabled }}"
  3228. jitsi_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  3229. jitsi_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  3230. jitsi_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  3231. jitsi_jibri_xmpp_password: "{{ (matrix_homeserver_generic_secret_key + ':jibri') | hash('sha512') | to_uuid }}"
  3232. jitsi_jicofo_auth_password: "{{ (matrix_homeserver_generic_secret_key + ':jicofo') | hash('sha512') | to_uuid }}"
  3233. jitsi_jvb_auth_password: "{{ (matrix_homeserver_generic_secret_key + ':jvb') | hash('sha512') | to_uuid }}"
  3234. jitsi_web_stun_servers: |
  3235. {{
  3236. [
  3237. 'stun:' + matrix_server_fqn_matrix + ':5349',
  3238. 'stun:' + matrix_server_fqn_matrix + ':3478',
  3239. ]
  3240. if coturn_enabled
  3241. else [ 'stun:meet-jit-si-turnrelay.jitsi.net:443']
  3242. }}
  3243. # The Jitsi instance installed by this playbook is meant for embedding into Matrix clients, so framing is allowed.
  3244. jitsi_web_framing_enabled: true
  3245. # Jitsi (Prosody) only seems to support authenticating with coturn using `auth-secret`, not `lt-cred-mech`.
  3246. # See: https://prosody.im/doc/coturn
  3247. jitsi_turn_credentials: "{{ coturn_turn_static_auth_secret if (coturn_enabled and coturn_authentication_method == 'auth-secret') else '' }}"
  3248. jitsi_turn_host: "{{ ('turn.' + matrix_server_fqn_matrix) if coturn_enabled else '' }}"
  3249. jitsi_turns_host: "{{ ('turn.' + matrix_server_fqn_matrix) if coturn_enabled else '' }}"
  3250. jitsi_turn_port: "{{ coturn_container_stun_plain_host_bind_port_tcp.split(':')[-1] if coturn_enabled else '' }}"
  3251. jitsi_turns_port: "{{ coturn_container_stun_tls_host_bind_port_tcp.split(':')[-1] if coturn_enabled else '' }}"
  3252. # If the self-hosted Etherpad instance is available, it will also show up in Jitsi conferences,
  3253. # unless explicitly disabled by setting `jitsi_etherpad_enabled` to false.
  3254. # Falls back to the scalar.vector.im etherpad in case someone sets `jitsi_etherpad_enabled` to true,
  3255. # while also setting `etherpad_enabled` to false.
  3256. jitsi_etherpad_enabled: "{{ etherpad_enabled }}"
  3257. # The trailing slash is stripped, because the Jitsi role appends path segments (e.g. `/p/`) itself
  3258. # and `etherpad_base_url` ends with a slash, which would otherwise produce double-slash URLs.
  3259. jitsi_etherpad_base: "{{ (etherpad_base_url | regex_replace('/+$', '')) if etherpad_enabled else 'https://scalar.vector.im/etherpad' }}"
  3260. # Allow verification using JWT and matrix-UVS
  3261. jitsi_prosody_auth_matrix_uvs_sync_power_levels: "{{ matrix_user_verification_service_enabled }}"
  3262. jitsi_prosody_auth_matrix_uvs_auth_token: "{{ matrix_user_verification_service_uvs_auth_token }}"
  3263. jitsi_prosody_auth_matrix_uvs_location: "{{ matrix_user_verification_service_container_url }}"
  3264. jitsi_self_check_validate_certificates: "{{ matrix_playbook_ssl_enabled }}"
  3265. # Gravatar is enabled by default upstream, but there's no need to leak data there needlessly
  3266. # when embedding Jitsi in Matrix rooms.
  3267. jitsi_disable_gravatar: true
  3268. ######################################################################
  3269. #
  3270. # /jitsi
  3271. #
  3272. ######################################################################
  3273. ########################################################################
  3274. # #
  3275. # exim-relay #
  3276. # #
  3277. ########################################################################
  3278. # We set up an Exim email relay by default.
  3279. # This is so that the homeserver and various other services can send emails through it.
  3280. # To completely disable this service, use: `exim_relay_enabled: false`
  3281. exim_relay_identifier: "matrix-exim-relay"
  3282. exim_relay_base_path: "{{ matrix_base_data_path }}/exim-relay"
  3283. exim_relay_uid: "{{ matrix_user_uid }}"
  3284. exim_relay_gid: "{{ matrix_user_gid }}"
  3285. exim_relay_hostname: "{{ matrix_server_fqn_matrix }}"
  3286. exim_relay_sender_address: "matrix@{{ exim_relay_hostname }}"
  3287. 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 }}"
  3288. exim_relay_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm32', 'arm64'] }}"
  3289. ########################################################################
  3290. # #
  3291. # /exim-relay #
  3292. # #
  3293. ########################################################################
  3294. ######################################################################
  3295. #
  3296. # matrix-media-repo
  3297. #
  3298. ######################################################################
  3299. matrix_media_repo_enabled: false
  3300. 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 }}"
  3301. matrix_media_repo_container_network: "{{ matrix_homeserver_container_network }}"
  3302. matrix_media_repo_container_additional_networks: |
  3303. {{
  3304. (
  3305. ([matrix_homeserver_container_network] if (matrix_media_repo_container_network != matrix_homeserver_container_network) else [])
  3306. +
  3307. ([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 [])
  3308. +
  3309. ([matrix_playbook_reverse_proxyable_services_additional_network] if (matrix_playbook_reverse_proxyable_services_additional_network and matrix_media_repo_container_labels_traefik_enabled) else [])
  3310. +
  3311. ([valkey_container_network] if valkey_enabled and matrix_media_repo_redis_enabled else [])
  3312. ) | unique
  3313. }}
  3314. matrix_media_repo_container_labels_traefik_enabled: "{{ matrix_playbook_traefik_labels_enabled }}"
  3315. matrix_media_repo_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  3316. matrix_media_repo_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  3317. matrix_media_repo_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  3318. matrix_media_repo_container_labels_traefik_internal_media_enabled: "{{ matrix_playbook_internal_matrix_client_api_traefik_entrypoint_enabled }}"
  3319. matrix_media_repo_container_labels_traefik_internal_media_entrypoints: "{{ matrix_playbook_internal_matrix_client_api_traefik_entrypoint_name }}"
  3320. matrix_media_repo_container_labels_traefik_internal_matrix_client_media_enabled: "{{ matrix_playbook_internal_matrix_client_api_traefik_entrypoint_enabled }}"
  3321. matrix_media_repo_container_labels_traefik_internal_matrix_client_media_entrypoints: "{{ matrix_playbook_internal_matrix_client_api_traefik_entrypoint_name }}"
  3322. matrix_media_repo_metrics_proxying_enabled: "{{ matrix_media_repo_metrics_enabled and matrix_metrics_exposure_enabled }}"
  3323. matrix_media_repo_metrics_proxying_hostname: "{{ matrix_metrics_exposure_hostname }}"
  3324. matrix_media_repo_metrics_proxying_path: "{{ matrix_metrics_exposure_path_prefix }}/matrix-media-repo"
  3325. matrix_media_repo_container_labels_traefik_metrics_middleware_basic_auth_enabled: "{{ matrix_metrics_exposure_http_basic_auth_enabled }}"
  3326. matrix_media_repo_container_labels_traefik_metrics_middleware_basic_auth_users: "{{ matrix_metrics_exposure_http_basic_auth_users }}"
  3327. matrix_media_repo_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  3328. matrix_media_repo_database_username: matrix_media_repo
  3329. matrix_media_repo_database_password: "{{ (matrix_homeserver_generic_secret_key + ':mediarepo.db') | hash('sha512') | to_uuid }}"
  3330. matrix_media_repo_database_name: matrix_media_repo
  3331. matrix_media_repo_systemd_required_services_list_auto: |
  3332. {{
  3333. matrix_addons_homeserver_systemd_services_list
  3334. +
  3335. ([postgres_identifier ~ '.service'] if postgres_enabled and matrix_media_repo_database_hostname == postgres_connection_hostname else [])
  3336. }}
  3337. matrix_media_repo_generate_signing_key: "{{ matrix_homeserver_implementation == 'synapse' or matrix_homeserver_implementation == 'dendrite'}}"
  3338. 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 '') }}"
  3339. matrix_media_repo_synapse_signing_key: "{{ matrix_synapse_config_dir_path }}/{{ matrix_server_fqn_matrix }}.signing.key"
  3340. matrix_media_repo_dendrite_signing_key: "{{ matrix_dendrite_config_dir_path }}/{{ matrix_server_fqn_matrix }}.signing.pem"
  3341. # Auto configured server setup by the playbook
  3342. matrix_media_repo_homeservers_auto:
  3343. - # Keep the dash from this line.
  3344. # This should match the server_name of your homeserver, and the Host header
  3345. # provided to the media repo.
  3346. name: "{{ matrix_domain }}"
  3347. # The base URL to where the homeserver can actually be reached by MMR.
  3348. csApi: "{{ matrix_homeserver_container_url }}"
  3349. # The number of consecutive failures in calling this homeserver before the
  3350. # media repository will start backing off. This defaults to 10 if not given.
  3351. backoffAt: 10
  3352. # The admin API interface supported by the homeserver. MMR uses a subset of the admin API
  3353. # during certain operations, like attempting to purge media from a room or validating server
  3354. # admin status. This should be set to one of "synapse", "dendrite", or "matrix". When set
  3355. # to "matrix", most functionality requiring the admin API will not work.
  3356. adminApiKind: "{{ 'synapse' if matrix_homeserver_implementation == 'synapse' else ('dendrite' if matrix_homeserver_implementation == 'dendrite' else 'matrix') }}"
  3357. # The signing key to use for authorizing outbound federation requests. If not specified,
  3358. # requests will not be authorized. See https://docs.t2bot.io/matrix-media-repo/v1.3.5/installation/signing-key/
  3359. # for details.
  3360. signingKeyPath: "{{ '/config/' + matrix_media_repo_identifier + '.signing.key' if matrix_media_repo_generate_signing_key else '' }}"
  3361. matrix_media_repo_homeserver_federation_enabled: "{{ matrix_homeserver_federation_enabled }}"
  3362. matrix_media_repo_redis_enabled: "{{ valkey_enabled }}"
  3363. # Use next redis index since Synapse is on 0. You can chose between index 0 and 15.
  3364. matrix_media_repo_redis_database_number: 1
  3365. matrix_media_repo_redis_shards: |
  3366. {{
  3367. ([{
  3368. 'name': 'valkey',
  3369. 'addr': (valkey_identifier + ':' + valkey_container_tcp_port | string),
  3370. }])
  3371. if valkey_enabled and matrix_media_repo_redis_enabled
  3372. else []
  3373. }}
  3374. ######################################################################
  3375. #
  3376. # /matrix-media-repo
  3377. #
  3378. ######################################################################
  3379. ########################################################################
  3380. # #
  3381. # postgres #
  3382. # #
  3383. ########################################################################
  3384. # To completely disable installing Postgres, use `postgres_enabled: false`.
  3385. postgres_identifier: matrix-postgres
  3386. postgres_architecture: "{{ matrix_architecture }}"
  3387. postgres_base_path: "{{ matrix_base_data_path }}/postgres"
  3388. postgres_uid: "{{ matrix_user_uid }}"
  3389. postgres_gid: "{{ matrix_user_gid }}"
  3390. 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 [] }}"
  3391. postgres_connection_username: matrix
  3392. postgres_db_name: matrix
  3393. postgres_systemd_services_to_stop_for_maintenance_list_auto: "{{ devture_systemd_service_manager_services_list_auto | map(attribute='name') | reject('equalto', (postgres_identifier + '.service')) }}"
  3394. # When Synapse workers are enabled, connection demand grows with the number of Synapse processes:
  3395. # each process (the main one and every worker) maintains its own connection pool of up to `matrix_synapse_database_cp_max` connections.
  3396. # The formula below reserves a 200-connection baseline for everything else talking to Postgres and adds `cp_max` per Synapse process.
  3397. # It never goes below 500, the fixed value used previously, so existing worker setups are not downsized.
  3398. # Note: the worker count reflects the `matrix_synapse_workers_*_count` variables.
  3399. # If you populate `matrix_synapse_workers_enabled_list` manually, consider overriding `postgres_max_connections` yourself.
  3400. postgres_max_connections: "{{ [200 + (matrix_synapse_database_cp_max | int) * ((matrix_synapse_workers_total_count | int) + 1), 500] | max if matrix_synapse_workers_enabled else 200 }}"
  3401. 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 }}"
  3402. 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 }}"
  3403. postgres_managed_databases_auto: |
  3404. {{
  3405. ([{
  3406. 'name': matrix_synapse_database_database,
  3407. 'username': matrix_synapse_database_user,
  3408. 'password': matrix_synapse_database_password,
  3409. }] if (matrix_synapse_enabled and matrix_playbook_synapse_uses_managed_postgres) else [])
  3410. +
  3411. ([{
  3412. 'name': matrix_dendrite_federation_api_database,
  3413. 'username': matrix_dendrite_database_user,
  3414. 'password': matrix_dendrite_database_password,
  3415. },{
  3416. 'name': matrix_dendrite_key_server_database,
  3417. 'username': matrix_dendrite_database_user,
  3418. 'password': matrix_dendrite_database_password,
  3419. },{
  3420. 'name': matrix_dendrite_media_api_database,
  3421. 'username': matrix_dendrite_database_user,
  3422. 'password': matrix_dendrite_database_password,
  3423. },{
  3424. 'name': matrix_dendrite_room_database,
  3425. 'username': matrix_dendrite_database_user,
  3426. 'password': matrix_dendrite_database_password,
  3427. },{
  3428. 'name': matrix_dendrite_sync_api_database,
  3429. 'username': matrix_dendrite_database_user,
  3430. 'password': matrix_dendrite_database_password,
  3431. },{
  3432. 'name': matrix_dendrite_user_api_database,
  3433. 'username': matrix_dendrite_database_user,
  3434. 'password': matrix_dendrite_database_password,
  3435. },{
  3436. 'name': matrix_dendrite_relay_api_database,
  3437. 'username': matrix_dendrite_database_user,
  3438. 'password': matrix_dendrite_database_password,
  3439. },{
  3440. 'name': matrix_dendrite_push_server_database,
  3441. 'username': matrix_dendrite_database_user,
  3442. 'password': matrix_dendrite_database_password,
  3443. },{
  3444. 'name': matrix_dendrite_mscs_database,
  3445. 'username': matrix_dendrite_database_user,
  3446. 'password': matrix_dendrite_database_password,
  3447. }] if (matrix_dendrite_enabled and matrix_dendrite_database_hostname == postgres_connection_hostname) else [])
  3448. +
  3449. ([{
  3450. 'name': matrix_authentication_service_config_database_database,
  3451. 'username': matrix_authentication_service_config_database_username,
  3452. 'password': matrix_authentication_service_config_database_password,
  3453. }] if (matrix_authentication_service_enabled and matrix_playbook_matrix_authentication_service_uses_managed_postgres) else [])
  3454. +
  3455. ([{
  3456. 'name': matrix_bot_matrix_reminder_bot_database_name,
  3457. 'username': matrix_bot_matrix_reminder_bot_database_username,
  3458. 'password': matrix_bot_matrix_reminder_bot_database_password,
  3459. }] 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 [])
  3460. +
  3461. ([{
  3462. 'name': matrix_bot_honoroit_database_name,
  3463. 'username': matrix_bot_honoroit_database_username,
  3464. 'password': matrix_bot_honoroit_database_password,
  3465. }] if (matrix_bot_honoroit_enabled and matrix_bot_honoroit_database_engine == 'postgres' and matrix_bot_honoroit_database_hostname == postgres_connection_hostname) else [])
  3466. +
  3467. ([{
  3468. 'name': matrix_bridge_postmoogle_database_name,
  3469. 'username': matrix_bridge_postmoogle_database_username,
  3470. 'password': matrix_bridge_postmoogle_database_password,
  3471. }] if (matrix_bridge_postmoogle_enabled and matrix_bridge_postmoogle_database_engine == 'postgres' and matrix_bridge_postmoogle_database_hostname == postgres_connection_hostname) else [])
  3472. +
  3473. ([{
  3474. 'name': matrix_bot_maubot_database_name,
  3475. 'username': matrix_bot_maubot_database_username,
  3476. 'password': matrix_bot_maubot_database_password,
  3477. }] if (matrix_bot_maubot_enabled and matrix_bot_maubot_database_engine == 'postgres' and matrix_bot_maubot_database_hostname == postgres_connection_hostname) else [])
  3478. +
  3479. ([{
  3480. 'name': matrix_bot_buscarron_database_name,
  3481. 'username': matrix_bot_buscarron_database_username,
  3482. 'password': matrix_bot_buscarron_database_password,
  3483. }] if (matrix_bot_buscarron_enabled and matrix_bot_buscarron_database_engine == 'postgres' and matrix_bot_buscarron_database_hostname == postgres_connection_hostname) else [])
  3484. +
  3485. ([{
  3486. 'name': matrix_bridge_appservice_discord_database_name,
  3487. 'username': matrix_bridge_appservice_discord_database_username,
  3488. 'password': matrix_bridge_appservice_discord_database_password,
  3489. }] if (matrix_bridge_appservice_discord_enabled and matrix_bridge_appservice_discord_database_engine == 'postgres' and matrix_bridge_appservice_discord_database_hostname == postgres_connection_hostname) else [])
  3490. +
  3491. ([{
  3492. 'name': matrix_appservice_draupnir_for_all_database_name,
  3493. 'username': matrix_appservice_draupnir_for_all_database_username,
  3494. 'password': matrix_appservice_draupnir_for_all_database_password,
  3495. }] if (matrix_appservice_draupnir_for_all_enabled and matrix_appservice_draupnir_for_all_database_hostname == postgres_connection_hostname) else [])
  3496. +
  3497. ([{
  3498. 'name': matrix_bot_meowlnir_database_name,
  3499. 'username': matrix_bot_meowlnir_database_username,
  3500. 'password': matrix_bot_meowlnir_database_password,
  3501. }] if (matrix_bot_meowlnir_enabled and matrix_bot_meowlnir_database_engine == 'postgres' and matrix_bot_meowlnir_database_hostname == postgres_connection_hostname) else [])
  3502. +
  3503. ([{
  3504. 'name': matrix_bridge_appservice_irc_database_name,
  3505. 'username': matrix_bridge_appservice_irc_database_username,
  3506. 'password': matrix_bridge_appservice_irc_database_password,
  3507. }] if (matrix_bridge_appservice_irc_enabled and matrix_bridge_appservice_irc_database_engine == 'postgres' and matrix_bridge_appservice_irc_database_hostname == postgres_connection_hostname) else [])
  3508. +
  3509. ([{
  3510. 'name': matrix_bridge_beeper_linkedin_database_name,
  3511. 'username': matrix_bridge_beeper_linkedin_database_username,
  3512. 'password': matrix_bridge_beeper_linkedin_database_password,
  3513. }] if (matrix_bridge_beeper_linkedin_enabled and matrix_bridge_beeper_linkedin_database_engine == 'postgres' and matrix_bridge_beeper_linkedin_database_hostname == postgres_connection_hostname) else [])
  3514. +
  3515. ([{
  3516. 'name': matrix_bridge_beeper_line_database_name,
  3517. 'username': matrix_bridge_beeper_line_database_username,
  3518. 'password': matrix_bridge_beeper_line_database_password,
  3519. }] if (matrix_bridge_beeper_line_enabled and matrix_bridge_beeper_line_database_engine == 'postgres' and matrix_bridge_beeper_line_database_hostname == postgres_connection_hostname) else [])
  3520. +
  3521. ([{
  3522. 'name': matrix_bridge_wechat_database_name,
  3523. 'username': matrix_bridge_wechat_database_username,
  3524. 'password': matrix_bridge_wechat_database_password,
  3525. }] if (matrix_bridge_wechat_enabled and matrix_bridge_wechat_database_engine == 'postgres' and matrix_bridge_wechat_database_hostname == postgres_connection_hostname) else [])
  3526. +
  3527. ([{
  3528. 'name': matrix_bridge_mautrix_bluesky_database_name,
  3529. 'username': matrix_bridge_mautrix_bluesky_database_username,
  3530. 'password': matrix_bridge_mautrix_bluesky_database_password,
  3531. }] if (matrix_bridge_mautrix_bluesky_enabled and matrix_bridge_mautrix_bluesky_database_engine == 'postgres' and matrix_bridge_mautrix_bluesky_database_hostname == postgres_connection_hostname) else [])
  3532. +
  3533. ([{
  3534. 'name': matrix_bridge_rustpush_database_name,
  3535. 'username': matrix_bridge_rustpush_database_username,
  3536. 'password': matrix_bridge_rustpush_database_password,
  3537. }] if (matrix_bridge_rustpush_enabled and matrix_bridge_rustpush_database_engine == 'postgres' and matrix_bridge_rustpush_database_hostname == postgres_connection_hostname) else [])
  3538. +
  3539. ([{
  3540. 'name': matrix_bridge_mautrix_googlechat_database_name,
  3541. 'username': matrix_bridge_mautrix_googlechat_database_username,
  3542. 'password': matrix_bridge_mautrix_googlechat_database_password,
  3543. }] if (matrix_bridge_mautrix_googlechat_enabled and matrix_bridge_mautrix_googlechat_database_engine == 'postgres' and matrix_bridge_mautrix_googlechat_database_hostname == postgres_connection_hostname) else [])
  3544. +
  3545. ([{
  3546. 'name': matrix_bridge_mautrix_signal_database_name,
  3547. 'username': matrix_bridge_mautrix_signal_database_username,
  3548. 'password': matrix_bridge_mautrix_signal_database_password,
  3549. }] if (matrix_bridge_mautrix_signal_enabled and matrix_bridge_mautrix_signal_database_engine == 'postgres' and matrix_bridge_mautrix_signal_database_hostname == postgres_connection_hostname) else [])
  3550. +
  3551. ([{
  3552. 'name': matrix_bridge_mautrix_meta_messenger_database_name,
  3553. 'username': matrix_bridge_mautrix_meta_messenger_database_username,
  3554. 'password': matrix_bridge_mautrix_meta_messenger_database_password,
  3555. }] if (matrix_bridge_mautrix_meta_messenger_enabled and matrix_bridge_mautrix_meta_messenger_database_engine == 'postgres' and matrix_bridge_mautrix_meta_messenger_database_hostname == postgres_connection_hostname) else [])
  3556. +
  3557. ([{
  3558. 'name': matrix_bridge_mautrix_meta_instagram_database_name,
  3559. 'username': matrix_bridge_mautrix_meta_instagram_database_username,
  3560. 'password': matrix_bridge_mautrix_meta_instagram_database_password,
  3561. }] if (matrix_bridge_mautrix_meta_instagram_enabled and matrix_bridge_mautrix_meta_instagram_database_engine == 'postgres' and matrix_bridge_mautrix_meta_instagram_database_hostname == postgres_connection_hostname) else [])
  3562. +
  3563. ([{
  3564. 'name': matrix_bridge_mautrix_wsproxy_syncproxy_database_name,
  3565. 'username': matrix_bridge_mautrix_wsproxy_syncproxy_database_username,
  3566. 'password': matrix_bridge_mautrix_wsproxy_syncproxy_database_password,
  3567. }] if (matrix_bridge_mautrix_wsproxy_enabled and matrix_bridge_mautrix_wsproxy_syncproxy_database_engine == 'postgres' and matrix_bridge_mautrix_wsproxy_syncproxy_database_hostname == 'matrix-postgres') else [])
  3568. +
  3569. ([{
  3570. 'name': matrix_bridge_mautrix_telegram_database_name,
  3571. 'username': matrix_bridge_mautrix_telegram_database_username,
  3572. 'password': matrix_bridge_mautrix_telegram_database_password,
  3573. }] if (matrix_bridge_mautrix_telegram_enabled and matrix_bridge_mautrix_telegram_database_engine == 'postgres' and matrix_bridge_mautrix_telegram_database_hostname == postgres_connection_hostname) else [])
  3574. +
  3575. ([{
  3576. 'name': matrix_bridge_mautrix_twitter_database_name,
  3577. 'username': matrix_bridge_mautrix_twitter_database_username,
  3578. 'password': matrix_bridge_mautrix_twitter_database_password,
  3579. }] if (matrix_bridge_mautrix_twitter_enabled and matrix_bridge_mautrix_twitter_database_engine == 'postgres' and matrix_bridge_mautrix_twitter_database_hostname == postgres_connection_hostname) else [])
  3580. +
  3581. ([{
  3582. 'name': matrix_bridge_mautrix_gmessages_database_name,
  3583. 'username': matrix_bridge_mautrix_gmessages_database_username,
  3584. 'password': matrix_bridge_mautrix_gmessages_database_password,
  3585. }] if (matrix_bridge_mautrix_gmessages_enabled and matrix_bridge_mautrix_gmessages_database_engine == 'postgres' and matrix_bridge_mautrix_gmessages_database_hostname == postgres_connection_hostname) else [])
  3586. +
  3587. ([{
  3588. 'name': matrix_bridge_mautrix_gvoice_database_name,
  3589. 'username': matrix_bridge_mautrix_gvoice_database_username,
  3590. 'password': matrix_bridge_mautrix_gvoice_database_password,
  3591. }] if (matrix_bridge_mautrix_gvoice_enabled and matrix_bridge_mautrix_gvoice_database_engine == 'postgres' and matrix_bridge_mautrix_gvoice_database_hostname == postgres_connection_hostname) else [])
  3592. +
  3593. ([{
  3594. 'name': matrix_bridge_mautrix_linkedin_database_name,
  3595. 'username': matrix_bridge_mautrix_linkedin_database_username,
  3596. 'password': matrix_bridge_mautrix_linkedin_database_password,
  3597. }] if (matrix_bridge_mautrix_linkedin_enabled and matrix_bridge_mautrix_linkedin_database_engine == 'postgres' and matrix_bridge_mautrix_linkedin_database_hostname == postgres_connection_hostname) else [])
  3598. +
  3599. ([{
  3600. 'name': matrix_bridge_mautrix_whatsapp_database_name,
  3601. 'username': matrix_bridge_mautrix_whatsapp_database_username,
  3602. 'password': matrix_bridge_mautrix_whatsapp_database_password,
  3603. }] if (matrix_bridge_mautrix_whatsapp_enabled and matrix_bridge_mautrix_whatsapp_database_engine == 'postgres' and matrix_bridge_mautrix_whatsapp_database_hostname == postgres_connection_hostname) else [])
  3604. +
  3605. ([{
  3606. 'name': matrix_bridge_mautrix_discord_database_name,
  3607. 'username': matrix_bridge_mautrix_discord_database_username,
  3608. 'password': matrix_bridge_mautrix_discord_database_password,
  3609. }] if (matrix_bridge_mautrix_discord_enabled and matrix_bridge_mautrix_discord_database_engine == 'postgres' and matrix_bridge_mautrix_discord_database_hostname == postgres_connection_hostname) else [])
  3610. +
  3611. ([{
  3612. 'name': matrix_bridge_mautrix_slack_database_name,
  3613. 'username': matrix_bridge_mautrix_slack_database_username,
  3614. 'password': matrix_bridge_mautrix_slack_database_password,
  3615. }] if (matrix_bridge_mautrix_slack_enabled and matrix_bridge_mautrix_slack_database_engine == 'postgres' and matrix_bridge_mautrix_slack_database_hostname == postgres_connection_hostname) else [])
  3616. +
  3617. ([{
  3618. 'name': matrix_bridge_mx_puppet_steam_database_name,
  3619. 'username': matrix_bridge_mx_puppet_steam_database_username,
  3620. 'password': matrix_bridge_mx_puppet_steam_database_password,
  3621. }] if (matrix_bridge_mx_puppet_steam_enabled and matrix_bridge_mx_puppet_steam_database_engine == 'postgres' and matrix_bridge_mx_puppet_steam_database_hostname == postgres_connection_hostname) else [])
  3622. +
  3623. ([{
  3624. 'name': matrix_bridge_mx_puppet_groupme_database_name,
  3625. 'username': matrix_bridge_mx_puppet_groupme_database_username,
  3626. 'password': matrix_bridge_mx_puppet_groupme_database_password,
  3627. }] if (matrix_bridge_mx_puppet_groupme_enabled and matrix_bridge_mx_puppet_groupme_database_engine == 'postgres' and matrix_bridge_mx_puppet_groupme_database_hostname == postgres_connection_hostname) else [])
  3628. +
  3629. ([{
  3630. 'name': matrix_bridge_steam_database_name,
  3631. 'username': matrix_bridge_steam_database_username,
  3632. 'password': matrix_bridge_steam_database_password,
  3633. }] if (matrix_bridge_steam_enabled and matrix_bridge_steam_database_engine == 'postgres' and matrix_bridge_steam_database_hostname == postgres_connection_hostname) else [])
  3634. +
  3635. ([{
  3636. 'name': etherpad_database_name,
  3637. 'username': etherpad_database_postgres_username,
  3638. 'password': etherpad_database_postgres_password,
  3639. }] if (etherpad_enabled and etherpad_database_type == 'postgres' and etherpad_database_postgres_hostname == postgres_connection_hostname) else [])
  3640. +
  3641. ([{
  3642. 'name': prometheus_postgres_exporter_database_name,
  3643. 'username': prometheus_postgres_exporter_database_username,
  3644. 'password': prometheus_postgres_exporter_database_password,
  3645. 'additional_sql_queries': ['GRANT pg_monitor TO "' + prometheus_postgres_exporter_database_username + '";'],
  3646. }] if (prometheus_postgres_exporter_enabled and prometheus_postgres_exporter_database_hostname == postgres_connection_hostname) else [])
  3647. +
  3648. ([{
  3649. 'name': matrix_media_repo_database_name,
  3650. 'username': matrix_media_repo_database_username,
  3651. 'password': matrix_media_repo_database_password,
  3652. }] if (matrix_media_repo_enabled and matrix_media_repo_database_hostname == postgres_connection_hostname) else [])
  3653. }}
  3654. ########################################################################
  3655. # #
  3656. # /postgres #
  3657. # #
  3658. ########################################################################
  3659. ########################################################################
  3660. # #
  3661. # postgres_backup #
  3662. # #
  3663. ########################################################################
  3664. postgres_backup_enabled: false
  3665. postgres_backup_identifier: matrix-postgres-backup
  3666. postgres_backup_architecture: "{{ matrix_architecture }}"
  3667. postgres_backup_base_path: "{{ matrix_base_data_path }}/postgres-backup"
  3668. postgres_backup_systemd_required_services_list_auto: |
  3669. {{
  3670. ([(postgres_identifier + '.service')] if (postgres_enabled and postgres_backup_connection_hostname == postgres_connection_hostname) else [])
  3671. }}
  3672. 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 }}"
  3673. postgres_backup_container_network: "{{ (postgres_container_network if (postgres_enabled and postgres_backup_connection_hostname == postgres_connection_hostname) else postgres_backup_identifier) }}"
  3674. postgres_backup_container_additional_networks_auto: |-
  3675. {{
  3676. ([postgres_container_network] if (postgres_enabled and postgres_backup_connection_hostname == postgres_connection_hostname and postgres_backup_container_network != postgres_container_network) else [])
  3677. }}
  3678. postgres_backup_uid: "{{ matrix_user_uid }}"
  3679. postgres_backup_gid: "{{ matrix_user_gid }}"
  3680. postgres_backup_connection_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  3681. postgres_backup_connection_port: "{{ postgres_connection_port if postgres_enabled else 5432 }}"
  3682. postgres_backup_connection_username: "{{ postgres_connection_username if postgres_enabled else '' }}"
  3683. postgres_backup_connection_password: "{{ postgres_connection_password if postgres_enabled else '' }}"
  3684. postgres_backup_postgres_data_path: "{{ postgres_data_path if postgres_enabled else '' }}"
  3685. postgres_backup_postgres_role_include_name: galaxy/postgres
  3686. postgres_backup_databases_auto: "{{ postgres_managed_databases | map(attribute='name') if postgres_enabled else [] }}"
  3687. ########################################################################
  3688. # #
  3689. # /postgres_backup #
  3690. # #
  3691. ########################################################################
  3692. ######################################################################
  3693. #
  3694. # matrix-sygnal
  3695. #
  3696. ######################################################################
  3697. # Most people don't need their own push-server, because they also need their own app to utilize it from.
  3698. matrix_sygnal_enabled: false
  3699. matrix_sygnal_metrics_prometheus_enabled: "{{ prometheus_enabled or matrix_metrics_exposure_enabled }}"
  3700. matrix_sygnal_hostname: "{{ matrix_server_fqn_sygnal }}"
  3701. 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 }}"
  3702. matrix_sygnal_container_network: "{{ matrix_homeserver_container_network }}"
  3703. matrix_sygnal_container_additional_networks: "{{ [matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network else [] }}"
  3704. matrix_sygnal_container_http_host_bind_port: "{{ (matrix_playbook_service_host_bind_interface_prefix ~ '6000') if matrix_playbook_service_host_bind_interface_prefix else '' }}"
  3705. matrix_sygnal_container_labels_traefik_enabled: "{{ matrix_playbook_traefik_labels_enabled }}"
  3706. matrix_sygnal_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  3707. matrix_sygnal_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  3708. matrix_sygnal_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  3709. ######################################################################
  3710. #
  3711. # /matrix-sygnal
  3712. #
  3713. ######################################################################
  3714. ######################################################################
  3715. #
  3716. # ntfy
  3717. #
  3718. ######################################################################
  3719. ntfy_enabled: false
  3720. ntfy_identifier: matrix-ntfy
  3721. ntfy_base_path: "{{ matrix_base_data_path }}/ntfy"
  3722. ntfy_uid: "{{ matrix_user_uid }}"
  3723. ntfy_gid: "{{ matrix_user_gid }}"
  3724. ntfy_hostname: "{{ matrix_server_fqn_ntfy }}"
  3725. 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 }}"
  3726. ntfy_container_additional_networks_auto: "{{ [matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network else [] }}"
  3727. ntfy_container_http_host_bind_port: "{{ (matrix_playbook_service_host_bind_interface_prefix ~ '2586') if matrix_playbook_service_host_bind_interface_prefix else '' }}"
  3728. ntfy_container_labels_traefik_enabled: "{{ matrix_playbook_traefik_labels_enabled }}"
  3729. ntfy_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  3730. ntfy_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  3731. ntfy_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  3732. # We have ntfy serve its metrics endpoint on a dedicated port, instead of on the regular HTTP port.
  3733. # Were it served on the regular HTTP port, the endpoint would also become reachable at `https://ntfy.example.com/metrics`.
  3734. # Nothing protects it there, because ntfy does not apply its own access-control rules to the metrics endpoint.
  3735. ntfy_metrics_listen_http_port: "{{ 9090 if (prometheus_enabled or matrix_metrics_exposure_enabled) else '' }}"
  3736. ntfy_container_labels_traefik_metrics_enabled: "{{ matrix_metrics_exposure_enabled }}"
  3737. # For consistency with other things hosted at the Matrix FQN, we adjust the metrics endpoint
  3738. # so that metrics would be served at something like `/metrics/SERVICE_NAME`, and not at the default path for the role (`/metrics`).
  3739. ntfy_container_labels_traefik_metrics_hostname: "{{ matrix_server_fqn_matrix }}"
  3740. ntfy_container_labels_traefik_metrics_path_prefix: "{{ matrix_metrics_exposure_path_prefix }}/ntfy"
  3741. ntfy_container_labels_traefik_metrics_middleware_basic_auth_enabled: "{{ matrix_metrics_exposure_http_basic_auth_enabled }}"
  3742. ntfy_container_labels_traefik_metrics_middleware_basic_auth_users: "{{ matrix_metrics_exposure_http_basic_auth_users }}"
  3743. ntfy_visitor_request_limit_exempt_hosts_hostnames_auto: |
  3744. {{
  3745. [matrix_server_fqn_matrix]
  3746. }}
  3747. ######################################################################
  3748. #
  3749. # /ntfy
  3750. #
  3751. ######################################################################
  3752. ######################################################################
  3753. #
  3754. # valkey
  3755. #
  3756. ######################################################################
  3757. valkey_enabled: "{{ matrix_synapse_workers_enabled or (matrix_bridge_hookshot_enabled and matrix_bridge_hookshot_encryption_enabled) }}"
  3758. valkey_identifier: matrix-valkey
  3759. valkey_uid: "{{ matrix_user_uid }}"
  3760. valkey_gid: "{{ matrix_user_gid }}"
  3761. valkey_base_path: "{{ matrix_base_data_path }}/valkey"
  3762. valkey_arch: "{{ matrix_architecture }}"
  3763. 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 }}"
  3764. ######################################################################
  3765. #
  3766. # valkey
  3767. #
  3768. ######################################################################
  3769. ######################################################################
  3770. #
  3771. # matrix-client-element
  3772. #
  3773. ######################################################################
  3774. # By default, this playbook installs the Element Web on the `matrix_server_fqn_element` domain.
  3775. # If you wish to connect to your Matrix server by other means, you may wish to disable this.
  3776. matrix_client_element_enabled: true
  3777. matrix_client_element_scheme: "{{ 'https' if matrix_playbook_ssl_enabled else 'http' }}"
  3778. 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 }}"
  3779. matrix_client_element_container_image_self_build: "{{ matrix_architecture not in ['arm64', 'amd64'] }}"
  3780. 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 '' }}"
  3781. matrix_client_element_container_network: "{{ matrix_addons_container_network }}"
  3782. 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 [] }}"
  3783. matrix_client_element_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  3784. matrix_client_element_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  3785. matrix_client_element_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  3786. matrix_client_element_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  3787. matrix_client_element_container_labels_traefik_compression_middleware_enabled: "{{ matrix_playbook_reverse_proxy_traefik_middleware_compression_enabled }}"
  3788. 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 '' }}"
  3789. matrix_client_element_default_hs_url: "{{ matrix_homeserver_url }}"
  3790. matrix_client_element_default_is_url: "{{ matrix_identity_server_url }}"
  3791. matrix_client_element_self_check_validate_certificates: "{{ matrix_playbook_ssl_enabled }}"
  3792. matrix_client_element_registration_enabled: "{{ matrix_synapse_enable_registration }}"
  3793. matrix_client_element_enable_presence_by_hs_url: |-
  3794. {{
  3795. none
  3796. if matrix_synapse_presence_enabled
  3797. else {matrix_client_element_default_hs_url: false}
  3798. }}
  3799. matrix_client_element_jitsi_preferred_domain: "{{ matrix_server_fqn_jitsi if jitsi_enabled else '' }}"
  3800. matrix_client_element_features_feature_video_rooms: "{{ matrix_rtc_enabled }}"
  3801. matrix_client_element_features_feature_group_calls: "{{ matrix_rtc_enabled }}"
  3802. matrix_client_element_features_feature_element_call_video_rooms: "{{ matrix_rtc_enabled }}"
  3803. matrix_client_element_features_feature_oidc_native_flow: "{{ matrix_authentication_service_enabled }}"
  3804. matrix_client_element_element_call_enabled: "{{ matrix_element_call_enabled }}"
  3805. matrix_client_element_element_call_url: "{{ matrix_element_call_public_url if matrix_element_call_enabled else '' }}"
  3806. ######################################################################
  3807. #
  3808. # /matrix-client-element
  3809. #
  3810. ######################################################################
  3811. ######################################################################
  3812. #
  3813. # matrix-client-commet
  3814. #
  3815. ######################################################################
  3816. matrix_client_commet_enabled: false
  3817. matrix_client_commet_hostname: "commet.{{ matrix_domain }}"
  3818. 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 '' }}"
  3819. matrix_client_commet_container_network: "{{ matrix_addons_container_network }}"
  3820. 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 [] }}"
  3821. matrix_client_commet_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  3822. matrix_client_commet_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  3823. matrix_client_commet_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  3824. matrix_client_commet_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  3825. matrix_client_commet_container_labels_traefik_compression_middleware_enabled: "{{ matrix_playbook_reverse_proxy_traefik_middleware_compression_enabled }}"
  3826. 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 '' }}"
  3827. ######################################################################
  3828. #
  3829. # /matrix-client-commet
  3830. #
  3831. ######################################################################
  3832. ######################################################################
  3833. #
  3834. # hydrogen
  3835. #
  3836. ######################################################################
  3837. hydrogen_enabled: false
  3838. hydrogen_identifier: matrix-client-hydrogen
  3839. hydrogen_uid: "{{ matrix_user_uid }}"
  3840. hydrogen_gid: "{{ matrix_user_gid }}"
  3841. hydrogen_container_image_registry_prefix: "{{ 'localhost/' if hydrogen_container_image_self_build else hydrogen_container_image_registry_prefix_upstream }}"
  3842. 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 }}"
  3843. hydrogen_container_image_self_build: "{{ matrix_architecture not in ['arm64', 'amd64'] }}"
  3844. hydrogen_container_http_host_bind_port: "{{ (matrix_playbook_service_host_bind_interface_prefix ~ '8768') if matrix_playbook_service_host_bind_interface_prefix else '' }}"
  3845. hydrogen_container_network: "{{ matrix_addons_container_network }}"
  3846. 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 [] }}"
  3847. hydrogen_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  3848. hydrogen_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  3849. hydrogen_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  3850. hydrogen_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  3851. hydrogen_container_labels_traefik_compression_middleware_enabled: "{{ matrix_playbook_reverse_proxy_traefik_middleware_compression_enabled }}"
  3852. 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 '' }}"
  3853. hydrogen_scheme: "{{ 'https' if matrix_playbook_ssl_enabled else 'http' }}"
  3854. hydrogen_default_hs_url: "{{ matrix_homeserver_url }}"
  3855. hydrogen_self_check_validate_certificates: "{{ matrix_playbook_ssl_enabled }}"
  3856. hydrogen_base_path: "{{ matrix_base_data_path }}/client-hydrogen"
  3857. hydrogen_hostname: "{{ matrix_server_fqn_hydrogen }}"
  3858. ######################################################################
  3859. #
  3860. # /hydrogen
  3861. #
  3862. ######################################################################
  3863. ######################################################################
  3864. #
  3865. # cinny
  3866. #
  3867. ######################################################################
  3868. cinny_enabled: false
  3869. cinny_identifier: matrix-client-cinny
  3870. cinny_uid: "{{ matrix_user_uid }}"
  3871. cinny_gid: "{{ matrix_user_gid }}"
  3872. cinny_container_image_registry_prefix: "{{ 'localhost/' if cinny_container_image_self_build else cinny_container_image_registry_prefix_upstream }}"
  3873. 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 }}"
  3874. cinny_container_image_self_build: "{{ matrix_architecture not in ['arm64', 'amd64'] }}"
  3875. cinny_container_http_host_bind_port: "{{ (matrix_playbook_service_host_bind_interface_prefix ~ '8080') if matrix_playbook_service_host_bind_interface_prefix else '' }}"
  3876. cinny_container_network: "{{ matrix_addons_container_network }}"
  3877. 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 [] }}"
  3878. cinny_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  3879. cinny_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  3880. cinny_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  3881. cinny_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  3882. cinny_container_labels_traefik_compression_middleware_enabled: "{{ matrix_playbook_reverse_proxy_traefik_middleware_compression_enabled }}"
  3883. 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 '' }}"
  3884. cinny_scheme: "{{ 'https' if matrix_playbook_ssl_enabled else 'http' }}"
  3885. cinny_default_hs_url: "{{ matrix_homeserver_url }}"
  3886. cinny_self_check_validate_certificates: "{{ matrix_playbook_ssl_enabled }}"
  3887. cinny_base_path: "{{ matrix_base_data_path }}/client-cinny"
  3888. cinny_hostname: "{{ matrix_server_fqn_cinny }}"
  3889. ######################################################################
  3890. #
  3891. # /cinny
  3892. #
  3893. ######################################################################
  3894. ######################################################################
  3895. #
  3896. # sable
  3897. #
  3898. ######################################################################
  3899. sable_enabled: false
  3900. sable_identifier: matrix-client-sable
  3901. sable_uid: "{{ matrix_user_uid }}"
  3902. sable_gid: "{{ matrix_user_gid }}"
  3903. sable_container_image_registry_prefix: "{{ 'localhost/' if sable_container_image_self_build else sable_container_image_registry_prefix_upstream }}"
  3904. 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 }}"
  3905. sable_container_image_self_build: "{{ matrix_architecture not in ['arm64', 'amd64'] }}"
  3906. sable_container_http_host_bind_port: "{{ (matrix_playbook_service_host_bind_interface_prefix ~ '8771') if matrix_playbook_service_host_bind_interface_prefix else '' }}"
  3907. sable_container_network: "{{ matrix_addons_container_network }}"
  3908. 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 [] }}"
  3909. sable_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  3910. sable_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  3911. sable_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  3912. sable_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  3913. sable_container_labels_traefik_compression_middleware_enabled: "{{ matrix_playbook_reverse_proxy_traefik_middleware_compression_enabled }}"
  3914. 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 '' }}"
  3915. sable_scheme: "{{ 'https' if matrix_playbook_ssl_enabled else 'http' }}"
  3916. sable_default_hs_url: "{{ matrix_homeserver_url }}"
  3917. sable_self_check_validate_certificates: "{{ matrix_playbook_ssl_enabled }}"
  3918. sable_base_path: "{{ matrix_base_data_path }}/client-sable"
  3919. sable_hostname: "{{ matrix_server_fqn_sable }}"
  3920. ######################################################################
  3921. #
  3922. # /sable
  3923. #
  3924. ######################################################################
  3925. ######################################################################
  3926. #
  3927. # matrix-client-schildichat
  3928. #
  3929. ######################################################################
  3930. matrix_client_schildichat_enabled: false
  3931. matrix_client_schildichat_scheme: "{{ 'https' if matrix_playbook_ssl_enabled else 'http' }}"
  3932. 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 }}"
  3933. matrix_client_schildichat_container_image_self_build: "{{ matrix_architecture not in ['arm64', 'amd64'] }}"
  3934. 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 '' }}"
  3935. matrix_client_schildichat_container_network: "{{ matrix_addons_container_network }}"
  3936. 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 [] }}"
  3937. matrix_client_schildichat_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  3938. matrix_client_schildichat_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  3939. matrix_client_schildichat_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  3940. matrix_client_schildichat_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  3941. matrix_client_schildichat_default_hs_url: "{{ matrix_homeserver_url }}"
  3942. matrix_client_schildichat_default_is_url: "{{ matrix_identity_server_url }}"
  3943. matrix_client_schildichat_self_check_validate_certificates: "{{ matrix_playbook_ssl_enabled }}"
  3944. matrix_client_schildichat_registration_enabled: "{{ matrix_synapse_enable_registration }}"
  3945. matrix_client_schildichat_enable_presence_by_hs_url: |-
  3946. {{
  3947. none
  3948. if matrix_synapse_presence_enabled
  3949. else {matrix_client_schildichat_default_hs_url: false}
  3950. }}
  3951. matrix_client_schildichat_jitsi_preferred_domain: "{{ matrix_server_fqn_jitsi if jitsi_enabled else '' }}"
  3952. ######################################################################
  3953. #
  3954. # /matrix-client-schildichat
  3955. #
  3956. ######################################################################
  3957. ######################################################################
  3958. #
  3959. # matrix-client-fluffychat
  3960. #
  3961. ######################################################################
  3962. matrix_client_fluffychat_enabled: false
  3963. matrix_client_fluffychat_scheme: "{{ 'https' if matrix_playbook_ssl_enabled else 'http' }}"
  3964. 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 }}"
  3965. matrix_client_fluffychat_container_image_self_build: "{{ matrix_architecture not in ['arm64', 'amd64'] }}"
  3966. 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 '' }}"
  3967. matrix_client_fluffychat_container_network: "{{ matrix_addons_container_network }}"
  3968. 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 [] }}"
  3969. matrix_client_fluffychat_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  3970. matrix_client_fluffychat_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  3971. matrix_client_fluffychat_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  3972. matrix_client_fluffychat_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  3973. matrix_client_fluffychat_self_check_validate_certificates: "{{ matrix_playbook_ssl_enabled }}"
  3974. matrix_client_fluffychat_config_defaultHomeserver: "{{ matrix_domain }}"
  3975. ######################################################################
  3976. #
  3977. # /matrix-client-fluffychat
  3978. #
  3979. ######################################################################
  3980. ######################################################################
  3981. #
  3982. # matrix-synapse
  3983. #
  3984. ######################################################################
  3985. matrix_synapse_enabled: "{{ matrix_homeserver_implementation == 'synapse' }}"
  3986. matrix_synapse_username: "{{ matrix_user_name }}"
  3987. matrix_synapse_uid: "{{ matrix_user_uid }}"
  3988. matrix_synapse_gid: "{{ matrix_user_gid }}"
  3989. matrix_synapse_federation_enabled: "{{ matrix_homeserver_federation_enabled }}"
  3990. 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 }}"
  3991. 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 }}"
  3992. 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 }}"
  3993. matrix_synapse_container_image_self_build: "{{ matrix_architecture not in ['arm64', 'amd64'] }}"
  3994. # For exposing the Matrix Federation API's TLS port (HTTPS) to the internet on all network interfaces.
  3995. 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 '' }}"
  3996. #
  3997. # For exposing the Synapse Metrics API's port (plain HTTP) to the local host.
  3998. 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 '' }}"
  3999. #
  4000. # For exposing the Synapse Manhole port (plain HTTP) to the local host.
  4001. 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 '' }}"
  4002. matrix_synapse_container_network: "{{ matrix_homeserver_container_network }}"
  4003. matrix_synapse_container_additional_networks_auto: |
  4004. {{
  4005. (
  4006. ([matrix_playbook_reverse_proxyable_services_additional_network] if matrix_synapse_container_labels_traefik_enabled and matrix_playbook_reverse_proxyable_services_additional_network else [])
  4007. +
  4008. ([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 [])
  4009. +
  4010. ([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 [])
  4011. +
  4012. ([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 [])
  4013. +
  4014. ([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 [])
  4015. ) | unique
  4016. }}
  4017. matrix_synapse_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  4018. matrix_synapse_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  4019. matrix_synapse_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  4020. matrix_synapse_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  4021. matrix_synapse_container_labels_traefik_hostname: "{{ matrix_server_fqn_matrix }}"
  4022. matrix_synapse_container_labels_traefik_compression_middleware_enabled: "{{ matrix_playbook_reverse_proxy_traefik_middleware_compression_enabled }}"
  4023. 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 '' }}"
  4024. matrix_synapse_container_labels_matrix_labels_enabled: "{{ not matrix_synapse_workers_enabled }}"
  4025. matrix_synapse_container_labels_public_client_root_redirection_enabled: "{{ matrix_synapse_container_labels_public_client_root_redirection_url != '' }}"
  4026. 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 '' }}"
  4027. matrix_synapse_container_labels_public_client_synapse_admin_api_enabled: "{{ matrix_ketesa_enabled or matrix_element_admin_enabled }}"
  4028. matrix_synapse_container_labels_internal_client_synapse_admin_api_enabled: "{{ (matrix_bot_draupnir_enabled and matrix_bot_draupnir_admin_api_enabled) }}"
  4029. matrix_synapse_container_labels_internal_client_synapse_admin_api_traefik_entrypoints: "{{ matrix_playbook_internal_matrix_client_api_traefik_entrypoint_name }}"
  4030. matrix_synapse_container_labels_public_federation_api_traefik_hostname: "{{ matrix_server_fqn_matrix_federation }}"
  4031. matrix_synapse_container_labels_public_federation_api_traefik_entrypoints: "{{ matrix_federation_traefik_entrypoint_name }}"
  4032. matrix_synapse_container_labels_public_federation_api_traefik_tls: "{{ matrix_federation_traefik_entrypoint_tls }}"
  4033. matrix_synapse_container_labels_public_metrics_middleware_basic_auth_enabled: "{{ matrix_metrics_exposure_http_basic_auth_enabled }}"
  4034. matrix_synapse_container_labels_public_metrics_middleware_basic_auth_users: "{{ matrix_metrics_exposure_http_basic_auth_users }}"
  4035. matrix_synapse_container_labels_internal_client_api_enabled: "{{ matrix_playbook_internal_matrix_client_api_traefik_entrypoint_enabled }}"
  4036. matrix_synapse_container_labels_internal_client_api_traefik_entrypoints: "{{ matrix_playbook_internal_matrix_client_api_traefik_entrypoint_name }}"
  4037. # Playbook-level Synapse topology wiring helpers.
  4038. matrix_playbook_synapse_uses_managed_postgres: "{{ postgres_enabled }}"
  4039. matrix_playbook_synapse_uses_managed_valkey: "{{ matrix_synapse_redis_enabled and valkey_enabled }}"
  4040. 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 }}"
  4041. # For exposing the Synapse worker (and metrics) ports to the local host.
  4042. 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 '' }}"
  4043. matrix_synapse_database_host: "{{ postgres_connection_hostname if matrix_playbook_synapse_uses_managed_postgres else '' }}"
  4044. matrix_synapse_database_password: "{{ (matrix_homeserver_generic_secret_key + ':synapse.db') | hash('sha512') | to_uuid }}"
  4045. # unix socket connection
  4046. matrix_synapse_database_socket_enabled: "{{ matrix_playbook_synapse_uses_managed_postgres and postgres_container_unix_socket_enabled }}"
  4047. # path to the Postgres socket's parent dir inside the Synapse container
  4048. matrix_synapse_database_socket_path: "{{ '/run-postgres' if matrix_playbook_synapse_uses_managed_postgres else '' }}"
  4049. # path to the Postgres socket on the host, using Postgres
  4050. matrix_synapse_database_socket_path_host: "{{ postgres_run_path if matrix_playbook_synapse_uses_managed_postgres else '' }}"
  4051. matrix_synapse_macaroon_secret_key: "{{ (matrix_homeserver_generic_secret_key + ':synapse.mac') | hash('sha512') | to_uuid }}"
  4052. # We do not enable TLS in Synapse by default, since it's handled by Traefik.
  4053. matrix_synapse_tls_federation_listener_enabled: false
  4054. matrix_synapse_tls_certificate_path: ~
  4055. matrix_synapse_tls_private_key_path: ~
  4056. matrix_synapse_federation_port_openid_resource_required: "{{ not matrix_synapse_federation_enabled and (matrix_user_verification_service_enabled or matrix_livekit_jwt_service_enabled) }}"
  4057. matrix_synapse_metrics_enabled: "{{ prometheus_enabled or matrix_metrics_exposure_enabled }}"
  4058. matrix_synapse_metrics_proxying_enabled: "{{ matrix_synapse_metrics_enabled and matrix_metrics_exposure_enabled }}"
  4059. matrix_synapse_metrics_proxying_hostname: "{{ matrix_metrics_exposure_hostname }}"
  4060. matrix_synapse_metrics_proxying_path_prefix: "{{ matrix_metrics_exposure_path_prefix }}/synapse"
  4061. matrix_synapse_email_enabled: "{{ exim_relay_enabled }}"
  4062. matrix_synapse_email_smtp_host: "{{ exim_relay_identifier }}"
  4063. matrix_synapse_email_smtp_port: 8025
  4064. matrix_synapse_email_notif_from: "Matrix <{{ exim_relay_sender_address }}>"
  4065. matrix_synapse_turn_uris: "{{ coturn_turn_uris if coturn_enabled else [] }}"
  4066. matrix_synapse_turn_shared_secret: "{{ coturn_turn_static_auth_secret if (coturn_enabled and coturn_authentication_method == 'auth-secret') else '' }}"
  4067. matrix_synapse_turn_username: "{{ coturn_lt_cred_mech_username if (coturn_enabled and coturn_authentication_method == 'lt-cred-mech') else '' }}"
  4068. matrix_synapse_turn_password: "{{ coturn_lt_cred_mech_password if (coturn_enabled and coturn_authentication_method == 'lt-cred-mech') else '' }}"
  4069. matrix_synapse_self_check_validate_certificates: "{{ matrix_playbook_ssl_enabled }}"
  4070. matrix_synapse_systemd_required_services_list_auto: |
  4071. {{
  4072. ([postgres_identifier ~ '.service'] if (matrix_playbook_synapse_uses_managed_postgres and postgres_container_network != matrix_synapse_container_network) else [])
  4073. +
  4074. ([valkey_identifier ~ '.service'] if matrix_playbook_synapse_uses_managed_valkey else [])
  4075. +
  4076. (['matrix-goofys.service'] if matrix_s3_media_store_enabled else [])
  4077. +
  4078. (['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 [])
  4079. }}
  4080. matrix_synapse_systemd_wanted_services_list_auto: |
  4081. {{
  4082. ([coturn_identifier ~ '.service'] if coturn_enabled else [])
  4083. +
  4084. ([exim_relay_identifier ~ '.service'] if exim_relay_enabled else [])
  4085. }}
  4086. # Synapse workers (used for parallel load-scaling) need Redis for IPC.
  4087. matrix_synapse_redis_enabled: "{{ valkey_enabled }}"
  4088. matrix_synapse_redis_host: "{{ valkey_identifier if matrix_playbook_synapse_uses_managed_valkey else '' }}"
  4089. matrix_synapse_redis_password: "{{ valkey_connection_password if matrix_playbook_synapse_uses_managed_valkey else '' }}"
  4090. # unix socket connection
  4091. matrix_synapse_redis_path_enabled: "{{ matrix_playbook_synapse_uses_managed_valkey }}"
  4092. # path to the Redis socket's parent dir inside the Synapse container
  4093. matrix_synapse_redis_path: "{{ '/run-valkey' if matrix_playbook_synapse_uses_managed_valkey else '' }}"
  4094. # redis socket filename
  4095. matrix_synapse_redis_path_socket: "{{ '/valkey.sock' if matrix_playbook_synapse_uses_managed_valkey else '' }}"
  4096. # path to the Redis socket on the host, using Valkey
  4097. matrix_synapse_redis_path_host: "{{ valkey_run_path if matrix_playbook_synapse_uses_managed_valkey else '' }}"
  4098. matrix_synapse_container_extra_arguments_auto: "{{ matrix_homeserver_container_extra_arguments_auto }}"
  4099. matrix_synapse_app_service_config_files_auto: "{{ matrix_homeserver_app_service_config_files_auto }}"
  4100. # Disable creation of media repository Synapse worker when using media-repo
  4101. matrix_synapse_ext_media_repo_enabled: "{{ matrix_media_repo_enabled }}"
  4102. # The synapse-http-antispam module reports to a single consumer, so at most one of
  4103. # Draupnir and Meowlnir may claim it. Each role's validation fails the run if both do.
  4104. matrix_synapse_ext_synapse_http_antispam_enabled: "{{ matrix_bot_draupnir_config_web_synapseHTTPAntispam_enabled or matrix_bot_meowlnir_synapse_http_antispam_enabled }}"
  4105. 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 (matrix_bot_meowlnir_synapse_http_antispam_config_base_url if matrix_bot_meowlnir_synapse_http_antispam_enabled else '') }}"
  4106. matrix_synapse_ext_synapse_http_antispam_config_authorization: "{{ matrix_bot_draupnir_config_web_synapseHTTPAntispam_authorization if matrix_bot_draupnir_config_web_synapseHTTPAntispam_enabled else (matrix_bot_meowlnir_config_antispam_secret if matrix_bot_meowlnir_synapse_http_antispam_enabled else '') }}"
  4107. 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 (matrix_bot_meowlnir_synapse_http_antispam_config_enabled_callbacks if matrix_bot_meowlnir_synapse_http_antispam_enabled else []) }}"
  4108. 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 (matrix_bot_meowlnir_synapse_http_antispam_config_fail_open if matrix_bot_meowlnir_synapse_http_antispam_enabled else {}) }}"
  4109. 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 (matrix_bot_meowlnir_synapse_http_antispam_config_async if matrix_bot_meowlnir_synapse_http_antispam_enabled else {}) }}"
  4110. # Meowlnir's bots need these to support end-to-end encryption.
  4111. matrix_synapse_experimental_features_msc2409_to_device_messages_enabled: "{{ matrix_bot_meowlnir_enabled and matrix_bot_meowlnir_config_encryption_enable }}"
  4112. matrix_synapse_experimental_features_msc3202_transaction_extensions_enabled: "{{ matrix_bot_meowlnir_enabled and matrix_bot_meowlnir_config_encryption_enable }}"
  4113. # Enable Synapse statistics reporting when using synapse-usage-exporter
  4114. matrix_synapse_report_stats: "{{ matrix_synapse_usage_exporter_enabled }}"
  4115. 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 matrix_synapse_report_stats_endpoint_default) }}"
  4116. matrix_synapse_matrix_authentication_service_enabled: "{{ matrix_authentication_service_enabled }}"
  4117. matrix_synapse_matrix_authentication_service_endpoint: "{{ matrix_authentication_service_http_base_container_url if matrix_authentication_service_enabled else '' }}"
  4118. matrix_synapse_matrix_authentication_service_secret: "{{ matrix_authentication_service_config_matrix_secret if matrix_authentication_service_enabled else '' }}"
  4119. matrix_synapse_experimental_features_msc4108_enabled: "{{ matrix_authentication_service_enabled and not matrix_authentication_service_migration_in_progress }}"
  4120. matrix_synapse_delayed_events_enabled: "{{ matrix_rtc_enabled }}"
  4121. matrix_synapse_experimental_features_msc4143_enabled: "{{ matrix_rtc_enabled }}"
  4122. matrix_synapse_experimental_features_msc4222_enabled: "{{ matrix_rtc_enabled }}"
  4123. matrix_synapse_experimental_features_msc4354_enabled: "{{ matrix_rtc_enabled }}"
  4124. # Disable password authentication when delegating authentication to Matrix Authentication Service.
  4125. # Unless this is done, Synapse fails on startup with:
  4126. # > Error in configuration at 'password_config.enabled':
  4127. # > Password auth cannot be enabled when OAuth delegation is enabled
  4128. matrix_synapse_password_config_enabled: "{{ not matrix_synapse_matrix_authentication_service_enabled }}"
  4129. matrix_synapse_register_user_script_matrix_authentication_service_path: "{{ matrix_authentication_service_bin_path }}/register-user"
  4130. # After Synapse's systemd health check passes, the reverse proxy still needs time to
  4131. # discover the container and register its routes. We derive this delay from Traefik's
  4132. # providers.providersThrottleDuration setting (+1s grace for our healthcheck polling interval),
  4133. # so it stays in sync automatically.
  4134. 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 }}"
  4135. 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 [] }}"
  4136. 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 }}"
  4137. 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 '' }}"
  4138. 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 '' }}"
  4139. matrix_synapse_reverse_proxy_companion_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  4140. matrix_synapse_reverse_proxy_companion_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  4141. matrix_synapse_reverse_proxy_companion_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  4142. matrix_synapse_reverse_proxy_companion_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  4143. matrix_synapse_reverse_proxy_companion_container_labels_traefik_hostname: "{{ matrix_server_fqn_matrix }}"
  4144. matrix_synapse_reverse_proxy_companion_container_labels_traefik_compression_middleware_enabled: "{{ matrix_playbook_reverse_proxy_traefik_middleware_compression_enabled }}"
  4145. 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 '' }}"
  4146. matrix_synapse_reverse_proxy_companion_container_labels_internal_client_synapse_admin_api_traefik_entrypoints: "{{ matrix_playbook_internal_matrix_client_api_traefik_entrypoint_name }}"
  4147. matrix_synapse_reverse_proxy_companion_access_log_syslog_integration_enabled: "{{ prometheus_nginxlog_exporter_enabled }}"
  4148. matrix_synapse_reverse_proxy_companion_access_log_syslog_integration_server_port: "{{ (prometheus_nginxlog_exporter_identifier | string +':'+ prometheus_nginxlog_exporter_container_syslog_port | string) | default('') }}"
  4149. matrix_synapse_reverse_proxy_companion_container_additional_networks_auto: |
  4150. {{
  4151. (
  4152. ([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 [])
  4153. +
  4154. ([prometheus_nginxlog_exporter_container_network] if (prometheus_nginxlog_exporter_enabled and prometheus_nginxlog_exporter_container_network != matrix_synapse_reverse_proxy_companion_container_network) else [])
  4155. +
  4156. ([] if matrix_homeserver_container_network in ['', matrix_synapse_reverse_proxy_companion_container_network] else [matrix_homeserver_container_network])
  4157. ) | unique
  4158. }}
  4159. ######################################################################
  4160. #
  4161. # /matrix-synapse
  4162. #
  4163. ######################################################################
  4164. ######################################################################
  4165. #
  4166. # matrix-synapse-auto-compressor
  4167. #
  4168. ######################################################################
  4169. # Not enabled by default, for now
  4170. matrix_synapse_auto_compressor_enabled: false
  4171. matrix_synapse_auto_compressor_uid: "{{ matrix_user_uid }}"
  4172. matrix_synapse_auto_compressor_gid: "{{ matrix_user_gid }}"
  4173. matrix_synapse_auto_compressor_postgres_image: "{{ postgres_container_image_to_use }}"
  4174. 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 }}"
  4175. matrix_synapse_auto_compressor_container_image_self_build: "{{ matrix_architecture not in ['arm64', 'amd64'] }}"
  4176. matrix_synapse_auto_compressor_container_network: "{{ (postgres_container_network if matrix_playbook_synapse_auto_compressor_uses_managed_postgres else 'matrix-synapse-auto-compressor') }}"
  4177. matrix_synapse_auto_compressor_database_username: "{{ matrix_synapse_database_user if matrix_synapse_enabled else '' }}"
  4178. matrix_synapse_auto_compressor_database_password: "{{ matrix_synapse_database_password if matrix_synapse_enabled else '' }}"
  4179. matrix_synapse_auto_compressor_database_hostname: "{{ matrix_synapse_database_host if matrix_synapse_enabled else '' }}"
  4180. matrix_synapse_auto_compressor_database_port: "{{ matrix_synapse_database_port if matrix_synapse_enabled else '5432' }}"
  4181. matrix_synapse_auto_compressor_database_name: "{{ matrix_synapse_database_database if matrix_synapse_enabled else '' }}"
  4182. matrix_synapse_auto_compressor_systemd_required_services_list_auto: |
  4183. {{
  4184. ([postgres_identifier ~ '.service'] if matrix_playbook_synapse_auto_compressor_uses_managed_postgres else [])
  4185. }}
  4186. ######################################################################
  4187. #
  4188. # /matrix-synapse-auto-compressor
  4189. #
  4190. ######################################################################
  4191. ######################################################################
  4192. #
  4193. # matrix-ketesa
  4194. #
  4195. ######################################################################
  4196. matrix_ketesa_enabled: false
  4197. 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 }}"
  4198. matrix_ketesa_container_uid: "{{ matrix_user_uid }}"
  4199. matrix_ketesa_container_gid: "{{ matrix_user_gid }}"
  4200. matrix_ketesa_container_http_host_bind_port: "{{ (matrix_playbook_service_host_bind_interface_prefix ~ '8766') if matrix_playbook_service_host_bind_interface_prefix else '' }}"
  4201. matrix_ketesa_container_image_self_build: "{{ matrix_architecture not in ['arm64', 'amd64'] }}"
  4202. matrix_ketesa_container_network: "{{ matrix_addons_container_network }}"
  4203. matrix_ketesa_container_additional_networks: "{{ [matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network else [] }}"
  4204. matrix_ketesa_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  4205. matrix_ketesa_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  4206. matrix_ketesa_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  4207. matrix_ketesa_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  4208. matrix_ketesa_config_externalAuthProvider: "{{ matrix_authentication_service_enabled | default(false) or matrix_synapse_ext_password_provider_ldap_enabled | default(false) }}"
  4209. matrix_ketesa_config_asManagedUsers_auto: |
  4210. {{
  4211. ([
  4212. '^@'+(matrix_alertmanager_receiver_config_matrix_user_id_localpart | default('') | regex_escape) +':'+(matrix_domain | regex_escape)+'$',
  4213. ] if matrix_alertmanager_receiver_enabled else [])
  4214. +
  4215. ([
  4216. '^@'+(matrix_appservice_draupnir_for_all_user_prefix | default('') | regex_escape) +'_[a-zA-Z0-9]+:'+(matrix_domain | regex_escape)+'$',
  4217. ] if matrix_appservice_draupnir_for_all_enabled else [])
  4218. +
  4219. ([
  4220. matrix_bot_meowlnir_user_regex,
  4221. matrix_bot_meowlnir_appservice_sender_regex,
  4222. ] if matrix_bot_meowlnir_enabled else [])
  4223. +
  4224. ([
  4225. '^@'+(matrix_bot_baibot_config_user_mxid_localpart | default('') | regex_escape) +':'+(matrix_domain | regex_escape)+'$',
  4226. ] if matrix_bot_baibot_enabled else [])
  4227. +
  4228. ([
  4229. '^@'+(matrix_bot_buscarron_login | default('') | regex_escape) +':'+(matrix_domain | regex_escape)+'$',
  4230. ] if matrix_bot_buscarron_enabled else [])
  4231. +
  4232. ([
  4233. '^@'+(matrix_bot_draupnir_login | default('') | regex_escape) +':'+(matrix_domain | regex_escape)+'$',
  4234. ] if matrix_bot_draupnir_enabled else [])
  4235. +
  4236. ([
  4237. '^@'+(matrix_bot_honoroit_login | default('') | regex_escape) +':'+(matrix_domain | regex_escape)+'$',
  4238. ] if matrix_bot_honoroit_enabled else [])
  4239. +
  4240. ([
  4241. '^@'+(matrix_bot_matrix_reminder_bot_matrix_user_id_localpart | default('') | regex_escape) +':'+(matrix_domain | regex_escape)+'$',
  4242. ] if matrix_bot_matrix_reminder_bot_enabled else [])
  4243. +
  4244. ([
  4245. '^@'+(matrix_bot_maubot_login | default('') | regex_escape) +':'+(matrix_domain | regex_escape)+'$',
  4246. ] if matrix_bot_maubot_enabled else [])
  4247. +
  4248. ([
  4249. '^@'+(matrix_bridge_postmoogle_login | default('') | regex_escape) +':'+(matrix_domain | regex_escape)+'$',
  4250. ] if matrix_bridge_postmoogle_enabled else [])
  4251. +
  4252. ([
  4253. '^@_discord_[a-zA-Z0-9]+:'+(matrix_domain | regex_escape)+'$',
  4254. ] if matrix_bridge_appservice_discord_enabled else [])
  4255. +
  4256. ([
  4257. '^@'+(matrix_bridge_beeper_linkedin_appservice_bot_username | default('') | regex_escape)+':'+(matrix_domain | regex_escape)+'$',
  4258. '^@linkedin_[a-zA-Z0-9]+:'+(matrix_domain | regex_escape)+'$',
  4259. ] if matrix_bridge_beeper_linkedin_enabled else [])
  4260. +
  4261. ([
  4262. '^@'+(matrix_bridge_beeper_line_appservice_bot_username | default('') | regex_escape)+':'+(matrix_domain | regex_escape)+'$',
  4263. '^@line_[a-zA-Z0-9]+:'+(matrix_domain | regex_escape)+'$',
  4264. ] if matrix_bridge_beeper_line_enabled else [])
  4265. +
  4266. ([
  4267. '^@heisenbridge:'+(matrix_domain | regex_escape)+'$',
  4268. '^@hbirc_[a-zA-Z0-9]+:'+(matrix_domain | regex_escape)+'$',
  4269. ] if matrix_bridge_heisenbridge_enabled else [])
  4270. +
  4271. ([
  4272. '^@hookshot:'+(matrix_domain | regex_escape)+'$',
  4273. '^@_github_[a-zA-Z0-9]+:'+(matrix_domain | regex_escape)+'$',
  4274. '^@_gitlab_[a-zA-Z0-9]+:'+(matrix_domain | regex_escape)+'$',
  4275. '^@_jira_[a-zA-Z0-9]+:'+(matrix_domain | regex_escape)+'$',
  4276. '^@'+(matrix_bridge_hookshot_generic_userIdPrefix | default('') | regex_escape)+'[a-zA-Z0-9]+:'+(matrix_domain | regex_escape)+'$',
  4277. ] if matrix_bridge_hookshot_enabled else [])
  4278. +
  4279. ([
  4280. '^@'+(matrix_bridge_mautrix_bluesky_appservice_bot_username | default('') | regex_escape)+':'+(matrix_domain | regex_escape)+'$',
  4281. '^@bluesky_[a-zA-Z0-9]+:'+(matrix_domain | regex_escape)+'$',
  4282. ] if matrix_bridge_mautrix_bluesky_enabled else [])
  4283. +
  4284. ([
  4285. '^@'+(matrix_bridge_rustpush_appservice_bot_username | default('') | regex_escape)+':'+(matrix_domain | regex_escape)+'$',
  4286. '^@rustpush_[a-zA-Z0-9_.+-]+:'+(matrix_domain | regex_escape)+'$',
  4287. ] if matrix_bridge_rustpush_enabled else [])
  4288. +
  4289. ([
  4290. '^@'+(matrix_bridge_mautrix_discord_appservice_bot_username | default('') | regex_escape)+':'+(matrix_domain | regex_escape)+'$',
  4291. '^@discord_[0-9]+:'+(matrix_domain | regex_escape)+'$',
  4292. ] if matrix_bridge_mautrix_discord_enabled else [])
  4293. +
  4294. ([
  4295. '^@'+(matrix_bridge_mautrix_gmessages_appservice_bot_username | default('') | regex_escape)+':'+(matrix_domain | regex_escape)+'$',
  4296. '^@gmessages_[a-zA-Z0-9]+:'+(matrix_domain | regex_escape)+'$',
  4297. ] if matrix_bridge_mautrix_gmessages_enabled else [])
  4298. +
  4299. ([
  4300. '^@'+(matrix_bridge_mautrix_gvoice_appservice_bot_username | default('') | regex_escape)+':'+(matrix_domain | regex_escape)+'$',
  4301. '^@gvoice_[a-zA-Z0-9]+:'+(matrix_domain | regex_escape)+'$',
  4302. ] if matrix_bridge_mautrix_gvoice_enabled else [])
  4303. +
  4304. ([
  4305. '^@'+(matrix_bridge_mautrix_linkedin_appservice_bot_username | default('') | regex_escape)+':'+(matrix_domain | regex_escape)+'$',
  4306. '^@linkedin_[a-zA-Z0-9]+:'+(matrix_domain | regex_escape)+'$',
  4307. ] if matrix_bridge_mautrix_linkedin_enabled else [])
  4308. +
  4309. ([
  4310. '^@'+(matrix_bridge_mautrix_googlechat_appservice_bot_username | default('') | regex_escape)+':'+(matrix_domain | regex_escape)+'$',
  4311. '^@googlechat_[a-zA-Z0-9]+:'+(matrix_domain | regex_escape)+'$',
  4312. ] if matrix_bridge_mautrix_googlechat_enabled else [])
  4313. +
  4314. ([
  4315. '^@'+(matrix_bridge_mautrix_meta_instagram_appservice_username | default('') | regex_escape)+':'+(matrix_domain | regex_escape)+'$',
  4316. '^@'+(matrix_bridge_mautrix_meta_instagram_bridge_username_prefix | default('') | regex_escape)+'[a-zA-Z0-9]+:'+(matrix_domain | regex_escape)+'$',
  4317. ] if matrix_bridge_mautrix_meta_instagram_enabled else [])
  4318. +
  4319. ([
  4320. '^@'+(matrix_bridge_mautrix_meta_messenger_appservice_username | default('') | regex_escape)+':'+(matrix_domain | regex_escape)+'$',
  4321. '^@'+(matrix_bridge_mautrix_meta_messenger_bridge_username_prefix | default('') | regex_escape)+'[a-zA-Z0-9]+:'+(matrix_domain | regex_escape)+'$',
  4322. ] if matrix_bridge_mautrix_meta_messenger_enabled else [])
  4323. +
  4324. ([
  4325. '^@'+(matrix_bridge_mautrix_signal_appservice_bot_username | default('') | regex_escape)+':'+(matrix_domain | regex_escape)+'$',
  4326. '^@signal_[a-zA-Z0-9]+:'+(matrix_domain | regex_escape)+'$',
  4327. ] if matrix_bridge_mautrix_signal_enabled else [])
  4328. +
  4329. ([
  4330. '^@'+(matrix_bridge_mautrix_slack_appservice_bot_username | default('') | regex_escape)+':'+(matrix_domain | regex_escape)+'$',
  4331. '^@slack_[a-zA-Z0-9\-]+:'+(matrix_domain | regex_escape)+'$',
  4332. ] if matrix_bridge_mautrix_slack_enabled else [])
  4333. +
  4334. ([
  4335. '^@'+(matrix_bridge_mautrix_telegram_appservice_bot_username | default('') | regex_escape)+':'+(matrix_domain | regex_escape)+'$',
  4336. '^@telegram_(channel-)?[0-9]+:'+(matrix_domain | regex_escape)+'$',
  4337. ] if matrix_bridge_mautrix_telegram_enabled else [])
  4338. +
  4339. ([
  4340. '^@'+(matrix_bridge_mautrix_twitter_appservice_bot_username | default('') | regex_escape)+':'+(matrix_domain | regex_escape)+'$',
  4341. '^@twitter_[a-zA-Z0-9]+:'+(matrix_domain | regex_escape)+'$',
  4342. ] if matrix_bridge_mautrix_twitter_enabled else [])
  4343. +
  4344. ([
  4345. '^@'+(matrix_bridge_mautrix_whatsapp_appservice_bot_username | default('') | regex_escape)+':'+(matrix_domain | regex_escape)+'$',
  4346. '^@whatsapp_[0-9]+:'+(matrix_domain | regex_escape)+'$',
  4347. ] if matrix_bridge_mautrix_whatsapp_enabled else [])
  4348. +
  4349. ([
  4350. '^@'+(matrix_bridge_mautrix_wsproxy_imessage_appservice_bot_username | default('') | regex_escape)+':'+(matrix_domain | regex_escape)+'$',
  4351. '^@imessage_[a-zA-Z0-9]+:'+(matrix_domain | regex_escape)+'$',
  4352. ] if matrix_bridge_mautrix_wsproxy_enabled else [])
  4353. +
  4354. ([
  4355. '^@_groupmepuppet_[a-zA-Z0-9]+:'+(matrix_domain | regex_escape)+'$',
  4356. ] if matrix_bridge_mx_puppet_groupme_enabled else [])
  4357. +
  4358. ([
  4359. '^@_steampuppet_[a-zA-Z0-9]+:'+(matrix_domain | regex_escape)+'$',
  4360. ] if matrix_bridge_mx_puppet_steam_enabled else [])
  4361. +
  4362. ([
  4363. '^@smsbot:'+(matrix_domain | regex_escape)+'$',
  4364. '^@sms_[a-zA-Z0-9]+:'+(matrix_domain | regex_escape)+'$',
  4365. ] if matrix_bridge_sms_enabled else [])
  4366. +
  4367. ([
  4368. '^@'+(matrix_bridge_wechat_appservice_bot_username | default('') | regex_escape)+':'+(matrix_domain | regex_escape)+'$',
  4369. '^@_wechat_[a-zA-Z0-9]+:'+(matrix_domain | regex_escape)+'$',
  4370. ] if matrix_bridge_wechat_enabled else [])
  4371. +
  4372. ([
  4373. '^@'+(matrix_bridge_steam_appservice_bot_username | default('') | regex_escape)+':'+(matrix_domain | regex_escape)+'$',
  4374. '^@steam_[a-zA-Z0-9]+:'+(matrix_domain | regex_escape)+'$',
  4375. ] if matrix_bridge_steam_enabled else [])
  4376. }}
  4377. ######################################################################
  4378. #
  4379. # /matrix-ketesa
  4380. #
  4381. ######################################################################
  4382. ######################################################################
  4383. #
  4384. # matrix-synapse-usage-exporter
  4385. #
  4386. ######################################################################
  4387. matrix_synapse_usage_exporter_enabled: false
  4388. 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 }}"
  4389. matrix_synapse_usage_exporter_container_network: "{{ matrix_monitoring_container_network }}"
  4390. matrix_synapse_usage_exporter_container_additional_networks: "{{ [matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network else [] }}"
  4391. matrix_synapse_usage_exporter_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  4392. matrix_synapse_usage_exporter_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  4393. matrix_synapse_usage_exporter_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  4394. matrix_synapse_usage_exporter_metrics_proxying_enabled: "{{ matrix_metrics_exposure_enabled }}"
  4395. matrix_synapse_usage_exporter_metrics_proxying_hostname: "{{ matrix_metrics_exposure_hostname }}"
  4396. matrix_synapse_usage_exporter_metrics_proxying_path: "{{ matrix_metrics_exposure_path_prefix }}/synapse-usage-exporter"
  4397. matrix_synapse_usage_exporter_container_labels_traefik_metrics_middleware_basic_auth_enabled: "{{ matrix_metrics_exposure_http_basic_auth_enabled }}"
  4398. matrix_synapse_usage_exporter_container_labels_traefik_metrics_middleware_basic_auth_users: "{{ matrix_metrics_exposure_http_basic_auth_users }}"
  4399. ######################################################################
  4400. #
  4401. # /matrix-synapse-usage-exporter
  4402. #
  4403. ######################################################################
  4404. ######################################################################
  4405. #
  4406. # prometheus_node_exporter
  4407. #
  4408. ######################################################################
  4409. prometheus_node_exporter_enabled: false
  4410. prometheus_node_exporter_identifier: matrix-prometheus-node-exporter
  4411. prometheus_node_exporter_base_path: "{{ matrix_base_data_path }}/prometheus-node-exporter"
  4412. prometheus_node_exporter_uid: "{{ matrix_user_uid }}"
  4413. prometheus_node_exporter_gid: "{{ matrix_user_gid }}"
  4414. prometheus_node_exporter_hostname: "{{ matrix_server_fqn_matrix }}"
  4415. 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 }}"
  4416. prometheus_node_exporter_container_network: "{{ matrix_monitoring_container_network }}"
  4417. prometheus_node_exporter_container_additional_networks_auto: "{{ [matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network else [] }}"
  4418. prometheus_node_exporter_container_labels_metrics_enabled: "{{ matrix_metrics_exposure_enabled }}"
  4419. prometheus_node_exporter_container_labels_metrics_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  4420. prometheus_node_exporter_container_labels_metrics_entrypoints: "{{ traefik_entrypoint_primary }}"
  4421. prometheus_node_exporter_container_labels_metrics_tls_certResolver: "{{ traefik_certResolver_primary }}"
  4422. prometheus_node_exporter_container_labels_metrics_middleware_basic_auth_enabled: "{{ matrix_metrics_exposure_http_basic_auth_enabled }}"
  4423. prometheus_node_exporter_container_labels_metrics_middleware_basic_auth_users: "{{ matrix_metrics_exposure_http_basic_auth_users }}"
  4424. ######################################################################
  4425. #
  4426. # /prometheus_node_exporter
  4427. #
  4428. ######################################################################
  4429. ######################################################################
  4430. #
  4431. # prometheus_postgres_exporter
  4432. #
  4433. ######################################################################
  4434. prometheus_postgres_exporter_enabled: false
  4435. prometheus_postgres_exporter_identifier: matrix-prometheus-postgres-exporter
  4436. prometheus_postgres_exporter_base_path: "{{ matrix_base_data_path }}/prometheus-postgres-exporter"
  4437. prometheus_postgres_exporter_uid: "{{ matrix_user_uid }}"
  4438. prometheus_postgres_exporter_gid: "{{ matrix_user_gid }}"
  4439. prometheus_postgres_exporter_hostname: "{{ matrix_server_fqn_matrix }}"
  4440. 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 }}"
  4441. prometheus_postgres_exporter_container_network: "{{ matrix_monitoring_container_network }}"
  4442. prometheus_postgres_exporter_container_additional_networks: |
  4443. {{
  4444. ([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 [])
  4445. +
  4446. ([matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network and prometheus_postgres_exporter_container_labels_metrics_enabled else [])
  4447. }}
  4448. prometheus_postgres_exporter_container_labels_metrics_enabled: "{{ matrix_metrics_exposure_enabled }}"
  4449. prometheus_postgres_exporter_container_labels_metrics_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  4450. prometheus_postgres_exporter_container_labels_metrics_entrypoints: "{{ traefik_entrypoint_primary }}"
  4451. prometheus_postgres_exporter_container_labels_metrics_tls_certResolver: "{{ traefik_certResolver_primary }}"
  4452. prometheus_postgres_exporter_container_labels_metrics_middleware_basic_auth_enabled: "{{ matrix_metrics_exposure_http_basic_auth_enabled }}"
  4453. prometheus_postgres_exporter_container_labels_metrics_middleware_basic_auth_users: "{{ matrix_metrics_exposure_http_basic_auth_users }}"
  4454. prometheus_postgres_exporter_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  4455. prometheus_postgres_exporter_database_username: matrix_prometheus_postgres_exporter
  4456. prometheus_postgres_exporter_database_password: "{{ (matrix_homeserver_generic_secret_key + ':prometheus.pg.db') | hash('sha512') | to_uuid }}"
  4457. prometheus_postgres_exporter_database_name: matrix_prometheus_postgres_exporter
  4458. prometheus_postgres_exporter_systemd_required_services_list_auto: |
  4459. {{
  4460. ([postgres_identifier ~ '.service'] if (postgres_enabled and prometheus_postgres_exporter_database_hostname == postgres_connection_hostname) else [])
  4461. }}
  4462. ######################################################################
  4463. #
  4464. # /prometheus_postgres_exporter
  4465. #
  4466. ######################################################################
  4467. ######################################################################
  4468. #
  4469. # prometheus_nginxlog_exporter
  4470. #
  4471. ######################################################################
  4472. prometheus_nginxlog_exporter_enabled: false
  4473. prometheus_nginxlog_exporter_identifier: matrix-prometheus-nginxlog-exporter
  4474. prometheus_nginxlog_exporter_base_path: "{{ matrix_base_data_path }}/prometheus-nginxlog-exporter"
  4475. prometheus_nginxlog_exporter_uid: "{{ matrix_user_uid }}"
  4476. prometheus_nginxlog_exporter_gid: "{{ matrix_user_gid }}"
  4477. prometheus_nginxlog_exporter_hostname: "{{ matrix_server_fqn_matrix }}"
  4478. 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 }}"
  4479. prometheus_nginxlog_exporter_container_network: "{{ matrix_monitoring_container_network }}"
  4480. prometheus_nginxlog_exporter_container_network_deletion_enabled: false
  4481. prometheus_nginxlog_exporter_container_additional_networks_auto: |-
  4482. {{
  4483. ([matrix_playbook_reverse_proxyable_services_additional_network] if (matrix_playbook_reverse_proxyable_services_additional_network and prometheus_nginxlog_exporter_container_labels_metrics_enabled) else [])
  4484. }}
  4485. prometheus_nginxlog_exporter_container_labels_metrics_enabled: "{{ matrix_metrics_exposure_enabled }}"
  4486. prometheus_nginxlog_exporter_container_labels_metrics_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  4487. prometheus_nginxlog_exporter_container_labels_metrics_entrypoints: "{{ traefik_entrypoint_primary }}"
  4488. prometheus_nginxlog_exporter_container_labels_metrics_tls_certResolver: "{{ traefik_certResolver_primary }}"
  4489. prometheus_nginxlog_exporter_container_labels_metrics_middleware_basic_auth_enabled: "{{ matrix_metrics_exposure_http_basic_auth_enabled }}"
  4490. prometheus_nginxlog_exporter_container_labels_metrics_middleware_basic_auth_users: "{{ matrix_metrics_exposure_http_basic_auth_users }}"
  4491. prometheus_nginxlog_exporter_config_namespaces_source_tags_auto: |
  4492. {{
  4493. ([matrix_synapse_reverse_proxy_companion_access_log_syslog_integration_tag] if matrix_synapse_reverse_proxy_companion_access_log_syslog_integration_enabled else [])
  4494. }}
  4495. prometheus_nginxlog_exporter_architecture: "{{ matrix_architecture }}"
  4496. ######################################################################
  4497. #
  4498. # /prometheus_nginxlog_exporter
  4499. #
  4500. ######################################################################
  4501. ######################################################################
  4502. #
  4503. # prometheus
  4504. #
  4505. ######################################################################
  4506. prometheus_enabled: false
  4507. prometheus_identifier: matrix-prometheus
  4508. prometheus_base_path: "{{ matrix_base_data_path }}/prometheus"
  4509. prometheus_uid: "{{ matrix_user_uid }}"
  4510. prometheus_gid: "{{ matrix_user_gid }}"
  4511. 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 }}"
  4512. prometheus_container_network: "{{ matrix_monitoring_container_network }}"
  4513. prometheus_container_additional_networks_auto: |
  4514. {{
  4515. (
  4516. ([prometheus_nginxlog_exporter_container_network] if matrix_prometheus_services_connect_scraper_nginxlog_enabled and prometheus_nginxlog_exporter_container_network != prometheus_container_network else [])
  4517. +
  4518. ([prometheus_node_exporter_container_network] if prometheus_self_node_scraper_enabled and prometheus_node_exporter_container_network != prometheus_container_network else [])
  4519. +
  4520. ([matrix_synapse_container_network] if matrix_prometheus_services_connect_scraper_synapse_enabled and matrix_synapse_container_network != prometheus_container_network else [])
  4521. +
  4522. ([prometheus_postgres_exporter_container_network] if matrix_prometheus_services_connect_scraper_postgres_enabled and prometheus_postgres_exporter_container_network != prometheus_container_network else [])
  4523. +
  4524. ([matrix_bridge_hookshot_container_network] if matrix_prometheus_services_connect_scraper_hookshot_enabled and matrix_bridge_hookshot_container_network != prometheus_container_network else [])
  4525. +
  4526. ([matrix_media_repo_container_network] if matrix_prometheus_services_connect_scraper_media_repo_enabled and matrix_media_repo_container_network != prometheus_container_network else [])
  4527. +
  4528. ([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 [])
  4529. +
  4530. ([ntfy_container_network] if matrix_prometheus_services_connect_scraper_ntfy_enabled and ntfy_container_network != prometheus_container_network else [])
  4531. ) | unique
  4532. }}
  4533. prometheus_container_http_host_bind_port: "{{ (matrix_playbook_service_host_bind_interface_prefix ~ '9090') if matrix_playbook_service_host_bind_interface_prefix else '' }}"
  4534. prometheus_config_rule_files_auto: |
  4535. {{
  4536. (['synapse-v2.rules'] if matrix_prometheus_services_connect_synapse_rules_enabled else [])
  4537. }}
  4538. prometheus_self_node_scraper_enabled: "{{ prometheus_node_exporter_enabled }}"
  4539. prometheus_self_node_scraper_static_configs_target: "{{ (prometheus_node_exporter_identifier + ':9100') if prometheus_node_exporter_enabled else '' }}"
  4540. prometheus_config_scrape_configs_auto: |
  4541. {{
  4542. (matrix_prometheus_services_connect_scraper_synapse_configs if matrix_prometheus_services_connect_scraper_synapse_enabled else [])
  4543. +
  4544. (matrix_prometheus_services_connect_scraper_postgres_scrape_configs if matrix_prometheus_services_connect_scraper_postgres_enabled else [])
  4545. +
  4546. (matrix_prometheus_services_connect_scraper_hookshot_scrape_configs if matrix_prometheus_services_connect_scraper_hookshot_enabled else [])
  4547. +
  4548. (matrix_prometheus_services_connect_scraper_nginxlog_scrape_configs if matrix_prometheus_services_connect_scraper_nginxlog_enabled else [])
  4549. +
  4550. (matrix_prometheus_services_connect_scraper_media_repo_scrape_configs if matrix_prometheus_services_connect_scraper_media_repo_enabled else [])
  4551. +
  4552. (matrix_prometheus_services_connect_scraper_synapse_usage_exporter_scrape_configs if matrix_prometheus_services_connect_scraper_synapse_usage_exporter_enabled else [])
  4553. +
  4554. (matrix_prometheus_services_connect_scraper_ntfy_scrape_configs if matrix_prometheus_services_connect_scraper_ntfy_enabled else [])
  4555. }}
  4556. ######################################################################
  4557. #
  4558. # /prometheus
  4559. #
  4560. ######################################################################
  4561. ######################################################################
  4562. #
  4563. # matrix-prometheus-services-connect
  4564. #
  4565. ######################################################################
  4566. matrix_prometheus_services_connect_synapse_enabled: "{{ prometheus_enabled and matrix_synapse_enabled }}"
  4567. matrix_prometheus_services_connect_synapse_rules_download_synapse_tag: "{{ matrix_synapse_container_image_tag }}"
  4568. matrix_prometheus_services_connect_synapse_rules_download_dir_path: "{{ prometheus_config_path }}"
  4569. matrix_prometheus_services_connect_synapse_rules_download_owner: "{{ prometheus_uid }}"
  4570. matrix_prometheus_services_connect_synapse_rules_download_group: "{{ prometheus_gid }}"
  4571. matrix_prometheus_services_connect_scraper_synapse_enabled: "{{ matrix_synapse_enabled and matrix_synapse_metrics_enabled }}"
  4572. matrix_prometheus_services_connect_scraper_synapse_main_process_static_configs_target: "matrix-synapse:{{ matrix_synapse_metrics_port }}"
  4573. matrix_prometheus_services_connect_scraper_synapse_workers_enabled_list: "{{ matrix_synapse_workers_enabled_list }}"
  4574. matrix_prometheus_services_connect_scraper_postgres_enabled: "{{ prometheus_postgres_exporter_enabled }}"
  4575. matrix_prometheus_services_connect_scraper_postgres_static_configs_target: "{{ prometheus_postgres_exporter_identifier }}:{{ prometheus_postgres_exporter_container_http_port | string }}"
  4576. matrix_prometheus_services_connect_scraper_hookshot_enabled: "{{ matrix_bridge_hookshot_enabled and matrix_bridge_hookshot_metrics_enabled }}"
  4577. matrix_prometheus_services_connect_scraper_hookshot_static_configs_target: "{{ matrix_bridge_hookshot_container_url }}:{{ matrix_bridge_hookshot_metrics_port | string }}"
  4578. matrix_prometheus_services_connect_scraper_nginxlog_enabled: "{{ prometheus_nginxlog_exporter_enabled }}"
  4579. matrix_prometheus_services_connect_scraper_nginxlog_static_configs_target: "{{ prometheus_nginxlog_exporter_identifier }}:{{ prometheus_nginxlog_exporter_container_metrics_port | string }}"
  4580. matrix_prometheus_services_connect_scraper_media_repo_enabled: "{{ matrix_media_repo_enabled and matrix_media_repo_metrics_enabled }}"
  4581. matrix_prometheus_services_connect_scraper_media_repo_static_configs_target: "{{ matrix_media_repo_identifier }}:{{ matrix_media_repo_metrics_port }}"
  4582. matrix_prometheus_services_connect_scraper_synapse_usage_exporter_enabled: "{{ matrix_synapse_usage_exporter_enabled }}"
  4583. matrix_prometheus_services_connect_scraper_synapse_usage_exporter_static_configs_target: "{{ matrix_synapse_usage_exporter_identifier }}:{{ matrix_synapse_usage_exporter_container_port | string }}"
  4584. matrix_prometheus_services_connect_scraper_ntfy_enabled: "{{ ntfy_enabled and ntfy_metrics_listen_http_port | string | length > 0 }}"
  4585. matrix_prometheus_services_connect_scraper_ntfy_static_configs_target: "{{ ntfy_identifier }}:{{ ntfy_metrics_listen_http_port | string }}"
  4586. ######################################################################
  4587. #
  4588. # /matrix-prometheus-services-connect
  4589. #
  4590. ######################################################################
  4591. ######################################################################
  4592. #
  4593. # grafana
  4594. #
  4595. ######################################################################
  4596. grafana_enabled: false
  4597. grafana_identifier: matrix-grafana
  4598. grafana_uid: "{{ matrix_user_uid }}"
  4599. grafana_gid: "{{ matrix_user_gid }}"
  4600. grafana_hostname: "{{ matrix_server_fqn_grafana }}"
  4601. grafana_base_path: "{{ matrix_base_data_path }}/grafana"
  4602. 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 }}"
  4603. grafana_container_network: "{{ matrix_monitoring_container_network }}"
  4604. grafana_container_additional_networks_auto: |
  4605. {{
  4606. (
  4607. ([matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network and grafana_container_labels_traefik_enabled else [])
  4608. +
  4609. ([prometheus_container_network] if prometheus_enabled and prometheus_container_network != grafana_container_network else [])
  4610. ) | unique
  4611. }}
  4612. grafana_container_labels_traefik_enabled: "{{ matrix_playbook_traefik_labels_enabled }}"
  4613. grafana_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  4614. grafana_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  4615. grafana_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  4616. grafana_container_http_host_bind_port: "{{ (matrix_playbook_service_host_bind_interface_prefix ~ '3000') if matrix_playbook_service_host_bind_interface_prefix else '' }}"
  4617. grafana_provisioning_datasources_datasources: |
  4618. {{
  4619. ([{
  4620. 'name': (matrix_server_fqn_matrix + ' - Prometheus'),
  4621. 'type': 'prometheus',
  4622. 'access': 'proxy',
  4623. 'url': ('http://' + prometheus_identifier + ':9090'),
  4624. 'jsonData': {
  4625. 'timeInterval': prometheus_config_global_scrape_interval,
  4626. }
  4627. }] if prometheus_enabled else [])
  4628. }}
  4629. grafana_dashboard_download_urls_auto: |
  4630. {{
  4631. (matrix_synapse_grafana_dashboard_urls if matrix_homeserver_implementation == 'synapse' and matrix_synapse_metrics_enabled else [])
  4632. +
  4633. (prometheus_node_exporter_dashboard_urls if prometheus_node_exporter_enabled else [])
  4634. +
  4635. (prometheus_postgres_exporter_dashboard_urls if prometheus_postgres_exporter_enabled else [])
  4636. +
  4637. (prometheus_nginxlog_exporter_dashboard_urls if prometheus_nginxlog_exporter_enabled else [])
  4638. +
  4639. (matrix_media_repo_dashboard_urls if matrix_media_repo_metrics_enabled else [])
  4640. +
  4641. (matrix_synapse_usage_exporter_dashboard_urls if matrix_synapse_usage_exporter_enabled else [])
  4642. }}
  4643. grafana_provisioning_dashboard_template_files: |
  4644. {{
  4645. ([{
  4646. 'path': 'roles/galaxy/prometheus_nginxlog_exporter/templates/grafana/nginx-proxy.json',
  4647. 'name': 'nginx-proxy.json',
  4648. }] if prometheus_nginxlog_exporter_enabled else [])
  4649. }}
  4650. grafana_default_home_dashboard_path: |-
  4651. {{
  4652. {
  4653. '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 '')),
  4654. 'dendrite': ('/etc/grafana/dashboards/node-exporter-full.json' if prometheus_node_exporter_enabled else ''),
  4655. 'conduit': ('/etc/grafana/dashboards/node-exporter-full.json' if prometheus_node_exporter_enabled else ''),
  4656. 'continuwuity': ('/etc/grafana/dashboards/node-exporter-full.json' if prometheus_node_exporter_enabled else ''),
  4657. 'tuwunel': ('/etc/grafana/dashboards/node-exporter-full.json' if prometheus_node_exporter_enabled else ''),
  4658. }[matrix_homeserver_implementation]
  4659. }}
  4660. ######################################################################
  4661. #
  4662. # /grafana
  4663. #
  4664. ######################################################################
  4665. ######################################################################
  4666. #
  4667. # matrix-dendrite
  4668. #
  4669. ######################################################################
  4670. matrix_dendrite_enabled: "{{ matrix_homeserver_implementation == 'dendrite' }}"
  4671. matrix_dendrite_hostname: "{{ matrix_server_fqn_matrix }}"
  4672. matrix_dendrite_federation_enabled: "{{ matrix_homeserver_federation_enabled }}"
  4673. 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 }}"
  4674. matrix_dendrite_container_network: "{{ matrix_homeserver_container_network }}"
  4675. matrix_dendrite_container_additional_networks_auto: |
  4676. {{
  4677. (
  4678. ([matrix_playbook_reverse_proxyable_services_additional_network] if matrix_dendrite_container_labels_traefik_enabled and matrix_playbook_reverse_proxyable_services_additional_network else [])
  4679. +
  4680. ([postgres_container_network] if (postgres_enabled and matrix_dendrite_database_hostname == postgres_connection_hostname and postgres_container_network != matrix_dendrite_container_network) else [])
  4681. ) | unique
  4682. }}
  4683. 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 '' }}"
  4684. 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) }}"
  4685. matrix_dendrite_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] and not matrix_synapse_workers_enabled }}"
  4686. matrix_dendrite_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  4687. matrix_dendrite_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  4688. matrix_dendrite_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  4689. matrix_dendrite_container_labels_public_client_synapse_admin_api_enabled: "{{ matrix_ketesa_enabled }}"
  4690. matrix_dendrite_container_labels_public_client_root_redirection_enabled: "{{ matrix_dendrite_container_labels_public_client_root_redirection_url != '' }}"
  4691. 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 '' }}"
  4692. matrix_dendrite_container_labels_public_federation_api_traefik_hostname: "{{ matrix_server_fqn_matrix_federation }}"
  4693. matrix_dendrite_container_labels_public_federation_api_traefik_entrypoints: "{{ matrix_federation_traefik_entrypoint_name }}"
  4694. matrix_dendrite_container_labels_public_federation_api_traefik_tls: "{{ matrix_federation_traefik_entrypoint_tls }}"
  4695. matrix_dendrite_container_labels_public_metrics_middleware_basic_auth_enabled: "{{ matrix_metrics_exposure_http_basic_auth_enabled }}"
  4696. matrix_dendrite_container_labels_public_metrics_middleware_basic_auth_users: "{{ matrix_metrics_exposure_http_basic_auth_users }}"
  4697. matrix_dendrite_metrics_enabled: "{{ prometheus_enabled or matrix_metrics_exposure_enabled }}"
  4698. matrix_dendrite_metrics_proxying_enabled: "{{ matrix_dendrite_metrics_enabled and matrix_metrics_exposure_enabled }}"
  4699. matrix_dendrite_metrics_proxying_hostname: "{{ matrix_metrics_exposure_hostname }}"
  4700. matrix_dendrite_metrics_proxying_path_prefix: "{{ matrix_metrics_exposure_path_prefix }}/dendrite"
  4701. matrix_dendrite_client_api_registration_shared_secret: "{{ (matrix_homeserver_generic_secret_key + ':dendrite.rss') | hash('sha512') | to_uuid }}"
  4702. matrix_dendrite_database_hostname: "{{ postgres_connection_hostname if postgres_enabled else '' }}"
  4703. matrix_dendrite_database_password: "{{ (matrix_homeserver_generic_secret_key + ':dendrite.db') | hash('sha512') | to_uuid }}"
  4704. matrix_dendrite_client_api_turn_uris: "{{ coturn_turn_uris if coturn_enabled else [] }}"
  4705. matrix_dendrite_client_api_turn_shared_secret: "{{ coturn_turn_static_auth_secret if (coturn_enabled and coturn_authentication_method == 'auth-secret') else '' }}"
  4706. matrix_dendrite_client_api_turn_username: "{{ coturn_lt_cred_mech_username if (coturn_enabled and coturn_authentication_method == 'lt-cred-mech') else '' }}"
  4707. matrix_dendrite_client_api_turn_password: "{{ coturn_lt_cred_mech_password if (coturn_enabled and coturn_authentication_method == 'lt-cred-mech') else '' }}"
  4708. matrix_dendrite_disable_tls_validation: "{{ not matrix_playbook_ssl_enabled }}"
  4709. matrix_dendrite_self_check_validate_certificates: "{{ matrix_playbook_ssl_enabled }}"
  4710. matrix_dendrite_trusted_id_servers: "{{ ['matrix.org', 'vector.im'] }}"
  4711. matrix_dendrite_systemd_required_services_list_auto: |
  4712. {{
  4713. ([postgres_identifier ~ '.service'] if (postgres_enabled and matrix_dendrite_database_hostname == postgres_connection_hostname) else [])
  4714. +
  4715. (['matrix-goofys.service'] if matrix_s3_media_store_enabled else [])
  4716. }}
  4717. matrix_dendrite_systemd_wanted_services_list_auto: |
  4718. {{
  4719. ([coturn_identifier ~ '.service'] if coturn_enabled else [])
  4720. }}
  4721. matrix_dendrite_container_extra_arguments_auto: "{{ matrix_homeserver_container_extra_arguments_auto }}"
  4722. matrix_dendrite_app_service_config_files_auto: "{{ matrix_homeserver_app_service_config_files_auto }}"
  4723. ######################################################################
  4724. #
  4725. # /matrix-dendrite
  4726. #
  4727. ######################################################################
  4728. ######################################################################
  4729. #
  4730. # matrix-conduit
  4731. #
  4732. ######################################################################
  4733. matrix_conduit_enabled: "{{ matrix_homeserver_implementation == 'conduit' }}"
  4734. matrix_conduit_hostname: "{{ matrix_server_fqn_matrix }}"
  4735. matrix_conduit_allow_federation: "{{ matrix_homeserver_federation_enabled }}"
  4736. 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 }}"
  4737. matrix_conduit_container_network: "{{ matrix_homeserver_container_network }}"
  4738. matrix_conduit_container_additional_networks_auto: |
  4739. {{
  4740. (
  4741. ([matrix_playbook_reverse_proxyable_services_additional_network] if matrix_conduit_container_labels_traefik_enabled and matrix_playbook_reverse_proxyable_services_additional_network else [])
  4742. ) | unique
  4743. }}
  4744. matrix_conduit_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] and not matrix_synapse_workers_enabled }}"
  4745. matrix_conduit_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  4746. matrix_conduit_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  4747. matrix_conduit_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  4748. matrix_conduit_container_labels_public_client_root_redirection_enabled: "{{ matrix_conduit_container_labels_public_client_root_redirection_url != '' }}"
  4749. 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 '' }}"
  4750. matrix_conduit_container_labels_public_federation_api_traefik_hostname: "{{ matrix_server_fqn_matrix_federation }}"
  4751. matrix_conduit_container_labels_public_federation_api_traefik_entrypoints: "{{ matrix_federation_traefik_entrypoint_name }}"
  4752. matrix_conduit_container_labels_public_federation_api_traefik_tls: "{{ matrix_federation_traefik_entrypoint_tls }}"
  4753. matrix_conduit_container_labels_internal_client_api_enabled: "{{ matrix_playbook_internal_matrix_client_api_traefik_entrypoint_enabled }}"
  4754. matrix_conduit_container_labels_internal_client_api_traefik_entrypoints: "{{ matrix_playbook_internal_matrix_client_api_traefik_entrypoint_name }}"
  4755. matrix_conduit_turn_uris: "{{ coturn_turn_uris if coturn_enabled else [] }}"
  4756. matrix_conduit_turn_secret: "{{ coturn_turn_static_auth_secret if (coturn_enabled and coturn_authentication_method == 'auth-secret') else '' }}"
  4757. matrix_conduit_turn_username: "{{ coturn_lt_cred_mech_username if (coturn_enabled and coturn_authentication_method == 'lt-cred-mech') else '' }}"
  4758. matrix_conduit_turn_password: "{{ coturn_lt_cred_mech_password if (coturn_enabled and coturn_authentication_method == 'lt-cred-mech') else '' }}"
  4759. ######################################################################
  4760. #
  4761. # /matrix-conduit
  4762. #
  4763. ######################################################################
  4764. ######################################################################
  4765. #
  4766. # matrix-continuwuity
  4767. #
  4768. ######################################################################
  4769. matrix_continuwuity_enabled: "{{ matrix_homeserver_implementation == 'continuwuity' }}"
  4770. matrix_continuwuity_hostname: "{{ matrix_server_fqn_matrix }}"
  4771. matrix_continuwuity_config_allow_federation: "{{ matrix_homeserver_federation_enabled }}"
  4772. matrix_continuwuity_config_well_known_client: "{{ matrix_homeserver_url if matrix_playbook_ssl_enabled else '' }}"
  4773. matrix_continuwuity_config_smtp_enabled: "{{ exim_relay_enabled }}"
  4774. matrix_continuwuity_config_smtp_connection_uri: "{{ ('smtp://' ~ exim_relay_identifier ~ ':8025') if exim_relay_enabled else '' }}"
  4775. matrix_continuwuity_config_smtp_sender: "{{ exim_relay_sender_address if exim_relay_enabled else '' }}"
  4776. 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 }}"
  4777. matrix_continuwuity_container_network: "{{ matrix_homeserver_container_network }}"
  4778. matrix_continuwuity_container_additional_networks_auto: |
  4779. {{
  4780. (
  4781. ([matrix_playbook_reverse_proxyable_services_additional_network] if matrix_continuwuity_container_labels_traefik_enabled and matrix_playbook_reverse_proxyable_services_additional_network else [])
  4782. +
  4783. ([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 [])
  4784. ) | unique
  4785. }}
  4786. matrix_continuwuity_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] and not matrix_synapse_workers_enabled }}"
  4787. matrix_continuwuity_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  4788. matrix_continuwuity_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  4789. matrix_continuwuity_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  4790. matrix_continuwuity_container_labels_public_client_root_redirection_enabled: "{{ matrix_continuwuity_container_labels_public_client_root_redirection_url != '' }}"
  4791. 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 '' }}"
  4792. matrix_continuwuity_container_labels_public_federation_api_traefik_hostname: "{{ matrix_server_fqn_matrix_federation }}"
  4793. matrix_continuwuity_container_labels_public_federation_api_traefik_entrypoints: "{{ matrix_federation_traefik_entrypoint_name }}"
  4794. matrix_continuwuity_container_labels_public_federation_api_traefik_tls: "{{ matrix_federation_traefik_entrypoint_tls }}"
  4795. matrix_continuwuity_container_labels_internal_client_api_enabled: "{{ matrix_playbook_internal_matrix_client_api_traefik_entrypoint_enabled }}"
  4796. matrix_continuwuity_container_labels_internal_client_api_traefik_entrypoints: "{{ matrix_playbook_internal_matrix_client_api_traefik_entrypoint_name }}"
  4797. matrix_continuwuity_config_rtc_foci_livekit_url: "{{ matrix_livekit_jwt_service_public_url if matrix_livekit_jwt_service_enabled else '' }}"
  4798. matrix_continuwuity_config_turn_uris: "{{ coturn_turn_uris if coturn_enabled else [] }}"
  4799. matrix_continuwuity_config_turn_secret: "{{ coturn_turn_static_auth_secret if (coturn_enabled and coturn_authentication_method == 'auth-secret') else '' }}"
  4800. matrix_continuwuity_config_turn_username: "{{ coturn_lt_cred_mech_username if (coturn_enabled and coturn_authentication_method == 'lt-cred-mech') else '' }}"
  4801. matrix_continuwuity_config_turn_password: "{{ coturn_lt_cred_mech_password if (coturn_enabled and coturn_authentication_method == 'lt-cred-mech') else '' }}"
  4802. matrix_continuwuity_self_check_validate_certificates: "{{ matrix_playbook_ssl_enabled }}"
  4803. matrix_continuwuity_systemd_wanted_services_list_auto: |
  4804. {{
  4805. ([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 [])
  4806. }}
  4807. ######################################################################
  4808. #
  4809. # /matrix-continuwuity
  4810. #
  4811. ######################################################################
  4812. ######################################################################
  4813. #
  4814. # matrix-tuwunel
  4815. #
  4816. ######################################################################
  4817. matrix_tuwunel_enabled: "{{ matrix_homeserver_implementation == 'tuwunel' }}"
  4818. matrix_tuwunel_hostname: "{{ matrix_server_fqn_matrix }}"
  4819. matrix_tuwunel_config_allow_federation: "{{ matrix_homeserver_federation_enabled }}"
  4820. matrix_tuwunel_config_well_known_client: "{{ matrix_homeserver_url if matrix_playbook_ssl_enabled else '' }}"
  4821. 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 }}"
  4822. matrix_tuwunel_container_network: "{{ matrix_homeserver_container_network }}"
  4823. matrix_tuwunel_container_additional_networks_auto: |
  4824. {{
  4825. (
  4826. ([matrix_playbook_reverse_proxyable_services_additional_network] if matrix_tuwunel_container_labels_traefik_enabled and matrix_playbook_reverse_proxyable_services_additional_network else [])
  4827. ) | unique
  4828. }}
  4829. matrix_tuwunel_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] and not matrix_synapse_workers_enabled }}"
  4830. matrix_tuwunel_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  4831. matrix_tuwunel_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  4832. matrix_tuwunel_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  4833. matrix_tuwunel_container_labels_public_client_root_redirection_enabled: "{{ matrix_tuwunel_container_labels_public_client_root_redirection_url != '' }}"
  4834. 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 '' }}"
  4835. matrix_tuwunel_container_labels_public_client_synapse_admin_api_enabled: "{{ matrix_ketesa_enabled or matrix_element_admin_enabled }}"
  4836. matrix_tuwunel_container_labels_internal_client_synapse_admin_api_enabled: "{{ (matrix_bot_draupnir_enabled and matrix_bot_draupnir_admin_api_enabled) }}"
  4837. matrix_tuwunel_container_labels_internal_client_synapse_admin_api_traefik_entrypoints: "{{ matrix_playbook_internal_matrix_client_api_traefik_entrypoint_name }}"
  4838. matrix_tuwunel_container_labels_public_federation_api_traefik_hostname: "{{ matrix_server_fqn_matrix_federation }}"
  4839. matrix_tuwunel_container_labels_public_federation_api_traefik_entrypoints: "{{ matrix_federation_traefik_entrypoint_name }}"
  4840. matrix_tuwunel_container_labels_public_federation_api_traefik_tls: "{{ matrix_federation_traefik_entrypoint_tls }}"
  4841. matrix_tuwunel_container_labels_internal_client_api_enabled: "{{ matrix_playbook_internal_matrix_client_api_traefik_entrypoint_enabled }}"
  4842. matrix_tuwunel_container_labels_internal_client_api_traefik_entrypoints: "{{ matrix_playbook_internal_matrix_client_api_traefik_entrypoint_name }}"
  4843. matrix_tuwunel_container_labels_internal_tuwunel_api_traefik_entrypoints: "{{ matrix_playbook_internal_matrix_client_api_traefik_entrypoint_name }}"
  4844. matrix_tuwunel_config_well_known_livekit_url: "{{ matrix_livekit_jwt_service_public_url if matrix_livekit_jwt_service_enabled else '' }}"
  4845. matrix_tuwunel_config_turn_uris: "{{ coturn_turn_uris if coturn_enabled else [] }}"
  4846. matrix_tuwunel_config_turn_secret: "{{ coturn_turn_static_auth_secret if (coturn_enabled and coturn_authentication_method == 'auth-secret') else '' }}"
  4847. matrix_tuwunel_config_turn_username: "{{ coturn_lt_cred_mech_username if (coturn_enabled and coturn_authentication_method == 'lt-cred-mech') else '' }}"
  4848. matrix_tuwunel_config_turn_password: "{{ coturn_lt_cred_mech_password if (coturn_enabled and coturn_authentication_method == 'lt-cred-mech') else '' }}"
  4849. matrix_tuwunel_self_check_validate_certificates: "{{ matrix_playbook_ssl_enabled }}"
  4850. matrix_tuwunel_systemd_wanted_services_list_auto: |
  4851. {{
  4852. ([coturn_identifier ~ '.service'] if coturn_enabled else [])
  4853. }}
  4854. ######################################################################
  4855. #
  4856. # /matrix-tuwunel
  4857. #
  4858. ######################################################################
  4859. ######################################################################
  4860. #
  4861. # matrix-user-creator
  4862. #
  4863. ######################################################################
  4864. matrix_user_creator_users_auto: |
  4865. {{
  4866. ([{
  4867. 'username': matrix_bot_baibot_config_user_mxid_localpart,
  4868. 'initial_password': matrix_bot_baibot_config_user_password,
  4869. 'initial_type': 'bot',
  4870. }] if matrix_bot_baibot_enabled and ((matrix_bot_baibot_config_user_password | default('', true) | string | length) > 0) else [])
  4871. +
  4872. ([{
  4873. 'username': matrix_bot_matrix_reminder_bot_matrix_user_id_localpart,
  4874. 'initial_password': matrix_bot_matrix_reminder_bot_matrix_user_password,
  4875. 'initial_type': 'bot',
  4876. }] if matrix_bot_matrix_reminder_bot_enabled else [])
  4877. +
  4878. ([{
  4879. 'username': matrix_bot_honoroit_login,
  4880. 'initial_password': matrix_bot_honoroit_password,
  4881. 'initial_type': 'bot',
  4882. }] if matrix_bot_honoroit_enabled else [])
  4883. +
  4884. ([{
  4885. 'username': matrix_bridge_postmoogle_login,
  4886. 'initial_password': matrix_bridge_postmoogle_password,
  4887. 'initial_type': 'bot',
  4888. }] if matrix_bridge_postmoogle_enabled else [])
  4889. +
  4890. ([{
  4891. 'username': matrix_bot_buscarron_login,
  4892. 'initial_password': matrix_bot_buscarron_password,
  4893. 'initial_type': 'bot',
  4894. }] if matrix_bot_buscarron_enabled else [])
  4895. +
  4896. ([{
  4897. 'username': matrix_bot_maubot_login,
  4898. 'initial_password': matrix_bot_maubot_initial_password,
  4899. 'initial_type': 'bot',
  4900. }] if matrix_bot_maubot_enabled else [])
  4901. +
  4902. ([{
  4903. 'username': matrix_bot_draupnir_login,
  4904. 'initial_password': matrix_bot_draupnir_password,
  4905. 'initial_type': ('admin' if matrix_bot_draupnir_admin_api_enabled else 'bot'),
  4906. }] if matrix_bot_draupnir_enabled and matrix_bot_draupnir_password else [])
  4907. }}
  4908. ######################################################################
  4909. #
  4910. # /matrix-user-creator
  4911. #
  4912. ######################################################################
  4913. ######################################################################
  4914. #
  4915. # matrix-user-verification-service
  4916. #
  4917. ######################################################################
  4918. matrix_user_verification_service_enabled: false
  4919. matrix_user_verification_service_systemd_required_services_list: |
  4920. {{
  4921. [devture_systemd_docker_base_docker_service_name]
  4922. +
  4923. (['matrix-' + matrix_homeserver_implementation + '.service'])
  4924. }}
  4925. 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 }}"
  4926. matrix_user_verification_service_container_network: "{{ matrix_addons_container_network }}"
  4927. matrix_user_verification_service_container_additional_networks: |
  4928. {{
  4929. (
  4930. ([matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network else [])
  4931. +
  4932. ([matrix_homeserver_container_network] if matrix_homeserver_container_network != matrix_user_verification_service_container_network else [])
  4933. ) | unique
  4934. }}
  4935. # If Jitsi is managed by this playbook we can use the docker network — no need to expose a port.
  4936. # If Jitsi is not managed by this playbook, or you otherwise have a need for it, you can expose
  4937. # matrix-user-verfification-services's client-server port to port 3003.
  4938. # By default Matrix-User-Verification-Service binds to port 3000, which collides with grafana, therefore this uses port 3003.
  4939. 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' }}"
  4940. # URL exposed in the docker network
  4941. matrix_user_verification_service_container_url: "http://{{ matrix_user_verification_service_container_name }}:3000"
  4942. # Using `matrix_addons_homeserver_client_api_url` would not work here,
  4943. # because `matrix-traefik:8008` (matrix-internal-client-api) does not expose any `/_synapse` paths.
  4944. # UVS accesses `/_synapse/admin/v1/rooms` API to check room membership.
  4945. matrix_user_verification_service_uvs_homeserver_url: "{{ matrix_homeserver_container_url }}"
  4946. # We connect via the container network (private IPs), so we need to disable IP checks
  4947. matrix_user_verification_service_uvs_disable_ip_blacklist: "{{ matrix_synapse_enabled }}"
  4948. matrix_user_verification_service_uvs_auth_token: "{{ (matrix_homeserver_generic_secret_key + ':uvs.auth.token') | hash('sha512') | to_uuid }}"
  4949. ######################################################################
  4950. #
  4951. # /matrix-user-verification-service
  4952. #
  4953. ######################################################################
  4954. ########################################################################
  4955. # #
  4956. # matrix-static-files #
  4957. # #
  4958. ########################################################################
  4959. matrix_static_files_enabled: true
  4960. 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 }}"
  4961. matrix_static_files_container_network: "{{ (matrix_static_files_identifier if matrix_playbook_reverse_proxy_type == 'none' else matrix_playbook_reverse_proxy_container_network) }}"
  4962. matrix_static_files_container_labels_traefik_enabled: "{{ matrix_playbook_traefik_labels_enabled }}"
  4963. matrix_static_files_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  4964. matrix_static_files_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  4965. matrix_static_files_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  4966. matrix_static_files_container_labels_well_known_matrix_endpoint_traefik_hostname: "{{ matrix_server_fqn_matrix }}"
  4967. # Base domain serving is not enabled by default (see `matrix_static_files_container_labels_base_domain_enabled`),
  4968. # but we pass the hostname, so that enabling it is easy.
  4969. matrix_static_files_container_labels_base_domain_traefik_hostname: "{{ matrix_domain }}"
  4970. # If we're not serving a static webpage, serve a redirect instead of a 404.
  4971. matrix_static_files_container_labels_base_domain_root_path_redirection_enabled: "{{ not matrix_static_files_file_index_html_enabled }}"
  4972. matrix_static_files_container_labels_base_domain_root_path_redirection_url: "{{ ('https://' if matrix_playbook_ssl_enabled else 'http://') + matrix_server_fqn_matrix }}/${1}"
  4973. matrix_static_files_file_matrix_client_property_io_element_jitsi_preferred_domain: "{{ matrix_server_fqn_jitsi if jitsi_enabled else '' }}"
  4974. matrix_static_files_file_matrix_client_property_org_matrix_msc2965_authentication_enabled: "{{ matrix_authentication_service_enabled }}"
  4975. matrix_static_files_file_matrix_client_property_org_matrix_msc2965_authentication_issuer: "{{ matrix_authentication_service_config_http_issuer if matrix_authentication_service_enabled else '' }}"
  4976. matrix_static_files_file_matrix_client_property_org_matrix_msc2965_authentication_account: "{{ matrix_authentication_service_account_management_url if matrix_authentication_service_enabled else '' }}"
  4977. matrix_static_files_file_matrix_client_property_m_tile_server_entries_enabled: "{{ matrix_client_element_location_sharing_enabled }}"
  4978. 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"
  4979. # 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.
  4980. matrix_static_files_file_matrix_client_property_cc_etke_ketesa_auto: "{{ matrix_ketesa_configuration if matrix_homeserver_implementation == 'synapse' else {} }}"
  4981. matrix_static_files_file_matrix_client_property_org_matrix_msc4143_rtc_foci_enabled: "{{ matrix_livekit_jwt_service_enabled }}"
  4982. matrix_static_files_file_matrix_client_property_org_matrix_msc4143_rtc_foci_auto: |-
  4983. {{
  4984. (
  4985. [{'type': 'livekit', 'livekit_service_url': matrix_livekit_jwt_service_public_url}] if matrix_livekit_jwt_service_enabled else []
  4986. )
  4987. }}
  4988. # Advertise all enabled and exposed mautrix bridges for auto-discovery by tools like Mautrix Manager.
  4989. # A bridge's public address is only reachable when the playbook attaches its Traefik labels and emits the exposure router,
  4990. # so we gate on these in addition to the bridge being enabled.
  4991. matrix_static_files_file_matrix_mautrix_property_fi_mau_bridges_auto: |-
  4992. {{
  4993. [
  4994. matrix_bridge_beeper_line_bridge_public_address if (matrix_bridge_beeper_line_enabled and matrix_bridge_beeper_line_container_labels_traefik_enabled and matrix_bridge_beeper_line_container_labels_exposure_enabled) else '',
  4995. matrix_bridge_mautrix_bluesky_appservice_public_address if (matrix_bridge_mautrix_bluesky_enabled and matrix_bridge_mautrix_bluesky_container_labels_traefik_enabled and matrix_bridge_mautrix_bluesky_container_labels_exposure_enabled) else '',
  4996. matrix_bridge_mautrix_gmessages_bridge_public_address if (matrix_bridge_mautrix_gmessages_enabled and matrix_bridge_mautrix_gmessages_container_labels_traefik_enabled and matrix_bridge_mautrix_gmessages_container_labels_exposure_enabled) else '',
  4997. matrix_bridge_mautrix_gvoice_bridge_public_address if (matrix_bridge_mautrix_gvoice_enabled and matrix_bridge_mautrix_gvoice_container_labels_traefik_enabled and matrix_bridge_mautrix_gvoice_container_labels_exposure_enabled) else '',
  4998. matrix_bridge_mautrix_linkedin_bridge_public_address if (matrix_bridge_mautrix_linkedin_enabled and matrix_bridge_mautrix_linkedin_container_labels_traefik_enabled and matrix_bridge_mautrix_linkedin_container_labels_exposure_enabled) else '',
  4999. matrix_bridge_mautrix_meta_instagram_bridge_public_address if (matrix_bridge_mautrix_meta_instagram_enabled and matrix_bridge_mautrix_meta_instagram_container_labels_traefik_enabled and matrix_bridge_mautrix_meta_instagram_container_labels_exposure_enabled) else '',
  5000. matrix_bridge_mautrix_meta_messenger_bridge_public_address if (matrix_bridge_mautrix_meta_messenger_enabled and matrix_bridge_mautrix_meta_messenger_container_labels_traefik_enabled and matrix_bridge_mautrix_meta_messenger_container_labels_exposure_enabled) else '',
  5001. matrix_bridge_mautrix_signal_bridge_public_address if (matrix_bridge_mautrix_signal_enabled and matrix_bridge_mautrix_signal_container_labels_traefik_enabled and matrix_bridge_mautrix_signal_container_labels_exposure_enabled) else '',
  5002. matrix_bridge_mautrix_slack_bridge_public_address if (matrix_bridge_mautrix_slack_enabled and matrix_bridge_mautrix_slack_container_labels_traefik_enabled and matrix_bridge_mautrix_slack_container_labels_exposure_enabled) else '',
  5003. matrix_bridge_mautrix_telegram_bridge_public_address if (matrix_bridge_mautrix_telegram_enabled and matrix_bridge_mautrix_telegram_container_labels_traefik_enabled and matrix_bridge_mautrix_telegram_container_labels_exposure_enabled) else '',
  5004. matrix_bridge_mautrix_twitter_appservice_public_address if (matrix_bridge_mautrix_twitter_enabled and matrix_bridge_mautrix_twitter_container_labels_traefik_enabled and matrix_bridge_mautrix_twitter_container_labels_exposure_enabled) else '',
  5005. matrix_bridge_mautrix_whatsapp_bridge_public_address if (matrix_bridge_mautrix_whatsapp_enabled and matrix_bridge_mautrix_whatsapp_container_labels_traefik_enabled and matrix_bridge_mautrix_whatsapp_container_labels_exposure_enabled) else '',
  5006. ] | select | list
  5007. }}
  5008. matrix_static_files_file_matrix_server_property_m_server: "{{ matrix_server_fqn_matrix_federation }}:{{ matrix_federation_public_port }}"
  5009. matrix_static_files_scheme: "{{ 'https' if matrix_playbook_ssl_enabled else 'http' }}"
  5010. matrix_static_files_self_check_hostname_matrix: "{{ matrix_server_fqn_matrix }}"
  5011. matrix_static_files_self_check_hostname_identity: "{{ matrix_domain }}"
  5012. ########################################################################
  5013. # #
  5014. # /matrix-static-files #
  5015. # #
  5016. ########################################################################
  5017. ########################################################################
  5018. # #
  5019. # container-socket-proxy #
  5020. # #
  5021. ########################################################################
  5022. container_socket_proxy_enabled: "{{ matrix_playbook_reverse_proxy_type == 'playbook-managed-traefik' }}"
  5023. container_socket_proxy_identifier: matrix-container-socket-proxy
  5024. container_socket_proxy_base_path: "{{ matrix_base_data_path }}/container-socket-proxy"
  5025. container_socket_proxy_uid: "{{ matrix_user_uid }}"
  5026. container_socket_proxy_gid: "{{ matrix_user_gid }}"
  5027. # Traefik requires read access to the containers APIs to do its job
  5028. container_socket_proxy_api_containers_enabled: true
  5029. 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 }}"
  5030. ########################################################################
  5031. # #
  5032. # /container-socket-proxy #
  5033. # #
  5034. ########################################################################
  5035. ########################################################################
  5036. # #
  5037. # traefik #
  5038. # #
  5039. ########################################################################
  5040. traefik_enabled: "{{ matrix_playbook_reverse_proxy_type == 'playbook-managed-traefik' }}"
  5041. traefik_identifier: matrix-traefik
  5042. traefik_base_path: "{{ matrix_base_data_path }}/traefik"
  5043. traefik_uid: "{{ matrix_user_uid }}"
  5044. traefik_gid: "{{ matrix_user_gid }}"
  5045. # It's common for setups to deal with large file uploads which may take longer than the default readTimeout (60s).
  5046. # This override (for the `web` entrypoint) also cascades to overriding the `web-secure` entrypoint and the `matrix-federation` entrypoint.
  5047. traefik_config_entrypoint_web_transport_respondingTimeouts_readTimeout: 300s
  5048. traefik_additional_entrypoints_auto: |
  5049. {{
  5050. ([matrix_playbook_public_matrix_federation_api_traefik_entrypoint_definition] if matrix_playbook_public_matrix_federation_api_traefik_entrypoint_enabled else [])
  5051. +
  5052. ([matrix_playbook_internal_matrix_client_api_traefik_entrypoint_definition] if matrix_playbook_internal_matrix_client_api_traefik_entrypoint_enabled else [])
  5053. +
  5054. ([matrix_playbook_livekit_turn_traefik_entrypoint_definition] if matrix_playbook_livekit_turn_traefik_entrypoint_enabled else [])
  5055. }}
  5056. traefik_config_providers_docker_endpoint: "{{ container_socket_proxy_endpoint if container_socket_proxy_enabled else 'unix:///var/run/docker.sock' }}"
  5057. 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 }}"
  5058. traefik_container_additional_networks_auto: |
  5059. {{
  5060. ([container_socket_proxy_container_network] if container_socket_proxy_enabled else [])
  5061. }}
  5062. traefik_systemd_required_services_list: |
  5063. {{
  5064. ([devture_systemd_docker_base_docker_service_name])
  5065. +
  5066. ([container_socket_proxy_identifier + '.service'] if container_socket_proxy_enabled else [])
  5067. }}
  5068. traefik_additional_domains_to_obtain_certificates_for_auto: |
  5069. {{
  5070. ([coturn_hostname] if (coturn_enabled and coturn_tls_enabled and coturn_hostname != matrix_server_fqn_matrix) else [])
  5071. }}
  5072. ########################################################################
  5073. # #
  5074. # /traefik #
  5075. # #
  5076. ########################################################################
  5077. ########################################################################
  5078. # #
  5079. # traefik_certs_dumper #
  5080. # #
  5081. ########################################################################
  5082. 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' }}"
  5083. traefik_certs_dumper_identifier: matrix-traefik-certs-dumper
  5084. traefik_certs_dumper_base_path: "{{ matrix_base_data_path }}/traefik-certs-dumper"
  5085. traefik_certs_dumper_uid: "{{ matrix_user_uid }}"
  5086. traefik_certs_dumper_gid: "{{ matrix_user_gid }}"
  5087. traefik_certs_dumper_ssl_path: "{{ traefik_ssl_dir_path if traefik_enabled else '' }}"
  5088. # We make the certs dumper require the Traefik service (not just docker.service),
  5089. # because when both restart simultaneously (e.g. in all-at-once mode), Traefik may
  5090. # momentarily truncate or reinitialize acme.json, causing the certs dumper to read
  5091. # an empty file and panic. By requiring Traefik, the certs dumper only starts after
  5092. # Traefik is fully ready and acme.json is stable.
  5093. traefik_certs_dumper_systemd_required_services_list_auto: |
  5094. {{
  5095. ([traefik_identifier + '.service'] if traefik_enabled else [])
  5096. }}
  5097. 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 }}"
  5098. ########################################################################
  5099. # #
  5100. # /traefik_certs_dumper #
  5101. # #
  5102. ########################################################################
  5103. ########################################################################
  5104. # #
  5105. # matrix-element-admin #
  5106. # #
  5107. ########################################################################
  5108. # We don't enable this by default.
  5109. matrix_element_admin_enabled: false
  5110. matrix_element_admin_scheme: "{{ 'https' if matrix_playbook_ssl_enabled else 'http' }}"
  5111. 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 }}"
  5112. matrix_element_admin_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm64'] }}"
  5113. matrix_element_admin_container_network: "{{ matrix_addons_container_network }}"
  5114. matrix_element_admin_container_additional_networks_auto: |-
  5115. {{
  5116. (
  5117. ([] if matrix_addons_homeserver_container_network == '' else [matrix_addons_homeserver_container_network])
  5118. +
  5119. ([matrix_playbook_reverse_proxyable_services_additional_network] if (matrix_playbook_reverse_proxyable_services_additional_network and matrix_element_admin_container_labels_traefik_enabled) else [])
  5120. ) | unique
  5121. }}
  5122. matrix_element_admin_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  5123. matrix_element_admin_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  5124. matrix_element_admin_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  5125. matrix_element_admin_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  5126. matrix_element_admin_systemd_required_services_list_auto: "{{ matrix_addons_homeserver_systemd_services_list }}"
  5127. ######################################################################
  5128. # #
  5129. # /matrix-element-admin #
  5130. # #
  5131. ######################################################################
  5132. ########################################################################
  5133. # #
  5134. # matrix-element-call #
  5135. # #
  5136. ########################################################################
  5137. matrix_element_call_enabled: false
  5138. matrix_element_call_scheme: "{{ 'https' if matrix_playbook_ssl_enabled else 'http' }}"
  5139. matrix_element_call_container_network: "{{ matrix_addons_container_network }}"
  5140. 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 }}"
  5141. 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 [] }}"
  5142. matrix_element_call_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  5143. matrix_element_call_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  5144. matrix_element_call_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  5145. matrix_element_call_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  5146. matrix_element_call_config_livekit_livekit_service_url: "{{ matrix_livekit_jwt_service_public_url if matrix_livekit_jwt_service_enabled else '' }}"
  5147. ########################################################################
  5148. # #
  5149. # /matrix-element-call #
  5150. # #
  5151. ########################################################################
  5152. ########################################################################
  5153. # #
  5154. # livekit-server #
  5155. # #
  5156. ########################################################################
  5157. livekit_server_enabled: "{{ matrix_rtc_enabled }}"
  5158. livekit_server_identifier: matrix-livekit-server
  5159. livekit_server_uid: "{{ matrix_user_uid }}"
  5160. livekit_server_gid: "{{ matrix_user_gid }}"
  5161. livekit_server_base_path: "{{ matrix_base_data_path }}/livekit-server"
  5162. livekit_server_hostname: "{{ matrix_server_fqn_matrix }}"
  5163. livekit_server_path_prefix: "/livekit-server"
  5164. livekit_server_container_image_self_build: "{{ matrix_architecture not in ['arm64', 'amd64'] }}"
  5165. 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 }}"
  5166. livekit_server_container_network: "{{ matrix_addons_container_network }}"
  5167. 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 [] }}"
  5168. # We expose LiveKit TURN/TLS via Traefik on a dedicated TCP entrypoint.
  5169. 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 }}"
  5170. matrix_playbook_livekit_turn_traefik_entrypoint_port: "{{ livekit_server_config_turn_tls_port }}"
  5171. 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) }}"
  5172. livekit_server_container_additional_volumes_auto: |
  5173. {{
  5174. (
  5175. [
  5176. {
  5177. 'src': (traefik_certs_dumper_dumped_certificates_path + '/' + livekit_server_config_turn_domain + '/certificate.crt'),
  5178. 'dst': livekit_server_config_turn_cert_file,
  5179. 'options': 'ro',
  5180. },
  5181. {
  5182. 'src': (traefik_certs_dumper_dumped_certificates_path + '/' + livekit_server_config_turn_domain + '/privatekey.key'),
  5183. 'dst': livekit_server_config_turn_key_file,
  5184. 'options': 'ro',
  5185. },
  5186. ] 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 []
  5187. )
  5188. }}
  5189. livekit_server_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  5190. livekit_server_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  5191. livekit_server_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  5192. livekit_server_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  5193. livekit_server_container_labels_turn_traefik_enabled: "{{ matrix_playbook_livekit_turn_traefik_entrypoint_enabled }}"
  5194. livekit_server_container_labels_turn_traefik_entrypoints: "{{ matrix_playbook_livekit_turn_traefik_entrypoint_name }}"
  5195. livekit_server_container_labels_turn_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  5196. livekit_server_container_labels_public_metrics_middleware_basic_auth_enabled: "{{ matrix_metrics_exposure_http_basic_auth_enabled }}"
  5197. livekit_server_container_labels_public_metrics_middleware_basic_auth_users: "{{ matrix_metrics_exposure_http_basic_auth_users }}"
  5198. livekit_server_metrics_proxying_enabled: "{{ livekit_server_config_prometheus_enabled and matrix_metrics_exposure_enabled }}"
  5199. livekit_server_metrics_proxying_hostname: "{{ matrix_metrics_exposure_hostname }}"
  5200. livekit_server_metrics_proxying_path_prefix: "{{ matrix_metrics_exposure_path_prefix }}/livekit-server"
  5201. livekit_server_config_prometheus_enabled: "{{ prometheus_enabled or matrix_metrics_exposure_enabled }}"
  5202. livekit_server_config_keys_auto: |-
  5203. {{
  5204. {}
  5205. | combine(
  5206. {matrix_livekit_jwt_service_environment_variable_livekit_key: matrix_livekit_jwt_service_environment_variable_livekit_secret}
  5207. if matrix_livekit_jwt_service_enabled else {}
  5208. )
  5209. }}
  5210. # We only wish for matrix-livekit-jwt-service to create rooms, only for users on trusted homeservers.
  5211. # See `matrix_livekit_jwt_service_environment_variable_livekit_full_access_homeservers`.
  5212. #
  5213. # Ref:
  5214. # - https://github.com/element-hq/lk-jwt-service/releases/tag/v0.3.0
  5215. # - https://github.com/livekit/livekit/blob/5e483e7554e5afbf254acf84e3ec0aa6e108e758/config-sample.yaml#L168-L170
  5216. # - https://github.com/mother-of-all-self-hosting/ansible-role-livekit-server/commit/2a1b04552634097bdd26d472502a8f5bf1b8528f
  5217. livekit_server_config_room_auto_create: false
  5218. # The playbook intentionally uses a non-standard port than the default used by the role (5349),
  5219. # because Coturn is already using that port.
  5220. # Note that TURN is not enabled by default. See `livekit_server_config_turn_enabled`.
  5221. livekit_server_config_turn_tls_port: 5350
  5222. # The playbook intentionally uses a non-standard port than the default used by the role (3478),
  5223. # because Coturn is already using that port.
  5224. # Note that TURN is not enabled by default. See `livekit_server_config_turn_enabled`.
  5225. livekit_server_config_turn_udp_port: 3479
  5226. # In this mode, Traefik terminates TURN/TLS and forwards plaintext TCP to LiveKit's `turn.tls_port`.
  5227. # We only enable it automatically when Traefik is managed by this playbook.
  5228. livekit_server_config_turn_external_tls: "{{ matrix_playbook_reverse_proxy_type == 'playbook-managed-traefik' and matrix_playbook_ssl_enabled }}"
  5229. # TURN stays enabled for either mode:
  5230. # - external TLS termination by playbook-managed Traefik
  5231. # - in-container TLS using certificates from Traefik Certs Dumper
  5232. 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) }}"
  5233. livekit_server_config_turn_cert_file: |-
  5234. {{
  5235. {
  5236. 'playbook-managed-traefik': ('/certificate.crt' if traefik_certs_dumper_enabled and not (livekit_server_config_turn_external_tls | bool) else ''),
  5237. 'other-traefik-container': ('/certificate.crt' if traefik_certs_dumper_enabled and not (livekit_server_config_turn_external_tls | bool) else ''),
  5238. 'none': '',
  5239. }[matrix_playbook_reverse_proxy_type]
  5240. }}
  5241. livekit_server_config_turn_key_file: |-
  5242. {{
  5243. {
  5244. 'playbook-managed-traefik': ('/privatekey.key' if traefik_certs_dumper_enabled and not (livekit_server_config_turn_external_tls | bool) else ''),
  5245. 'other-traefik-container': ('/privatekey.key' if traefik_certs_dumper_enabled and not (livekit_server_config_turn_external_tls | bool) else ''),
  5246. 'none': '',
  5247. }[matrix_playbook_reverse_proxy_type]
  5248. }}
  5249. livekit_server_systemd_required_services_list_auto: |
  5250. {{
  5251. ([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 [])
  5252. }}
  5253. ########################################################################
  5254. # #
  5255. # /livekit-server #
  5256. # #
  5257. ########################################################################
  5258. ########################################################################
  5259. # #
  5260. # matrix-livekit-jwt-service #
  5261. # #
  5262. ########################################################################
  5263. matrix_livekit_jwt_service_enabled: "{{ matrix_rtc_enabled and livekit_server_enabled }}"
  5264. matrix_livekit_jwt_service_scheme: "{{ 'https' if matrix_playbook_ssl_enabled else 'http' }}"
  5265. matrix_livekit_jwt_service_hostname: "{{ matrix_server_fqn_matrix }}"
  5266. matrix_livekit_jwt_service_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm64'] }}"
  5267. 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 }}"
  5268. matrix_livekit_jwt_service_container_network: "{{ matrix_addons_container_network }}"
  5269. matrix_livekit_jwt_service_container_additional_networks_auto: |
  5270. {{
  5271. ([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 [])
  5272. }}
  5273. matrix_livekit_jwt_service_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  5274. matrix_livekit_jwt_service_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  5275. matrix_livekit_jwt_service_container_labels_traefik_entrypoints: "{{ traefik_entrypoint_primary }}"
  5276. matrix_livekit_jwt_service_container_labels_traefik_tls_certResolver: "{{ traefik_certResolver_primary }}"
  5277. matrix_livekit_jwt_service_environment_variable_livekit_url: "{{ livekit_server_websocket_public_url }}"
  5278. matrix_livekit_jwt_service_environment_variable_livekit_key: "{{ (matrix_homeserver_generic_secret_key + ':lk.key') | hash('sha512') | to_uuid }}"
  5279. matrix_livekit_jwt_service_environment_variable_livekit_secret: "{{ (matrix_homeserver_generic_secret_key + ':lk.secret') | hash('sha512') | to_uuid }}"
  5280. ########################################################################
  5281. # #
  5282. # /matrix-livekit-jwt-service #
  5283. # #
  5284. ########################################################################