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

6318 Zeilen
331 KiB

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