Matrix Docker Ansible eploy
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
 
 

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