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.
 
 

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