Matrix Docker Ansible eploy
25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

6281 lines
330 KiB

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