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

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