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

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