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

6176 wiersze
323 KiB

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