Matrix Docker Ansible eploy
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

4179 lines
209 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. # Controls the additional network that reverse-proxyable services will be connected to.
  23. matrix_playbook_reverse_proxyable_services_additional_network: "{{ devture_traefik_container_network if devture_traefik_enabled else '' }}"
  24. matrix_playbook_ssl_retrieval_method: "{{ 'lets-encrypt' if devture_traefik_certs_dumper_enabled else matrix_ssl_retrieval_method }}"
  25. matrix_playbook_ssl_enabled: "{{ matrix_playbook_ssl_retrieval_method in ['lets-encrypt', 'self-signed', 'manually-managed'] }}"
  26. ########################################################################
  27. # #
  28. # /Playbook #
  29. # #
  30. ########################################################################
  31. ########################################################################
  32. # #
  33. # aux #
  34. # #
  35. ########################################################################
  36. aux_directory_default_owner: "{{ matrix_user_username }}"
  37. aux_directory_default_group: "{{ matrix_user_groupname }}"
  38. aux_file_default_owner: "{{ matrix_user_username }}"
  39. aux_file_default_group: "{{ matrix_user_groupname }}"
  40. ########################################################################
  41. # #
  42. # /aux #
  43. # #
  44. ########################################################################
  45. ########################################################################
  46. # #
  47. # base #
  48. # #
  49. ########################################################################
  50. matrix_homeserver_container_extra_arguments_auto: |
  51. {{
  52. (['--mount type=bind,src=' + matrix_appservice_discord_config_path + '/registration.yaml,dst=/matrix-appservice-discord-registration.yaml,ro'] if matrix_appservice_discord_enabled else [])
  53. +
  54. (['--mount type=bind,src=' + matrix_appservice_irc_config_path + '/registration.yaml,dst=/matrix-appservice-irc-registration.yaml,ro'] if matrix_appservice_irc_enabled else [])
  55. +
  56. (['--mount type=bind,src=' + matrix_appservice_kakaotalk_config_path + '/registration.yaml,dst=/matrix-appservice-kakaotalk-registration.yaml,ro'] if matrix_appservice_kakaotalk_enabled else [])
  57. +
  58. (['--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 [])
  59. +
  60. (['--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 [])
  61. +
  62. (['--mount type=bind,src=' + matrix_beeper_linkedin_config_path + '/registration.yaml,dst=/matrix-beeper-linkedin-registration.yaml,ro'] if matrix_beeper_linkedin_enabled else [])
  63. +
  64. (['--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 [])
  65. +
  66. (['--mount type=bind,src=' + matrix_heisenbridge_base_path + '/registration.yaml,dst=/heisenbridge-registration.yaml,ro'] if matrix_heisenbridge_enabled else [])
  67. +
  68. (['--mount type=bind,src=' + matrix_hookshot_base_path + '/registration.yml,dst=/hookshot-registration.yml,ro'] if matrix_hookshot_enabled else [])
  69. +
  70. (['--mount type=bind,src=' + matrix_mautrix_discord_config_path + '/registration.yaml,dst=/matrix-mautrix-discord-registration.yaml,ro'] if matrix_mautrix_discord_enabled else [])
  71. +
  72. (['--mount type=bind,src=' + matrix_mautrix_slack_config_path + '/registration.yaml,dst=/matrix-mautrix-slack-registration.yaml,ro'] if matrix_mautrix_slack_enabled else [])
  73. +
  74. (['--mount type=bind,src=' + matrix_mautrix_facebook_config_path + '/registration.yaml,dst=/matrix-mautrix-facebook-registration.yaml,ro'] if matrix_mautrix_facebook_enabled else [])
  75. +
  76. (['--mount type=bind,src=' + matrix_mautrix_googlechat_config_path + '/registration.yaml,dst=/matrix-mautrix-googlechat-registration.yaml,ro'] if matrix_mautrix_googlechat_enabled else [])
  77. +
  78. (['--mount type=bind,src=' + matrix_mautrix_hangouts_config_path + '/registration.yaml,dst=/matrix-mautrix-hangouts-registration.yaml,ro'] if matrix_mautrix_hangouts_enabled else [])
  79. +
  80. (['--mount type=bind,src=' + matrix_mautrix_instagram_config_path + '/registration.yaml,dst=/matrix-mautrix-instagram-registration.yaml,ro'] if matrix_mautrix_instagram_enabled else [])
  81. +
  82. (['--mount type=bind,src=' + matrix_mautrix_signal_config_path + '/registration.yaml,dst=/matrix-mautrix-signal-registration.yaml,ro'] if matrix_mautrix_signal_enabled else [])
  83. +
  84. (['--mount type=bind,src=' + matrix_mautrix_telegram_config_path + '/registration.yaml,dst=/matrix-mautrix-telegram-registration.yaml,ro'] if matrix_mautrix_telegram_enabled else [])
  85. +
  86. (['--mount type=bind,src=' + matrix_mautrix_twitter_config_path + '/registration.yaml,dst=/matrix-mautrix-twitter-registration.yaml,ro'] if matrix_mautrix_twitter_enabled else [])
  87. +
  88. (['--mount type=bind,src=' + matrix_mautrix_whatsapp_config_path + '/registration.yaml,dst=/matrix-mautrix-whatsapp-registration.yaml,ro'] if matrix_mautrix_whatsapp_enabled else [])
  89. +
  90. (['--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 [])
  91. +
  92. (['--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 [])
  93. +
  94. (['--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 [])
  95. +
  96. (['--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 [])
  97. +
  98. (['--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 [])
  99. +
  100. (['--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 [])
  101. +
  102. (['--mount type=bind,src=' + matrix_sms_bridge_config_path + '/registration.yaml,dst=/matrix-sms-bridge-registration.yaml,ro'] if matrix_sms_bridge_enabled else [])
  103. +
  104. (['--mount type=bind,src=' + matrix_cactus_comments_app_service_config_file + ',dst=/matrix-cactus-comments.yaml,ro'] if matrix_cactus_comments_enabled else [])
  105. }}
  106. matrix_homeserver_app_service_config_files_auto: |
  107. {{
  108. (['/matrix-appservice-discord-registration.yaml'] if matrix_appservice_discord_enabled else [])
  109. +
  110. (['/matrix-appservice-irc-registration.yaml'] if matrix_appservice_irc_enabled else [])
  111. +
  112. (['/matrix-appservice-kakaotalk-registration.yaml'] if matrix_appservice_kakaotalk_enabled else [])
  113. +
  114. (['/matrix-appservice-slack-registration.yaml'] if matrix_appservice_slack_enabled else [])
  115. +
  116. (['/matrix-appservice-webhooks-registration.yaml'] if matrix_appservice_webhooks_enabled else [])
  117. +
  118. (['/matrix-beeper-linkedin-registration.yaml'] if matrix_beeper_linkedin_enabled else [])
  119. +
  120. (['/matrix-go-skype-bridge-registration.yaml'] if matrix_go_skype_bridge_enabled else [])
  121. +
  122. (['/heisenbridge-registration.yaml'] if matrix_heisenbridge_enabled else [])
  123. +
  124. (['/hookshot-registration.yml'] if matrix_hookshot_enabled else [])
  125. +
  126. (['/matrix-mautrix-discord-registration.yaml'] if matrix_mautrix_discord_enabled else [])
  127. +
  128. (['/matrix-mautrix-slack-registration.yaml'] if matrix_mautrix_slack_enabled else [])
  129. +
  130. (['/matrix-mautrix-facebook-registration.yaml'] if matrix_mautrix_facebook_enabled else [])
  131. +
  132. (['/matrix-mautrix-googlechat-registration.yaml'] if matrix_mautrix_googlechat_enabled else [])
  133. +
  134. (['/matrix-mautrix-hangouts-registration.yaml'] if matrix_mautrix_hangouts_enabled else [])
  135. +
  136. (['/matrix-mautrix-instagram-registration.yaml'] if matrix_mautrix_instagram_enabled else [])
  137. +
  138. (['/matrix-mautrix-signal-registration.yaml'] if matrix_mautrix_signal_enabled else [])
  139. +
  140. (['/matrix-mautrix-telegram-registration.yaml'] if matrix_mautrix_telegram_enabled else [])
  141. +
  142. (['/matrix-mautrix-twitter-registration.yaml'] if matrix_mautrix_twitter_enabled else [])
  143. +
  144. (['/matrix-mautrix-whatsapp-registration.yaml'] if matrix_mautrix_whatsapp_enabled else [])
  145. +
  146. (['/matrix-mx-puppet-discord-registration.yaml'] if matrix_mx_puppet_discord_enabled else [])
  147. +
  148. (['/matrix-mx-puppet-groupme-registration.yaml'] if matrix_mx_puppet_groupme_enabled else [])
  149. +
  150. (['/matrix-mx-puppet-instagram-registration.yaml'] if matrix_mx_puppet_instagram_enabled else [])
  151. +
  152. (['/matrix-mx-puppet-slack-registration.yaml'] if matrix_mx_puppet_slack_enabled else [])
  153. +
  154. (['/matrix-mx-puppet-steam-registration.yaml'] if matrix_mx_puppet_steam_enabled else [])
  155. +
  156. (['/matrix-mx-puppet-twitter-registration.yaml'] if matrix_mx_puppet_twitter_enabled else [])
  157. +
  158. (['/matrix-sms-bridge-registration.yaml'] if matrix_sms_bridge_enabled else [])
  159. +
  160. (['/matrix-cactus-comments.yaml'] if matrix_cactus_comments_enabled else [])
  161. }}
  162. ########################################################################
  163. # #
  164. # /base #
  165. # #
  166. ########################################################################
  167. ########################################################################
  168. # #
  169. # com.devture.ansible.role.systemd_service_manager #
  170. # #
  171. ########################################################################
  172. # This list is not exhaustive and final.
  173. # Synapse workers are still injected into the list at runtime.
  174. # Additional JVB workers (jitsi_jvb.yml -- roles/galaxy/jitsi/tasks/init_additional_jvb.yml) override this variable at runtime as well.
  175. #
  176. # Priority levels are like this:
  177. # - core services (the homeserver) get a level of ~1000
  178. # - services that core services depend on (database, Redis, ntfy, etc.) get a lower level - between 500 and 1000
  179. # - reverse-proxying services get level 3000
  180. # - Matrix utility services (bridges, bots) get a level of 2000/2200, so that:
  181. # - they can start before the reverse-proxy
  182. # - so that, when the reverse-proxy is up (Matrix is up), all bots and bridges can be interacted with
  183. # - monitoring services (Prometheus, Grafana, ..) get a level of 4000 - they can start later than all-of-Matrix
  184. # - services which aren't time-sensitive (various crons and timers) get a level of 5000 - they can start later than all-of-Matrix
  185. #
  186. # `matrix-bot-postmoogle.service` has a higher priority number (4000), unlike other bots' priority (2200),
  187. # because it requires SSL certificates. If Traefik is used, then Postmoogle needs to start at least after Traefik (3500) and Traefik certs dumper (3500).
  188. devture_systemd_service_manager_services_list_auto: |
  189. {{
  190. ([{'name': (backup_borg_identifier + '.timer'), 'priority': 5000, 'groups': ['matrix', 'backup', 'borg']}] if backup_borg_enabled else [])
  191. +
  192. ([{'name': 'matrix-bot-buscarron.service', 'priority': 2200, 'groups': ['matrix', 'bots', 'buscarron', 'bot-buscarron']}] if matrix_bot_buscarron_enabled else [])
  193. +
  194. ([{'name': 'matrix-bot-go-neb.service', 'priority': 2200, 'groups': ['matrix', 'bots', 'go-neb', 'bot-go-neb']}] if matrix_bot_go_neb_enabled else [])
  195. +
  196. ([{'name': 'matrix-bot-honoroit.service', 'priority': 2200, 'groups': ['matrix', 'bots', 'honoroit', 'bot-honoroit']}] if matrix_bot_honoroit_enabled else [])
  197. +
  198. ([{'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 [])
  199. +
  200. ([{'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 [])
  201. +
  202. ([{'name': 'matrix-bot-maubot.service', 'priority': 2200, 'groups': ['matrix', 'bots', 'maubot', 'bot-maubot']}] if matrix_bot_maubot_enabled else [])
  203. +
  204. ([{'name': 'matrix-bot-mjolnir.service', 'priority': 4000, 'groups': ['matrix', 'bots', 'mjolnir', 'bot-mjolnir']}] if matrix_bot_mjolnir_enabled else [])
  205. +
  206. ([{'name': 'matrix-bot-draupnir.service', 'priority': 4000, 'groups': ['matrix', 'bots', 'draupnir', 'bot-draupnir']}] if matrix_bot_draupnir_enabled else [])
  207. +
  208. ([{'name': 'matrix-bot-postmoogle.service', 'priority': 4000, 'groups': ['matrix', 'bots', 'postmoogle', 'bot-postmoogle']}] if matrix_bot_postmoogle_enabled else [])
  209. +
  210. ([{'name': 'matrix-bot-chatgpt.service', 'priority': 2200, 'groups': ['matrix', 'bots', 'chatgpt', 'bot-chatgpt']}] if matrix_bot_chatgpt_enabled else [])
  211. +
  212. ([{'name': 'matrix-appservice-discord.service', 'priority': 2000, 'groups': ['matrix', 'bridges', 'appservice-discord']}] if matrix_appservice_discord_enabled else [])
  213. +
  214. ([{'name': 'matrix-appservice-irc.service', 'priority': 2000, 'groups': ['matrix', 'bridges', 'appservice-irc']}] if matrix_appservice_irc_enabled else [])
  215. +
  216. ([{'name': 'matrix-appservice-kakaotalk.service', 'priority': 2000, 'groups': ['matrix', 'bridges', 'appservice-kakaotalk']}] if matrix_appservice_kakaotalk_enabled else [])
  217. +
  218. ([{'name': 'matrix-appservice-kakaotalk-node.service', 'priority': 1900, 'groups': ['matrix', 'bridges', 'appservice-kakaotalk', 'appservice-kakaotalk-node']}] if matrix_appservice_kakaotalk_enabled else [])
  219. +
  220. ([{'name': 'matrix-appservice-slack.service', 'priority': 2000, 'groups': ['matrix', 'bridges', 'appservice-slack']}] if matrix_appservice_slack_enabled else [])
  221. +
  222. ([{'name': 'matrix-appservice-webhooks.service', 'priority': 2000, 'groups': ['matrix', 'bridges', 'appservice-webhooks']}] if matrix_appservice_webhooks_enabled else [])
  223. +
  224. ([{'name': 'matrix-beeper-linkedin.service', 'priority': 2000, 'groups': ['matrix', 'bridges', 'beeper-linkedin']}] if matrix_beeper_linkedin_enabled else [])
  225. +
  226. ([{'name': 'matrix-go-skype-bridge.service', 'priority': 2000, 'groups': ['matrix', 'bridges', 'go-skype']}] if matrix_go_skype_bridge_enabled else [])
  227. +
  228. ([{'name': 'matrix-heisenbridge.service', 'priority': 2000, 'groups': ['matrix', 'bridges', 'heisenbridge']}] if matrix_heisenbridge_enabled else [])
  229. +
  230. ([{'name': 'matrix-hookshot.service', 'priority': 2000, 'groups': ['matrix', 'bridges', 'hookshot']}] if matrix_hookshot_enabled else [])
  231. +
  232. ([{'name': 'matrix-mautrix-discord.service', 'priority': 2000, 'groups': ['matrix', 'bridges', 'mautrix-discord']}] if matrix_mautrix_discord_enabled else [])
  233. +
  234. ([{'name': 'matrix-mautrix-slack.service', 'priority': 2000, 'groups': ['matrix', 'bridges', 'mautrix-slack']}] if matrix_mautrix_slack_enabled else [])
  235. +
  236. ([{'name': 'matrix-mautrix-facebook.service', 'priority': 2000, 'groups': ['matrix', 'bridges', 'mautrix-facebook']}] if matrix_mautrix_facebook_enabled else [])
  237. +
  238. ([{'name': 'matrix-mautrix-googlechat.service', 'priority': 2000, 'groups': ['matrix', 'bridges', 'mautrix-googlechat']}] if matrix_mautrix_googlechat_enabled else [])
  239. +
  240. ([{'name': 'matrix-mautrix-hangouts.service', 'priority': 2000, 'groups': ['matrix', 'bridges', 'mautrix-hangouts']}] if matrix_mautrix_hangouts_enabled else [])
  241. +
  242. ([{'name': 'matrix-mautrix-instagram.service', 'priority': 2000, 'groups': ['matrix', 'bridges', 'mautrix-instagram']}] if matrix_mautrix_instagram_enabled else [])
  243. +
  244. ([{'name': 'matrix-mautrix-signal.service', 'priority': 2000, 'groups': ['matrix', 'bridges', 'mautrix-signal']}] if matrix_mautrix_signal_enabled else [])
  245. +
  246. ([{'name': 'matrix-mautrix-signal-daemon.service', 'priority': 1900, 'groups': ['matrix', 'bridges', 'mautrix-signal', 'mautrix-signal-daemon']}] if matrix_mautrix_signal_enabled else [])
  247. +
  248. ([{'name': 'matrix-mautrix-telegram.service', 'priority': 2000, 'groups': ['matrix', 'bridges', 'mautrix-telegram']}] if matrix_mautrix_telegram_enabled else [])
  249. +
  250. ([{'name': 'matrix-mautrix-twitter.service', 'priority': 2000, 'groups': ['matrix', 'bridges', 'mautrix-twitter']}] if matrix_mautrix_twitter_enabled else [])
  251. +
  252. ([{'name': 'matrix-mautrix-whatsapp.service', 'priority': 2000, 'groups': ['matrix', 'bridges', 'mautrix-whatsapp']}] if matrix_mautrix_whatsapp_enabled else [])
  253. +
  254. ([{'name': 'matrix-mx-puppet-discord.service', 'priority': 2000, 'groups': ['matrix', 'bridges', 'mx-puppet-discord']}] if matrix_mx_puppet_discord_enabled else [])
  255. +
  256. ([{'name': 'matrix-mx-puppet-groupme.service', 'priority': 2000, 'groups': ['matrix', 'bridges', 'mx-puppet-groupme']}] if matrix_mx_puppet_groupme_enabled else [])
  257. +
  258. ([{'name': 'matrix-mx-puppet-instagram.service', 'priority': 2000, 'groups': ['matrix', 'bridges', 'mx-puppet-instagram']}] if matrix_mx_puppet_instagram_enabled else [])
  259. +
  260. ([{'name': 'matrix-mx-puppet-slack.service', 'priority': 2000, 'groups': ['matrix', 'bridges', 'mx-puppet-slack']}] if matrix_mx_puppet_slack_enabled else [])
  261. +
  262. ([{'name': 'matrix-mx-puppet-steam.service', 'priority': 2000, 'groups': ['matrix', 'bridges', 'mx-puppet-steam']}] if matrix_mx_puppet_steam_enabled else [])
  263. +
  264. ([{'name': 'matrix-mx-puppet-twitter.service', 'priority': 2000, 'groups': ['matrix', 'bridges', 'mx-puppet-twitter']}] if matrix_mx_puppet_twitter_enabled else [])
  265. +
  266. ([{'name': 'matrix-sms-bridge.service', 'priority': 2000, 'groups': ['matrix', 'bridges', 'sms']}] if matrix_sms_bridge_enabled else [])
  267. +
  268. ([{'name': 'matrix-cactus-comments.service', 'priority': 2000, 'groups': ['matrix', 'cactus-comments']}] if matrix_cactus_comments_enabled else [])
  269. +
  270. ([{'name': 'matrix-client-cinny.service', 'priority': 2000, 'groups': ['matrix', 'clients', 'cinny', 'client-cinny']}] if matrix_client_cinny_enabled else [])
  271. +
  272. ([{'name': 'matrix-client-element.service', 'priority': 2000, 'groups': ['matrix', 'clients', 'element', 'client-element']}] if matrix_client_element_enabled else [])
  273. +
  274. ([{'name': 'matrix-client-hydrogen.service', 'priority': 2000, 'groups': ['matrix', 'clients', 'hydrogen', 'client-hydrogen']}] if matrix_client_hydrogen_enabled else [])
  275. +
  276. ([{'name': ('matrix-' + matrix_homeserver_implementation + '.service'), 'priority': 1000, 'groups': ['matrix', 'homeservers', matrix_homeserver_implementation]}] if matrix_homeserver_enabled else [])
  277. +
  278. ([{'name': 'matrix-corporal.service', 'priority': 1500, 'groups': ['matrix', 'corporal']}] if matrix_corporal_enabled else [])
  279. +
  280. ([{'name': 'matrix-coturn.service', 'priority': 4000, 'groups': ['matrix', 'coturn']}] if matrix_coturn_enabled else [])
  281. +
  282. ([{'name': 'matrix-rageshake.service', 'priority': 4000, 'groups': ['matrix', 'rageshake']}] if matrix_rageshake_enabled else [])
  283. +
  284. ([{'name': 'matrix-coturn-reload.timer', 'priority': 5000, 'groups': ['matrix', 'coturn']}] if (matrix_coturn_enabled and matrix_coturn_tls_enabled) else [])
  285. +
  286. ([{'name': 'matrix-dimension.service', 'priority': 4000, 'groups': ['matrix', 'integration-managers', 'dimension']}] if matrix_dimension_enabled else [])
  287. +
  288. ([{'name': 'matrix-dynamic-dns.service', 'priority': 5000, 'groups': ['matrix', 'dynamic-dns']}] if matrix_dynamic_dns_enabled else [])
  289. +
  290. ([{'name': 'matrix-email2matrix.service', 'priority': 2000, 'groups': ['matrix', 'bridges', 'email2matrix']}] if matrix_email2matrix_enabled else [])
  291. +
  292. ([{'name': (etherpad_identifier + '.service'), 'priority': 4000, 'groups': ['matrix', 'etherpad']}] if etherpad_enabled else [])
  293. +
  294. ([{'name': (grafana_identifier + '.service'), 'priority': 4000, 'groups': ['matrix', 'monitoring', 'grafana']}] if grafana_enabled else [])
  295. +
  296. ([{'name': (jitsi_identifier + '-web.service'), 'priority': 4200, 'groups': ['matrix', 'jitsi', 'jitsi-web']}] if jitsi_enabled else [])
  297. +
  298. ([{'name': (jitsi_identifier + '-prosody.service'), 'priority': 4000, 'groups': ['matrix', 'jitsi', 'jitsi-prosody']}] if jitsi_enabled else [])
  299. +
  300. ([{'name': (jitsi_identifier + '-jicofo.service'), 'priority': 4100, 'groups': ['matrix', 'jitsi', 'jitsi-jicofo']}] if jitsi_enabled else [])
  301. +
  302. ([{'name': (jitsi_identifier + '-jvb.service'), 'priority': 4100, 'groups': ['matrix', 'jitsi', 'jitsi-jvb']}] if jitsi_enabled else [])
  303. +
  304. ([{'name': 'matrix-ldap-registration-proxy.service', 'priority': 2000, 'groups': ['matrix', 'ldap-registration-proxy']}] if matrix_ldap_registration_proxy_enabled else [])
  305. +
  306. ([{'name': 'matrix-ma1sd.service', 'priority': 2000, 'groups': ['matrix', 'ma1sd']}] if matrix_ma1sd_enabled else [])
  307. +
  308. ([{'name': 'matrix-mailer.service', 'priority': 2000, 'groups': ['matrix', 'mailer']}] if matrix_mailer_enabled else [])
  309. +
  310. ([{'name': 'matrix-nginx-proxy.service', 'priority': 3000, 'groups': ['matrix', 'nginx', 'reverse-proxies']}] if matrix_nginx_proxy_enabled else [])
  311. +
  312. (matrix_ssl_renewal_systemd_units_list | selectattr('applicable') | selectattr('enableable') | list )
  313. +
  314. ([{'name': (ntfy_identifier + '.service'), 'priority': 800, 'groups': ['matrix', 'ntfy']}] if ntfy_enabled else [])
  315. +
  316. ([{'name': (devture_postgres_identifier + '.service'), 'priority': 500, 'groups': ['matrix', 'postgres']}] if devture_postgres_enabled else [])
  317. +
  318. ([{'name': (devture_postgres_backup_identifier + '.service'), 'priority': 5000, 'groups': ['matrix', 'backup', 'postgres-backup']}] if devture_postgres_backup_enabled else [])
  319. +
  320. ([{'name': (prometheus_identifier + '.service'), 'priority': 4000, 'groups': ['matrix', 'monitoring', 'prometheus']}] if prometheus_enabled else [])
  321. +
  322. ([{'name': (prometheus_node_exporter_identifier + '.service'), 'priority': 3900, 'groups': ['matrix', 'monitoring', 'prometheus-exporters', 'prometheus-node-exporter']}] if prometheus_node_exporter_enabled else [])
  323. +
  324. ([{'name': (prometheus_postgres_exporter_identifier + '.service'), 'priority': 3900, 'groups': ['matrix', 'monitoring', 'prometheus-exporters', 'prometheus-postgres-exporter']}] if prometheus_postgres_exporter_enabled else [])
  325. +
  326. ([{'name': 'matrix-prometheus-nginxlog-exporter.service', 'priority': 3900, 'groups': ['matrix', 'monitoring', 'prometheus-exporters', 'prometheus-nginxlog-exporter']}] if matrix_prometheus_nginxlog_exporter_enabled else [])
  327. +
  328. ([{'name': (redis_identifier + '.service'), 'priority': 750, 'groups': ['matrix', 'redis']}] if redis_enabled else [])
  329. +
  330. ([{'name': 'matrix-registration.service', 'priority': 4000, 'groups': ['matrix', 'registration']}] if matrix_registration_enabled else [])
  331. +
  332. ([{'name': 'matrix-sliding-sync.service', 'priority': 4000, 'groups': ['matrix', 'sliding-sync']}] if matrix_sliding_sync_enabled else [])
  333. +
  334. ([{'name': 'matrix-sygnal.service', 'priority': 800, 'groups': ['matrix', 'sygnal']}] if matrix_sygnal_enabled else [])
  335. +
  336. ([{'name': 'matrix-goofys.service', 'priority': 800, 'groups': ['matrix', 'goofys']}] if matrix_s3_media_store_enabled else [])
  337. +
  338. ([{'name': 'matrix-synapse-s3-storage-provider-migrate.timer', 'priority': 5000, 'groups': ['matrix']}] if matrix_synapse_ext_synapse_s3_storage_provider_enabled else [])
  339. +
  340. ([{'name': 'matrix-synapse-auto-compressor.timer', 'priority': 5000, 'groups': ['matrix', 'synapse-auto-compressor']}] if matrix_synapse_auto_compressor_enabled else [])
  341. +
  342. ([{'name': 'matrix-synapse-admin.service', 'priority': 4000, 'groups': ['matrix', 'synapse-admin']}] if matrix_synapse_admin_enabled else [])
  343. +
  344. ([{'name': 'matrix-synapse-reverse-proxy-companion.service', 'priority': 1500, 'groups': ['matrix', 'homeservers', 'synapse', 'reverse-proxies']}] if matrix_synapse_reverse_proxy_companion_enabled else [])
  345. +
  346. ([{'name': 'matrix-user-verification-service.service', 'priority': 800, 'groups': ['matrix', 'matrix-user-verification-service']}] if matrix_user_verification_service_enabled else [])
  347. +
  348. ([{'name': (devture_container_socket_proxy_identifier + '.service'), 'priority': 2900, 'groups': ['matrix', 'reverse-proxies', 'container-socket-proxy']}] if devture_container_socket_proxy_enabled else [])
  349. +
  350. ([{'name': (devture_traefik_identifier + '.service'), 'priority': 3000, 'groups': ['matrix', 'traefik', 'reverse-proxies']}] if devture_traefik_enabled else [])
  351. +
  352. ([{'name': (devture_traefik_certs_dumper_identifier + '.service'), 'priority': 3500, 'groups': ['matrix', 'traefik-certs-dumper']}] if devture_traefik_certs_dumper_enabled else [])
  353. }}
  354. ########################################################################
  355. # #
  356. # /com.devture.ansible.role.systemd_service_manager #
  357. # #
  358. ########################################################################
  359. ########################################################################
  360. # #
  361. # com.devture.ansible.role.timesync #
  362. # #
  363. ########################################################################
  364. # To completely disable installing systemd-timesyncd/ntpd, use `devture_timesync_installation_enabled: false`.
  365. ########################################################################
  366. # #
  367. # /com.devture.ansible.role.timesync #
  368. # #
  369. ########################################################################
  370. ######################################################################
  371. #
  372. # com.devture.ansible.role.playbook_state_preserver
  373. #
  374. ######################################################################
  375. # To completely disable this feature, use `devture_playbook_state_preserver_enabled: false`.
  376. devture_playbook_state_preserver_uid: "{{ matrix_user_uid }}"
  377. devture_playbook_state_preserver_gid: "{{ matrix_user_gid }}"
  378. devture_playbook_state_preserver_vars_preservation_dst: "{{ matrix_base_data_path }}/vars.yml"
  379. devture_playbook_state_preserver_commit_hash_preservation_dst: "{{ matrix_base_data_path }}/git_hash.yml"
  380. ######################################################################
  381. #
  382. # /com.devture.ansible.role.playbook_state_preserver
  383. #
  384. ######################################################################
  385. ######################################################################
  386. #
  387. # matrix-base
  388. #
  389. ######################################################################
  390. matrix_identity_server_url: "{{ ('https://' + matrix_server_fqn_matrix) if matrix_ma1sd_enabled else None }}"
  391. matrix_homeserver_container_url: |-
  392. {{
  393. 'http://matrix-nginx-proxy:12080' if matrix_nginx_proxy_enabled else {
  394. 'synapse': ('http://matrix-synapse-reverse-proxy-companion:8008' if matrix_synapse_reverse_proxy_companion_enabled else 'http://matrix-synapse:'+ matrix_synapse_container_client_api_port|string),
  395. 'dendrite': ('http://matrix-dendrite:' + matrix_dendrite_http_bind_port|string),
  396. 'conduit': ('http://matrix-conduit:' + matrix_conduit_port_number|string),
  397. }[matrix_homeserver_implementation]
  398. }}
  399. matrix_homeserver_container_federation_url: |-
  400. {{
  401. 'http://matrix-nginx-proxy:12088' if matrix_nginx_proxy_enabled else {
  402. 'synapse': ('http://matrix-synapse-reverse-proxy-companion:8048' if matrix_synapse_reverse_proxy_companion_enabled else 'http://matrix-synapse:'+ matrix_synapse_container_federation_api_plain_port|string),
  403. 'dendrite': ('http://matrix-dendrite:' + matrix_dendrite_http_bind_port|string),
  404. 'conduit': ('http://matrix-conduit:' + matrix_conduit_port_number|string),
  405. }[matrix_homeserver_implementation]
  406. }}
  407. matrix_homeserver_container_network: |-
  408. {{
  409. matrix_nginx_proxy_container_network if matrix_nginx_proxy_enabled else {
  410. 'synapse': matrix_synapse_container_network,
  411. 'dendrite': matrix_dendrite_container_network,
  412. 'conduit': matrix_conduit_container_network,
  413. }[matrix_homeserver_implementation]
  414. }}
  415. matrix_integration_manager_rest_url: "{{ matrix_dimension_integrations_rest_url if matrix_dimension_enabled else None }}"
  416. matrix_integration_manager_ui_url: "{{ matrix_dimension_integrations_ui_url if matrix_dimension_enabled else None }}"
  417. ######################################################################
  418. #
  419. # /matrix-base
  420. #
  421. ######################################################################
  422. ######################################################################
  423. #
  424. # matrix-bridge-appservice-discord
  425. #
  426. ######################################################################
  427. # We don't enable bridges by default.
  428. matrix_appservice_discord_enabled: false
  429. # Normally, matrix-nginx-proxy is enabled and nginx can reach matrix-appservice-discord over the container network.
  430. # If matrix-nginx-proxy is not enabled, or you otherwise have a need for it, you can expose
  431. # matrix-appservice-discord's client-server port to the local host.
  432. 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 '' }}"
  433. # If the homeserver disables presence, it's likely better (less wasteful) to also disable presence on the bridge side.
  434. matrix_appservice_discord_bridge_disablePresence: "{{ not matrix_synapse_presence_enabled }}"
  435. matrix_appservice_discord_systemd_required_services_list: |
  436. {{
  437. ['docker.service']
  438. +
  439. ['matrix-' + matrix_homeserver_implementation + '.service']
  440. +
  441. ([devture_postgres_identifier ~ '.service'] if devture_postgres_enabled else [])
  442. +
  443. (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
  444. }}
  445. matrix_appservice_discord_appservice_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'discord.as.token', rounds=655555) | to_uuid }}"
  446. matrix_appservice_discord_homeserver_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'discord.hs.token', rounds=655555) | to_uuid }}"
  447. # We only make this use Postgres if our own Postgres server is enabled.
  448. # It's only then (for now) that we can automatically create the necessary database and user for this service.
  449. matrix_appservice_discord_database_engine: "{{ 'postgres' if devture_postgres_enabled else 'sqlite' }}"
  450. matrix_appservice_discord_database_hostname: "{{ devture_postgres_connection_hostname if devture_postgres_enabled else '' }}"
  451. matrix_appservice_discord_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'as.discord.db', rounds=655555) | to_uuid }}"
  452. ######################################################################
  453. #
  454. # /matrix-bridge-appservice-discord
  455. #
  456. ######################################################################
  457. ######################################################################
  458. #
  459. # matrix-appservice-webhooks
  460. #
  461. ######################################################################
  462. # We don't enable bridges by default.
  463. matrix_appservice_webhooks_enabled: false
  464. matrix_appservice_webhooks_container_image_self_build: "{{ matrix_architecture != 'amd64' }}"
  465. # Normally, matrix-nginx-proxy is enabled and nginx can reach matrix-appservice-webhooks over the container network.
  466. # If matrix-nginx-proxy is not enabled, or you otherwise have a need for it, you can expose
  467. # matrix-appservice-webhooks' client-server port to the local host.
  468. 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 '' }}"
  469. matrix_appservice_webhooks_appservice_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'webhook.as.token', rounds=655555) | to_uuid }}"
  470. matrix_appservice_webhooks_homeserver_url: "{{ matrix_homeserver_container_url }}"
  471. matrix_appservice_webhooks_homeserver_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'webhook.hs.token', rounds=655555) | to_uuid }}"
  472. matrix_appservice_webhooks_id_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'webhook.id.token', rounds=655555) | to_uuid }}"
  473. matrix_appservice_webhooks_systemd_required_services_list: |
  474. {{
  475. ['docker.service']
  476. +
  477. ['matrix-' + matrix_homeserver_implementation + '.service']
  478. +
  479. (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
  480. }}
  481. ######################################################################
  482. #
  483. # /matrix-appservice-webhooks
  484. #
  485. ######################################################################
  486. ######################################################################
  487. #
  488. # matrix-appservice-slack
  489. #
  490. ######################################################################
  491. # We don't enable bridges by default.
  492. matrix_appservice_slack_enabled: false
  493. matrix_appservice_slack_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm64'] }}"
  494. # Normally, matrix-nginx-proxy is enabled and nginx can reach matrix-appservice-slack over the container network.
  495. # If matrix-nginx-proxy is not enabled, or you otherwise have a need for it, you can expose
  496. # matrix-appservice-slack's client-server port to the local host.
  497. 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 '' }}"
  498. matrix_appservice_slack_appservice_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'slack.as.token', rounds=655555) | to_uuid }}"
  499. matrix_appservice_slack_homeserver_url: "{{ matrix_homeserver_container_url }}"
  500. matrix_appservice_slack_homeserver_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'slack.hs.token', rounds=655555) | to_uuid }}"
  501. matrix_appservice_slack_id_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'slack.id.token', rounds=655555) | to_uuid }}"
  502. matrix_appservice_slack_systemd_required_services_list: |
  503. {{
  504. ['docker.service']
  505. +
  506. ['matrix-' + matrix_homeserver_implementation + '.service']
  507. +
  508. (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
  509. }}
  510. # Postgres is the default, except if not using internal Postgres server
  511. matrix_appservice_slack_database_engine: "{{ 'postgres' if devture_postgres_enabled else 'nedb' }}"
  512. matrix_appservice_slack_database_hostname: "{{ devture_postgres_connection_hostname if devture_postgres_enabled else '' }}"
  513. matrix_appservice_slack_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'as.slack.db', rounds=655555) | to_uuid }}"
  514. ######################################################################
  515. #
  516. # /matrix-bridge-appservice-slack
  517. #
  518. ######################################################################
  519. ######################################################################
  520. #
  521. # matrix-bridge-appservice-irc
  522. #
  523. ######################################################################
  524. # We don't enable bridges by default.
  525. matrix_appservice_irc_enabled: false
  526. matrix_appservice_irc_container_image_self_build: "{{ matrix_architecture != 'amd64' }}"
  527. # Normally, matrix-nginx-proxy is enabled and nginx can reach matrix-appservice-irc over the container network.
  528. # If matrix-nginx-proxy is not enabled, or you otherwise have a need for it, you can expose
  529. # matrix-appservice-irc's client-server port to the local host.
  530. 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 '' }}"
  531. # The IRC bridge docs say that if homeserver presence is disabled, it's better to also disable
  532. # IRC bridge presence, for performance reasons.
  533. matrix_appservice_irc_homeserver_enablePresence: "{{ matrix_synapse_presence_enabled }}"
  534. matrix_appservice_irc_systemd_required_services_list: |
  535. {{
  536. ['docker.service']
  537. +
  538. ['matrix-' + matrix_homeserver_implementation + '.service']
  539. +
  540. (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
  541. }}
  542. matrix_appservice_irc_appservice_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'irc.as.token', rounds=655555) | to_uuid }}"
  543. matrix_appservice_irc_homeserver_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'irc.hs.token', rounds=655555) | to_uuid }}"
  544. matrix_appservice_irc_database_engine: "{{ 'postgres' if devture_postgres_enabled else 'nedb' }}"
  545. matrix_appservice_irc_database_hostname: "{{ devture_postgres_connection_hostname if devture_postgres_enabled else '' }}"
  546. matrix_appservice_irc_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'as.irc.db', rounds=655555) | to_uuid }}"
  547. ######################################################################
  548. #
  549. # /matrix-bridge-appservice-irc
  550. #
  551. ######################################################################
  552. ######################################################################
  553. #
  554. # matrix-bridge-appservice-kakaotalk
  555. #
  556. ######################################################################
  557. # We don't enable bridges by default.
  558. matrix_appservice_kakaotalk_enabled: false
  559. matrix_appservice_kakaotalk_systemd_required_services_list: |
  560. {{
  561. ['docker.service']
  562. +
  563. ['matrix-appservice-kakaotalk-node.service']
  564. +
  565. ['matrix-' + matrix_homeserver_implementation + '.service']
  566. +
  567. (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
  568. +
  569. ([devture_postgres_identifier ~ '.service'] if devture_postgres_enabled else [])
  570. }}
  571. matrix_appservice_kakaotalk_appservice_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'as.kakao.hs', rounds=655555) | to_uuid }}"
  572. matrix_appservice_kakaotalk_homeserver_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'as.kakao.hs', rounds=655555) | to_uuid }}"
  573. 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 '' }}"
  574. matrix_appservice_kakaotalk_database_engine: "{{ 'postgres' if devture_postgres_enabled else 'sqlite' }}"
  575. matrix_appservice_kakaotalk_database_hostname: "{{ devture_postgres_connection_hostname if devture_postgres_enabled else '' }}"
  576. matrix_appservice_kakaotalk_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'as.kakao.db', rounds=655555) | to_uuid }}"
  577. ######################################################################
  578. #
  579. # /matrix-bridge-appservice-kakaotalk
  580. #
  581. ######################################################################
  582. ######################################################################
  583. #
  584. # matrix-bridge-beeper-linkedin
  585. #
  586. ######################################################################
  587. # We don't enable bridges by default.
  588. matrix_beeper_linkedin_enabled: false
  589. matrix_beeper_linkedin_container_image_self_build: "{{ matrix_architecture not in ['amd64'] }}"
  590. matrix_beeper_linkedin_systemd_required_services_list: |
  591. {{
  592. ['docker.service']
  593. +
  594. ['matrix-' + matrix_homeserver_implementation + '.service']
  595. +
  596. ([devture_postgres_identifier ~ '.service'] if devture_postgres_enabled else [])
  597. +
  598. (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
  599. }}
  600. matrix_beeper_linkedin_appservice_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'linked.as.token', rounds=655555) | to_uuid }}"
  601. matrix_beeper_linkedin_homeserver_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'linked.hs.token', rounds=655555) | to_uuid }}"
  602. 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 '' }}"
  603. matrix_beeper_linkedin_bridge_presence: "{{ matrix_synapse_presence_enabled if matrix_synapse_enabled else true }}"
  604. matrix_beeper_linkedin_database_hostname: "{{ devture_postgres_connection_hostname if devture_postgres_enabled else '' }}"
  605. matrix_beeper_linkedin_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'maulinkedin.db', rounds=655555) | to_uuid }}"
  606. ######################################################################
  607. #
  608. # /matrix-bridge-beeper-linkedin
  609. #
  610. ######################################################################
  611. ######################################################################
  612. #
  613. # matrix-bridge-go-skype-bridge
  614. #
  615. ######################################################################
  616. # We don't enable bridges by default.
  617. matrix_go_skype_bridge_enabled: false
  618. matrix_go_skype_bridge_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm64'] }}"
  619. matrix_go_skype_bridge_systemd_required_services_list: |
  620. {{
  621. ['docker.service']
  622. +
  623. ['matrix-' + matrix_homeserver_implementation + '.service']
  624. +
  625. ([devture_postgres_identifier ~ '.service'] if devture_postgres_enabled else [])
  626. +
  627. (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
  628. }}
  629. matrix_go_skype_bridge_appservice_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'skype.as.token', rounds=655555) | to_uuid }}"
  630. matrix_go_skype_bridge_homeserver_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'skype.hs.token', rounds=655555) | to_uuid }}"
  631. 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 '' }}"
  632. # Postgres is the default, except if not using internal Postgres server
  633. matrix_go_skype_bridge_database_engine: "{{ 'postgres' if devture_postgres_enabled else 'sqlite' }}"
  634. matrix_go_skype_bridge_database_hostname: "{{ devture_postgres_connection_hostname if devture_postgres_enabled else '' }}"
  635. matrix_go_skype_bridge_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'goskype.db', rounds=655555) | to_uuid }}"
  636. ######################################################################
  637. #
  638. # /matrix-bridge-go-skype-bridge
  639. #
  640. ######################################################################
  641. ######################################################################
  642. #
  643. # matrix-bridge-mautrix-discord
  644. #
  645. ######################################################################
  646. # We don't enable bridges by default.
  647. matrix_mautrix_discord_enabled: false
  648. matrix_mautrix_discord_container_image_self_build: "{{ matrix_architecture not in ['arm64', 'amd64'] }}"
  649. matrix_mautrix_discord_systemd_required_services_list: |
  650. {{
  651. ['docker.service']
  652. +
  653. ['matrix-' + matrix_homeserver_implementation + '.service']
  654. +
  655. ([devture_postgres_identifier ~ '.service'] if devture_postgres_enabled else [])
  656. +
  657. (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
  658. }}
  659. matrix_mautrix_discord_appservice_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'maudisc.as.tok', rounds=655555) | to_uuid }}"
  660. matrix_mautrix_discord_homeserver_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'maudisc.hs.tok', rounds=655555) | to_uuid }}"
  661. 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 '' }}"
  662. # Postgres is the default, except if not using internal Postgres server
  663. matrix_mautrix_discord_database_engine: "{{ 'postgres' if devture_postgres_enabled else 'sqlite' }}"
  664. matrix_mautrix_discord_database_hostname: "{{ devture_postgres_connection_hostname if devture_postgres_enabled else '' }}"
  665. matrix_mautrix_discord_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'maudiscord.db', rounds=655555) | to_uuid }}"
  666. ######################################################################
  667. #
  668. # /matrix-bridge-mautrix-discord
  669. #
  670. ######################################################################
  671. ######################################################################
  672. #
  673. # matrix-bridge-mautrix-slack
  674. #
  675. ######################################################################
  676. # We don't enable bridges by default.
  677. matrix_mautrix_slack_enabled: false
  678. matrix_mautrix_slack_container_image_self_build: "{{ matrix_architecture not in ['arm64', 'amd64'] }}"
  679. matrix_mautrix_slack_systemd_required_services_list: |
  680. {{
  681. ['docker.service']
  682. +
  683. ['matrix-' + matrix_homeserver_implementation + '.service']
  684. +
  685. ([devture_postgres_identifier ~ '.service'] if devture_postgres_enabled else [])
  686. +
  687. (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
  688. }}
  689. matrix_mautrix_slack_appservice_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mauslack.as.tok', rounds=655555) | to_uuid }}"
  690. matrix_mautrix_slack_homeserver_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mauslack.hs.tok', rounds=655555) | to_uuid }}"
  691. 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 '' }}"
  692. # Postgres is the default, except if not using internal Postgres server
  693. matrix_mautrix_slack_database_engine: "{{ 'postgres' if devture_postgres_enabled else 'sqlite' }}"
  694. matrix_mautrix_slack_database_hostname: "{{ devture_postgres_connection_hostname if devture_postgres_enabled else '' }}"
  695. matrix_mautrix_slack_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mauslack.db', rounds=655555) | to_uuid }}"
  696. ######################################################################
  697. #
  698. # /matrix-bridge-mautrix-slack
  699. #
  700. ######################################################################
  701. ######################################################################
  702. #
  703. # matrix-bridge-mautrix-facebook
  704. #
  705. ######################################################################
  706. # We don't enable bridges by default.
  707. matrix_mautrix_facebook_enabled: false
  708. matrix_mautrix_facebook_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm64'] }}"
  709. matrix_mautrix_facebook_systemd_required_services_list: |
  710. {{
  711. ['docker.service']
  712. +
  713. ['matrix-' + matrix_homeserver_implementation + '.service']
  714. +
  715. ([devture_postgres_identifier ~ '.service'] if devture_postgres_enabled else [])
  716. +
  717. (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
  718. }}
  719. matrix_mautrix_facebook_appservice_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'fb.as.token', rounds=655555) | to_uuid }}"
  720. matrix_mautrix_facebook_homeserver_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'fb.hs.token', rounds=655555) | to_uuid }}"
  721. matrix_mautrix_facebook_public_endpoint: "/{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'facebook', rounds=655555) | to_uuid }}"
  722. 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 '' }}"
  723. 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 '' }}"
  724. matrix_mautrix_facebook_bridge_presence: "{{ matrix_synapse_presence_enabled if matrix_synapse_enabled else true }}"
  725. # People using an external Prometheus server will need to toggle all of these to be able to consume metrics remotely:
  726. # - `matrix_mautrix_facebook_metrics_enabled`
  727. # - `matrix_mautrix_facebook_proxying_metrics_enabled`
  728. # - `matrix_nginx_proxy_proxy_matrix_metrics_enabled`
  729. matrix_mautrix_facebook_metrics_enabled: "{{ prometheus_enabled }}"
  730. # We'd like to force-set people with external Postgres to SQLite, so the bridge role can complain
  731. # and point them to a migration path.
  732. matrix_mautrix_facebook_database_engine: "{{ 'postgres' if devture_postgres_enabled else 'sqlite' }}"
  733. matrix_mautrix_facebook_database_hostname: "{{ devture_postgres_connection_hostname if devture_postgres_enabled else '' }}"
  734. matrix_mautrix_facebook_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mau.fb.db', rounds=655555) | to_uuid }}"
  735. ######################################################################
  736. #
  737. # /matrix-bridge-mautrix-facebook
  738. #
  739. ######################################################################
  740. ######################################################################
  741. #
  742. # matrix-bridge-mautrix-googlechat
  743. #
  744. ######################################################################
  745. # We don't enable bridges by default.
  746. matrix_mautrix_googlechat_enabled: false
  747. matrix_mautrix_googlechat_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm64'] }}"
  748. matrix_mautrix_googlechat_systemd_required_services_list: |
  749. {{
  750. ['docker.service']
  751. +
  752. ['matrix-' + matrix_homeserver_implementation + '.service']
  753. +
  754. ([devture_postgres_identifier ~ '.service'] if devture_postgres_enabled else [])
  755. +
  756. (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
  757. }}
  758. matrix_mautrix_googlechat_appservice_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'gc.as.token', rounds=655555) | to_uuid }}"
  759. matrix_mautrix_googlechat_homeserver_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'gc.hs.token', rounds=655555) | to_uuid }}"
  760. 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 '' }}"
  761. 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 '' }}"
  762. # Postgres is the default, except if not using internal Postgres server
  763. matrix_mautrix_googlechat_database_engine: "{{ 'postgres' if devture_postgres_enabled else 'sqlite' }}"
  764. matrix_mautrix_googlechat_database_hostname: "{{ devture_postgres_connection_hostname if devture_postgres_enabled else '' }}"
  765. matrix_mautrix_googlechat_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mau.gc.db', rounds=655555) | to_uuid }}"
  766. ######################################################################
  767. #
  768. # /matrix-bridge-mautrix-googlechat
  769. #
  770. ######################################################################
  771. ######################################################################
  772. #
  773. # matrix-bridge-mautrix-hangouts
  774. #
  775. ######################################################################
  776. # We don't enable bridges by default.
  777. matrix_mautrix_hangouts_enabled: false
  778. matrix_mautrix_hangouts_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm64'] }}"
  779. matrix_mautrix_hangouts_systemd_required_services_list: |
  780. {{
  781. ['docker.service']
  782. +
  783. ['matrix-' + matrix_homeserver_implementation + '.service']
  784. +
  785. ([devture_postgres_identifier ~ '.service'] if devture_postgres_enabled else [])
  786. +
  787. (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
  788. }}
  789. matrix_mautrix_hangouts_appservice_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'ho.as.token', rounds=655555) | to_uuid }}"
  790. matrix_mautrix_hangouts_homeserver_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'ho.hs.token', rounds=655555) | to_uuid }}"
  791. 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 '' }}"
  792. 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 '' }}"
  793. # Postgres is the default, except if not using internal Postgres server
  794. matrix_mautrix_hangouts_database_engine: "{{ 'postgres' if devture_postgres_enabled else 'sqlite' }}"
  795. matrix_mautrix_hangouts_database_hostname: "{{ devture_postgres_connection_hostname if devture_postgres_enabled else '' }}"
  796. matrix_mautrix_hangouts_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mau.hangouts.db', rounds=655555) | to_uuid }}"
  797. ######################################################################
  798. #
  799. # /matrix-bridge-mautrix-hangouts
  800. #
  801. ######################################################################
  802. ######################################################################
  803. #
  804. # matrix-bridge-mautrix-instagram
  805. #
  806. ######################################################################
  807. # We don't enable bridges by default.
  808. matrix_mautrix_instagram_enabled: false
  809. matrix_mautrix_instagram_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm64'] }}"
  810. matrix_mautrix_instagram_systemd_required_services_list: |
  811. {{
  812. ['docker.service']
  813. +
  814. ['matrix-' + matrix_homeserver_implementation + '.service']
  815. +
  816. ([devture_postgres_identifier ~ '.service'] if devture_postgres_enabled else [])
  817. +
  818. (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
  819. }}
  820. matrix_mautrix_instagram_appservice_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'ig.as.token', rounds=655555) | to_uuid }}"
  821. matrix_mautrix_instagram_homeserver_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'ig.hs.token', rounds=655555) | to_uuid }}"
  822. 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 '' }}"
  823. matrix_mautrix_instagram_bridge_presence: "{{ matrix_synapse_presence_enabled if matrix_synapse_enabled else true }}"
  824. # People using an external Prometheus server will need to toggle all of these to be able to consume metrics remotely:
  825. # - `matrix_mautrix_instagram_metrics_enabled`
  826. # - `matrix_mautrix_instagram_proxying_metrics_enabled`
  827. # - `matrix_nginx_proxy_proxy_matrix_metrics_enabled`
  828. matrix_mautrix_instagram_metrics_enabled: "{{ prometheus_enabled }}"
  829. # We'd like to force-set people with external Postgres to SQLite, so the bridge role can complain
  830. # and point them to a migration path.
  831. matrix_mautrix_instagram_database_engine: "{{ 'postgres' if devture_postgres_enabled else 'sqlite' }}"
  832. matrix_mautrix_instagram_database_hostname: "{{ devture_postgres_connection_hostname if devture_postgres_enabled else '' }}"
  833. matrix_mautrix_instagram_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mau.ig.db', rounds=655555) | to_uuid }}"
  834. ######################################################################
  835. #
  836. # /matrix-bridge-mautrix-instagram
  837. #
  838. ######################################################################
  839. ######################################################################
  840. #
  841. # matrix-bridge-mautrix-signal
  842. #
  843. ######################################################################
  844. # We don't enable bridges by default.
  845. matrix_mautrix_signal_enabled: false
  846. matrix_mautrix_signal_systemd_required_services_list: |
  847. {{
  848. ['docker.service']
  849. +
  850. ['matrix-' + matrix_homeserver_implementation + '.service']
  851. +
  852. ([devture_postgres_identifier ~ '.service'] if devture_postgres_enabled else [])
  853. +
  854. (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
  855. +
  856. ['matrix-mautrix-signal-daemon.service']
  857. }}
  858. matrix_mautrix_signal_homeserver_domain: '{{ matrix_domain }}'
  859. matrix_mautrix_signal_homeserver_address: "{{ matrix_homeserver_container_url }}"
  860. matrix_mautrix_signal_homeserver_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'si.hs.token', rounds=655555) | to_uuid }}"
  861. matrix_mautrix_signal_appservice_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'si.as.token', rounds=655555) | to_uuid }}"
  862. 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 '' }}"
  863. # People using an external Prometheus server will need to toggle all of these to be able to consume metrics remotely:
  864. # - `matrix_mautrix_signal_metrics_enabled`
  865. # - `matrix_mautrix_signal_proxying_metrics_enabled`
  866. # - `matrix_nginx_proxy_proxy_matrix_metrics_enabled`
  867. matrix_mautrix_signal_metrics_enabled: "{{ prometheus_enabled }}"
  868. matrix_mautrix_signal_database_engine: 'postgres'
  869. matrix_mautrix_signal_database_hostname: "{{ devture_postgres_connection_hostname if devture_postgres_enabled else '' }}"
  870. matrix_mautrix_signal_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mau.signal.db', rounds=655555) | to_uuid }}"
  871. matrix_mautrix_signal_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm64'] }}"
  872. matrix_mautrix_signal_daemon_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm64'] }}"
  873. ######################################################################
  874. #
  875. # /matrix-bridge-mautrix-signal
  876. #
  877. ######################################################################
  878. ######################################################################
  879. #
  880. # matrix-bridge-mautrix-telegram
  881. #
  882. ######################################################################
  883. # We don't enable bridges by default.
  884. matrix_mautrix_telegram_enabled: false
  885. # Images are multi-arch (amd64 and arm64, but not arm32).
  886. matrix_mautrix_telegram_container_image_self_build: "{{ matrix_architecture not in ['arm64', 'amd64'] }}"
  887. matrix_telegram_lottieconverter_container_image_self_build: "{{ matrix_architecture not in ['arm64', 'amd64'] }}"
  888. matrix_telegram_lottieconverter_container_image_self_build_mask_arch: "{{ matrix_architecture != 'amd64' }}"
  889. matrix_mautrix_telegram_systemd_required_services_list: |
  890. {{
  891. ['docker.service']
  892. +
  893. ['matrix-' + matrix_homeserver_implementation + '.service']
  894. +
  895. ([devture_postgres_identifier ~ '.service'] if devture_postgres_enabled else [])
  896. +
  897. (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
  898. }}
  899. matrix_mautrix_telegram_appservice_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'telegr.as.token', rounds=655555) | to_uuid }}"
  900. matrix_mautrix_telegram_homeserver_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'telegr.hs.token', rounds=655555) | to_uuid }}"
  901. matrix_mautrix_telegram_public_endpoint: "/{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'telegram', rounds=655555) | to_uuid }}"
  902. 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 '' }}"
  903. 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 '' }}"
  904. # Postgres is the default, except if not using internal Postgres server
  905. matrix_mautrix_telegram_database_engine: "{{ 'postgres' if devture_postgres_enabled else 'sqlite' }}"
  906. matrix_mautrix_telegram_database_hostname: "{{ devture_postgres_connection_hostname if devture_postgres_enabled else '' }}"
  907. matrix_mautrix_telegram_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mau.telegram.db', rounds=655555) | to_uuid }}"
  908. ######################################################################
  909. #
  910. # /matrix-bridge-mautrix-telegram
  911. #
  912. ######################################################################
  913. ######################################################################
  914. #
  915. # matrix-bridge-mautrix-twitter
  916. #
  917. ######################################################################
  918. # We don't enable bridges by default.
  919. matrix_mautrix_twitter_enabled: false
  920. matrix_mautrix_twitter_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm64'] }}"
  921. matrix_mautrix_twitter_systemd_required_services_list: |
  922. {{
  923. ['docker.service']
  924. +
  925. ['matrix-' + matrix_homeserver_implementation + '.service']
  926. +
  927. ([devture_postgres_identifier ~ '.service'] if devture_postgres_enabled else [])
  928. +
  929. (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
  930. }}
  931. matrix_mautrix_twitter_appservice_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'twt.as.token', rounds=655555) | to_uuid }}"
  932. matrix_mautrix_twitter_homeserver_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'twt.hs.token', rounds=655555) | to_uuid }}"
  933. 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 '' }}"
  934. matrix_mautrix_twitter_database_hostname: "{{ devture_postgres_connection_hostname if devture_postgres_enabled else '' }}"
  935. 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 '' }}"
  936. ######################################################################
  937. #
  938. # /matrix-bridge-mautrix-twitter
  939. #
  940. ######################################################################
  941. ######################################################################
  942. #
  943. # matrix-bridge-mautrix-whatsapp
  944. #
  945. ######################################################################
  946. # We don't enable bridges by default.
  947. matrix_mautrix_whatsapp_enabled: false
  948. matrix_mautrix_whatsapp_container_image_self_build: "{{ matrix_architecture not in ['arm64', 'amd64'] }}"
  949. matrix_mautrix_whatsapp_systemd_required_services_list: |
  950. {{
  951. ['docker.service']
  952. +
  953. ['matrix-' + matrix_homeserver_implementation + '.service']
  954. +
  955. ([devture_postgres_identifier ~ '.service'] if devture_postgres_enabled else [])
  956. +
  957. (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
  958. }}
  959. matrix_mautrix_whatsapp_appservice_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'whats.as.token', rounds=655555) | to_uuid }}"
  960. matrix_mautrix_whatsapp_homeserver_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'whats.hs.token', rounds=655555) | to_uuid }}"
  961. 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 '' }}"
  962. # People using an external Prometheus server will need to toggle all of these to be able to consume metrics remotely:
  963. # - `matrix_mautrix_twitter_metrics_enabled`
  964. # - `matrix_mautrix_twitter_proxying_metrics_enabled`
  965. # - `matrix_nginx_proxy_proxy_matrix_metrics_enabled`
  966. matrix_mautrix_twitter_metrics_enabled: "{{ prometheus_enabled }}"
  967. # Postgres is the default, except if not using internal Postgres server
  968. matrix_mautrix_whatsapp_database_engine: "{{ 'postgres' if devture_postgres_enabled else 'sqlite' }}"
  969. matrix_mautrix_whatsapp_database_hostname: "{{ devture_postgres_connection_hostname if devture_postgres_enabled else '' }}"
  970. matrix_mautrix_whatsapp_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mauwhatsapp.db', rounds=655555) | to_uuid }}"
  971. ######################################################################
  972. #
  973. # /matrix-bridge-mautrix-whatsapp
  974. #
  975. ######################################################################
  976. ######################################################################
  977. #
  978. # matrix-sms-bridge
  979. #
  980. ######################################################################
  981. # We don't enable bridges by default.
  982. matrix_sms_bridge_enabled: false
  983. matrix_sms_bridge_systemd_required_services_list: |
  984. {{
  985. ['docker.service']
  986. +
  987. ['matrix-' + matrix_homeserver_implementation + '.service']
  988. +
  989. (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
  990. }}
  991. matrix_sms_bridge_appservice_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'sms.as.token', rounds=655555) | to_uuid }}"
  992. matrix_sms_bridge_homeserver_port: "{{ matrix_synapse_container_client_api_port }}"
  993. matrix_sms_bridge_homeserver_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'sms.hs.token', rounds=655555) | to_uuid }}"
  994. ######################################################################
  995. #
  996. # /matrix-sms-bridge
  997. #
  998. ######################################################################
  999. ######################################################################
  1000. #
  1001. # matrix-bridge-heisenbridge
  1002. #
  1003. ######################################################################
  1004. # We don't enable bridges by default.
  1005. matrix_heisenbridge_enabled: false
  1006. matrix_heisenbridge_appservice_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'heisen.as.tok', rounds=655555) | to_uuid }}"
  1007. matrix_heisenbridge_homeserver_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'heisen.hs.tok', rounds=655555) | to_uuid }}"
  1008. matrix_heisenbridge_systemd_wanted_services_list: |
  1009. {{
  1010. ['matrix-' + matrix_homeserver_implementation + '.service']
  1011. +
  1012. (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
  1013. }}
  1014. ######################################################################
  1015. #
  1016. # /matrix-bridge-heisenbridge
  1017. #
  1018. ######################################################################
  1019. ######################################################################
  1020. #
  1021. # matrix-bridge-hookshot
  1022. #
  1023. ######################################################################
  1024. # We don't enable bridges by default.
  1025. matrix_hookshot_enabled: false
  1026. matrix_hookshot_container_image_self_build: "{{ matrix_architecture not in ['arm64', 'amd64'] }}"
  1027. matrix_hookshot_appservice_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'hookshot.as.tok', rounds=655555) | to_uuid }}"
  1028. matrix_hookshot_homeserver_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'hookshot.hs.tok', rounds=655555) | to_uuid }}"
  1029. matrix_hookshot_systemd_wanted_services_list: |
  1030. {{
  1031. (['matrix-' + matrix_homeserver_implementation + '.service'])
  1032. +
  1033. (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
  1034. }}
  1035. matrix_hookshot_container_http_host_bind_ports_defaultmapping:
  1036. - "{{ matrix_playbook_service_host_bind_interface_prefix }}{{ matrix_hookshot_appservice_port }}:{{ matrix_hookshot_appservice_port }}"
  1037. - "{{ matrix_playbook_service_host_bind_interface_prefix }}{{ matrix_hookshot_metrics_port }}:{{ matrix_hookshot_metrics_port }}"
  1038. - "{{ matrix_playbook_service_host_bind_interface_prefix }}{{ matrix_hookshot_webhook_port }}:{{ matrix_hookshot_webhook_port }}"
  1039. - "{{ matrix_playbook_service_host_bind_interface_prefix }}{{ matrix_hookshot_provisioning_port }}:{{ matrix_hookshot_provisioning_port }}"
  1040. matrix_hookshot_container_http_host_bind_ports: "{{ matrix_hookshot_container_http_host_bind_ports_defaultmapping if matrix_playbook_service_host_bind_interface_prefix else [] }}"
  1041. matrix_hookshot_provisioning_enabled: "{{ matrix_hookshot_provisioning_secret and matrix_dimension_enabled }}"
  1042. # We only enable metrics (locally, in the container network) for the bridge if Prometheus is enabled.
  1043. #
  1044. # People using an external Prometheus server will need to toggle all of these to be able to consume metrics remotely:
  1045. # - `matrix_hookshot_metrics_enabled`
  1046. # - `matrix_hookshot_metrics_proxying_enabled`
  1047. # - `matrix_nginx_proxy_proxy_matrix_metrics_enabled`
  1048. matrix_hookshot_metrics_enabled: "{{ prometheus_enabled }}"
  1049. matrix_hookshot_urlprefix_port_enabled: "{{ matrix_nginx_proxy_container_https_host_bind_port == 443 if matrix_nginx_proxy_https_enabled else matrix_nginx_proxy_container_https_host_bind_port == 80 }}"
  1050. matrix_hookshot_urlprefix_port: ":{{ matrix_nginx_proxy_container_https_host_bind_port if matrix_nginx_proxy_https_enabled else matrix_nginx_proxy_container_http_host_bind_port }}"
  1051. matrix_hookshot_urlprefix: "{{ 'https' if matrix_playbook_ssl_enabled else 'http' }}://{{ matrix_server_fqn_matrix }}{{ matrix_hookshot_urlprefix_port if matrix_hookshot_urlprefix_port_enabled else '' }}"
  1052. ######################################################################
  1053. #
  1054. # /matrix-bridge-hookshot
  1055. #
  1056. ######################################################################
  1057. ######################################################################
  1058. #
  1059. # matrix-bridge-mx-puppet-slack
  1060. #
  1061. ######################################################################
  1062. # We don't enable bridges by default.
  1063. matrix_mx_puppet_slack_enabled: false
  1064. matrix_mx_puppet_slack_container_image_self_build: "{{ matrix_architecture != 'amd64' }}"
  1065. matrix_mx_puppet_slack_systemd_required_services_list: |
  1066. {{
  1067. ['docker.service']
  1068. +
  1069. ['matrix-' + matrix_homeserver_implementation + '.service']
  1070. +
  1071. ([devture_postgres_identifier ~ '.service'] if devture_postgres_enabled else [])
  1072. +
  1073. (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
  1074. }}
  1075. matrix_mx_puppet_slack_appservice_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mxslk.as.tok', rounds=655555) | to_uuid }}"
  1076. matrix_mx_puppet_slack_homeserver_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mxslk.hs.tok', rounds=655555) | to_uuid }}"
  1077. 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 '' }}"
  1078. # Postgres is the default, except if not using internal Postgres server
  1079. matrix_mx_puppet_slack_database_engine: "{{ 'postgres' if devture_postgres_enabled else 'sqlite' }}"
  1080. matrix_mx_puppet_slack_database_hostname: "{{ devture_postgres_connection_hostname if devture_postgres_enabled else '' }}"
  1081. matrix_mx_puppet_slack_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mxpup.slack.db', rounds=655555) | to_uuid }}"
  1082. ######################################################################
  1083. #
  1084. # /matrix-bridge-mx-puppet-slack
  1085. #
  1086. ######################################################################
  1087. ######################################################################
  1088. #
  1089. # matrix-bridge-mx-puppet-twitter
  1090. #
  1091. ######################################################################
  1092. # We don't enable bridges by default.
  1093. matrix_mx_puppet_twitter_enabled: false
  1094. matrix_mx_puppet_twitter_container_image_self_build: "{{ matrix_architecture != 'amd64' }}"
  1095. matrix_mx_puppet_twitter_systemd_required_services_list: |
  1096. {{
  1097. ['docker.service']
  1098. +
  1099. ['matrix-' + matrix_homeserver_implementation + '.service']
  1100. +
  1101. ([devture_postgres_identifier ~ '.service'] if devture_postgres_enabled else [])
  1102. +
  1103. (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
  1104. }}
  1105. matrix_mx_puppet_twitter_appservice_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mxtwt.as.tok', rounds=655555) | to_uuid }}"
  1106. matrix_mx_puppet_twitter_homeserver_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mxtwt.hs.tok', rounds=655555) | to_uuid }}"
  1107. 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 '' }}"
  1108. 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 '' }}"
  1109. # Postgres is the default, except if not using internal Postgres server
  1110. matrix_mx_puppet_twitter_database_engine: "{{ 'postgres' if devture_postgres_enabled else 'sqlite' }}"
  1111. matrix_mx_puppet_twitter_database_hostname: "{{ devture_postgres_connection_hostname if devture_postgres_enabled else '' }}"
  1112. matrix_mx_puppet_twitter_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mxpup.twitter.db', rounds=655555) | to_uuid }}"
  1113. ######################################################################
  1114. #
  1115. # /matrix-bridge-mx-puppet-twitter
  1116. #
  1117. ######################################################################
  1118. ######################################################################
  1119. #
  1120. # matrix-bridge-mx-puppet-instagram
  1121. #
  1122. ######################################################################
  1123. # We don't enable bridges by default.
  1124. matrix_mx_puppet_instagram_enabled: false
  1125. matrix_mx_puppet_instagram_container_image_self_build: "{{ matrix_architecture != 'amd64' }}"
  1126. matrix_mx_puppet_instagram_systemd_required_services_list: |
  1127. {{
  1128. ['docker.service']
  1129. +
  1130. ['matrix-' + matrix_homeserver_implementation + '.service']
  1131. +
  1132. ([devture_postgres_identifier ~ '.service'] if devture_postgres_enabled else [])
  1133. +
  1134. (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
  1135. }}
  1136. matrix_mx_puppet_instagram_appservice_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mxig.as.tok', rounds=655555) | to_uuid }}"
  1137. matrix_mx_puppet_instagram_homeserver_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mxig.hs.tok', rounds=655555) | to_uuid }}"
  1138. 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 '' }}"
  1139. # Postgres is the default, except if not using internal Postgres server
  1140. matrix_mx_puppet_instagram_database_engine: "{{ 'postgres' if devture_postgres_enabled else 'sqlite' }}"
  1141. matrix_mx_puppet_instagram_database_hostname: "{{ devture_postgres_connection_hostname if devture_postgres_enabled else '' }}"
  1142. matrix_mx_puppet_instagram_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mxpup.ig.db', rounds=655555) | to_uuid }}"
  1143. ######################################################################
  1144. #
  1145. # /matrix-bridge-mx-puppet-instagram
  1146. #
  1147. ######################################################################
  1148. ######################################################################
  1149. #
  1150. # matrix-bridge-mx-puppet-discord
  1151. #
  1152. ######################################################################
  1153. # We don't enable bridges by default.
  1154. matrix_mx_puppet_discord_enabled: false
  1155. matrix_mx_puppet_discord_container_image_self_build: "{{ matrix_architecture != 'amd64' }}"
  1156. matrix_mx_puppet_discord_systemd_required_services_list: |
  1157. {{
  1158. ['docker.service']
  1159. +
  1160. ['matrix-' + matrix_homeserver_implementation + '.service']
  1161. +
  1162. ([devture_postgres_identifier ~ '.service'] if devture_postgres_enabled else [])
  1163. +
  1164. (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
  1165. }}
  1166. matrix_mx_puppet_discord_appservice_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mxdsc.as.tok', rounds=655555) | to_uuid }}"
  1167. matrix_mx_puppet_discord_homeserver_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mxdsc.hs.tok', rounds=655555) | to_uuid }}"
  1168. 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 '' }}"
  1169. # Postgres is the default, except if not using internal Postgres server
  1170. matrix_mx_puppet_discord_database_engine: "{{ 'postgres' if devture_postgres_enabled else 'sqlite' }}"
  1171. matrix_mx_puppet_discord_database_hostname: "{{ devture_postgres_connection_hostname if devture_postgres_enabled else '' }}"
  1172. matrix_mx_puppet_discord_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mxpup.dsc.db', rounds=655555) | to_uuid }}"
  1173. ######################################################################
  1174. #
  1175. # /matrix-bridge-mx-puppet-discord
  1176. #
  1177. ######################################################################
  1178. ######################################################################
  1179. #
  1180. # matrix-bridge-mx-puppet-steam
  1181. #
  1182. ######################################################################
  1183. # We don't enable bridges by default.
  1184. matrix_mx_puppet_steam_enabled: false
  1185. matrix_mx_puppet_steam_container_image_self_build: "{{ matrix_architecture not in ['arm64', 'amd64'] }}"
  1186. matrix_mx_puppet_steam_systemd_required_services_list: |
  1187. {{
  1188. ['docker.service']
  1189. +
  1190. ['matrix-' + matrix_homeserver_implementation + '.service']
  1191. +
  1192. ([devture_postgres_identifier ~ '.service'] if devture_postgres_enabled else [])
  1193. +
  1194. (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
  1195. }}
  1196. matrix_mx_puppet_steam_appservice_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mxste.as.tok', rounds=655555) | to_uuid }}"
  1197. matrix_mx_puppet_steam_homeserver_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mxste.hs.tok', rounds=655555) | to_uuid }}"
  1198. 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 '' }}"
  1199. # Postgres is the default, except if not using internal Postgres server
  1200. matrix_mx_puppet_steam_database_engine: "{{ 'postgres' if devture_postgres_enabled else 'sqlite' }}"
  1201. matrix_mx_puppet_steam_database_hostname: "{{ devture_postgres_connection_hostname if devture_postgres_enabled else '' }}"
  1202. matrix_mx_puppet_steam_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mxpup.steam.db', rounds=655555) | to_uuid }}"
  1203. ######################################################################
  1204. #
  1205. # /matrix-bridge-mx-puppet-steam
  1206. #
  1207. ######################################################################
  1208. ######################################################################
  1209. #
  1210. # matrix-bridge-mx-puppet-groupme
  1211. #
  1212. ######################################################################
  1213. # We don't enable bridges by default.
  1214. matrix_mx_puppet_groupme_enabled: false
  1215. matrix_mx_puppet_groupme_container_image_self_build: "{{ matrix_architecture != 'amd64' }}"
  1216. matrix_mx_puppet_groupme_systemd_required_services_list: |
  1217. {{
  1218. ['docker.service']
  1219. +
  1220. ['matrix-' + matrix_homeserver_implementation + '.service']
  1221. +
  1222. ([devture_postgres_identifier ~ '.service'] if devture_postgres_enabled else [])
  1223. +
  1224. (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
  1225. }}
  1226. matrix_mx_puppet_groupme_appservice_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mxgro.as.tok', rounds=655555) | to_uuid }}"
  1227. matrix_mx_puppet_groupme_homeserver_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mxgro.hs.tok', rounds=655555) | to_uuid }}"
  1228. 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 '' }}"
  1229. # Postgres is the default, except if not using internal Postgres server
  1230. matrix_mx_puppet_groupme_database_engine: "{{ 'postgres' if devture_postgres_enabled else 'sqlite' }}"
  1231. matrix_mx_puppet_groupme_database_hostname: "{{ devture_postgres_connection_hostname if devture_postgres_enabled else '' }}"
  1232. matrix_mx_puppet_groupme_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mxpup.groupme.db', rounds=655555) | to_uuid }}"
  1233. ######################################################################
  1234. #
  1235. # /matrix-bridge-mx-puppet-groupme
  1236. #
  1237. ######################################################################
  1238. ######################################################################
  1239. #
  1240. # matrix-bot-matrix-reminder-bot
  1241. #
  1242. ######################################################################
  1243. # We don't enable bots by default.
  1244. matrix_bot_matrix_reminder_bot_enabled: false
  1245. matrix_bot_matrix_reminder_bot_systemd_required_services_list: |
  1246. {{
  1247. ['docker.service']
  1248. +
  1249. ['matrix-' + matrix_homeserver_implementation + '.service']
  1250. +
  1251. ([devture_postgres_identifier ~ '.service'] if devture_postgres_enabled else [])
  1252. +
  1253. (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
  1254. }}
  1255. # Postgres is the default, except if not using internal Postgres server
  1256. matrix_bot_matrix_reminder_bot_database_engine: "{{ 'postgres' if devture_postgres_enabled else 'sqlite' }}"
  1257. matrix_bot_matrix_reminder_bot_database_hostname: "{{ devture_postgres_connection_hostname if devture_postgres_enabled else '' }}"
  1258. matrix_bot_matrix_reminder_bot_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'reminder.bot.db', rounds=655555) | to_uuid }}"
  1259. matrix_bot_matrix_reminder_bot_container_image_self_build: "{{ matrix_architecture != 'amd64' }}"
  1260. ######################################################################
  1261. #
  1262. # /matrix-bot-matrix-reminder-bot
  1263. #
  1264. ######################################################################
  1265. ######################################################################
  1266. #
  1267. # matrix-bot-matrix-registration-bot
  1268. #
  1269. ######################################################################
  1270. # We don't enable bots by default.
  1271. matrix_bot_matrix_registration_bot_enabled: false
  1272. matrix_bot_matrix_registration_bot_container_image_self_build: "{{ matrix_architecture not in ['amd64'] }}"
  1273. matrix_bot_matrix_registration_bot_systemd_required_services_list: |
  1274. {{
  1275. ['docker.service']
  1276. +
  1277. ['matrix-' + matrix_homeserver_implementation + '.service']
  1278. +
  1279. (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
  1280. }}
  1281. ######################################################################
  1282. #
  1283. # /matrix-bot-matrix-registration-bot
  1284. #
  1285. ######################################################################
  1286. ######################################################################
  1287. #
  1288. # matrix-bot-maubot
  1289. #
  1290. ######################################################################
  1291. # We don't enable bots by default.
  1292. matrix_bot_maubot_enabled: false
  1293. matrix_bot_maubot_container_image_self_build: "{{ matrix_architecture not in ['amd64'] }}"
  1294. matrix_bot_maubot_systemd_required_services_list: |
  1295. {{
  1296. ['docker.service']
  1297. +
  1298. ['matrix-' + matrix_homeserver_implementation + '.service']
  1299. +
  1300. ([devture_postgres_identifier ~ '.service'] if devture_postgres_enabled else [])
  1301. +
  1302. (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
  1303. }}
  1304. matrix_bot_maubot_registration_shared_secret: |-
  1305. {{
  1306. {
  1307. 'synapse': matrix_synapse_registration_shared_secret,
  1308. 'dendrite': matrix_dendrite_client_api_registration_shared_secret,
  1309. }[matrix_homeserver_implementation]
  1310. }}
  1311. matrix_bot_maubot_management_interface_http_bind_port: "{{ (matrix_playbook_service_host_bind_interface_prefix ~ '' ~ matrix_bot_maubot_management_interface_port | string) if matrix_playbook_service_host_bind_interface_prefix else '' }}"
  1312. # Postgres is the default, except if not using internal Postgres server
  1313. matrix_bot_maubot_database_engine: "{{ 'postgres' if devture_postgres_enabled else 'sqlite' }}"
  1314. matrix_bot_maubot_database_hostname: "{{ devture_postgres_connection_hostname if devture_postgres_enabled else '' }}"
  1315. matrix_bot_maubot_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mxpup.dsc.db', rounds=655555) | to_uuid }}"
  1316. ######################################################################
  1317. #
  1318. # /matrix-bot-maubot
  1319. #
  1320. ######################################################################
  1321. ######################################################################
  1322. #
  1323. # matrix-bot-honoroit
  1324. #
  1325. ######################################################################
  1326. # We don't enable bots by default.
  1327. matrix_bot_honoroit_enabled: false
  1328. matrix_bot_honoroit_hostname: "{{ matrix_server_fqn_matrix }}"
  1329. matrix_bot_honoroit_path_prefix: /honoroit
  1330. # For consistency with other things hosted at the matrix FQN, we adjust the metrics endpoint
  1331. # so that metrics would be served at `/metrics/SERVICE_NAME`, and not at the default path for the role (`PREFIX/metrics`).
  1332. matrix_bot_honoroit_container_labels_traefik_metrics_path: /metrics/honoroit
  1333. matrix_bot_honoroit_systemd_required_services_list: |
  1334. {{
  1335. ['docker.service']
  1336. +
  1337. ([devture_postgres_identifier ~ '.service'] if devture_postgres_enabled else [])
  1338. +
  1339. (['matrix-synapse.service'] if matrix_synapse_enabled else [])
  1340. +
  1341. (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
  1342. }}
  1343. # Postgres is the default, except if not using internal Postgres server
  1344. matrix_bot_honoroit_database_engine: "{{ 'postgres' if devture_postgres_enabled else 'sqlite' }}"
  1345. matrix_bot_honoroit_database_hostname: "{{ devture_postgres_connection_hostname if devture_postgres_enabled else '' }}"
  1346. matrix_bot_honoroit_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'honoroit.bot.db', rounds=655555) | to_uuid }}"
  1347. matrix_bot_honoroit_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm64'] }}"
  1348. matrix_bot_honoroit_container_network: "{{ matrix_docker_network if matrix_playbook_reverse_proxy_type == 'playbook-managed-nginx' else 'matrix-bot-honoroit' }}"
  1349. # For now, we attach this to the matrix-nginx-proxy network (unless that's the same network as the main one for us),
  1350. # because that's where the homeserver is expected to be accessed from.
  1351. # In the future, this will need to be redone.
  1352. matrix_bot_honoroit_container_additional_networks: |
  1353. {{
  1354. (
  1355. ([matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network else [])
  1356. +
  1357. ([matrix_nginx_proxy_container_network] if matrix_nginx_proxy_enabled and matrix_bot_honoroit_container_network != matrix_nginx_proxy_container_network else [])
  1358. +
  1359. ([devture_postgres_container_network] if devture_postgres_enabled and devture_postgres_container_network != matrix_bot_honoroit_container_network else [])
  1360. ) | unique
  1361. }}
  1362. matrix_bot_honoroit_container_labels_traefik_enabled: "{{ matrix_playbook_traefik_labels_enabled }}"
  1363. matrix_bot_honoroit_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  1364. matrix_bot_honoroit_container_labels_traefik_entrypoints: "{{ devture_traefik_entrypoint_primary }}"
  1365. matrix_bot_honoroit_container_labels_traefik_tls_certResolver: "{{ devture_traefik_certResolver_primary }}"
  1366. ######################################################################
  1367. #
  1368. # /matrix-bot-honoroit
  1369. #
  1370. ######################################################################
  1371. ######################################################################
  1372. #
  1373. # matrix-bot-buscarron
  1374. #
  1375. ######################################################################
  1376. # We don't enable bots by default.
  1377. matrix_bot_buscarron_enabled: false
  1378. matrix_bot_buscarron_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm64'] }}"
  1379. matrix_bot_buscarron_systemd_required_services_list: |
  1380. {{
  1381. ['docker.service']
  1382. +
  1383. ([devture_postgres_identifier ~ '.service'] if devture_postgres_enabled else [])
  1384. +
  1385. (['matrix-synapse.service'] if matrix_synapse_enabled else [])
  1386. +
  1387. (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
  1388. }}
  1389. # Postgres is the default, except if not using internal Postgres server
  1390. matrix_bot_buscarron_database_engine: "{{ 'postgres' if devture_postgres_enabled else 'sqlite' }}"
  1391. matrix_bot_buscarron_database_hostname: "{{ devture_postgres_connection_hostname if devture_postgres_enabled else '' }}"
  1392. matrix_bot_buscarron_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'buscarron.bot.db', rounds=655555) | to_uuid }}"
  1393. matrix_bot_buscarron_hostname: "{{ matrix_server_fqn_buscarron }}"
  1394. matrix_bot_buscarron_container_network: "{{ matrix_docker_network if matrix_playbook_reverse_proxy_type == 'playbook-managed-nginx' else 'matrix-bot-buscarron' }}"
  1395. # For now, we attach this to the matrix-nginx-proxy network (unless that's the same network as the main one for us),
  1396. # because that's where the homeserver is expected to be accessed from.
  1397. # In the future, this will need to be redone.
  1398. matrix_bot_buscarron_container_additional_networks: |
  1399. {{
  1400. (
  1401. ([matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network else [])
  1402. +
  1403. ([matrix_nginx_proxy_container_network] if matrix_nginx_proxy_enabled and matrix_bot_buscarron_container_network != matrix_nginx_proxy_container_network else [])
  1404. +
  1405. ([devture_postgres_container_network] if devture_postgres_enabled and devture_postgres_container_network != matrix_bot_buscarron_container_network else [])
  1406. ) | unique
  1407. }}
  1408. matrix_bot_buscarron_container_labels_traefik_enabled: "{{ matrix_playbook_traefik_labels_enabled }}"
  1409. matrix_bot_buscarron_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  1410. matrix_bot_buscarron_container_labels_traefik_entrypoints: "{{ devture_traefik_entrypoint_primary }}"
  1411. matrix_bot_buscarron_container_labels_traefik_tls_certResolver: "{{ devture_traefik_certResolver_primary }}"
  1412. ######################################################################
  1413. #
  1414. # /matrix-bot-buscarron
  1415. #
  1416. ######################################################################
  1417. ######################################################################
  1418. #
  1419. # matrix-bot-postmoogle
  1420. #
  1421. ######################################################################
  1422. # We don't enable bots by default.
  1423. matrix_bot_postmoogle_enabled: false
  1424. matrix_bot_postmoogle_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm64'] }}"
  1425. matrix_bot_postmoogle_ssl_path: |-
  1426. {{
  1427. {
  1428. 'playbook-managed-traefik': devture_traefik_certs_dumper_dumped_certificates_dir_path,
  1429. 'other-traefik-container': devture_traefik_certs_dumper_dumped_certificates_dir_path,
  1430. 'playbook-managed-nginx': (matrix_ssl_config_dir_path if matrix_playbook_ssl_retrieval_method != 'none' else ''),
  1431. 'other-nginx-non-container': (matrix_ssl_config_dir_path if matrix_playbook_ssl_retrieval_method != 'none' else ''),
  1432. 'other-on-same-host': '',
  1433. 'other-on-another-host': '',
  1434. 'none': '',
  1435. }[matrix_playbook_reverse_proxy_type]
  1436. }}
  1437. matrix_playbook_bot_postmoogle_nginx_proxy_tls_cert: "{% for domain in matrix_bot_postmoogle_domains %}/ssl/live/{{ domain }}/fullchain.pem {% endfor %}"
  1438. matrix_playbook_bot_postmoogle_nginx_proxy_key: "{% for domain in matrix_bot_postmoogle_domains %}/ssl/live/{{ domain }}/privkey.pem {% endfor %}"
  1439. matrix_playbook_bot_postmoogle_traefik_tls_cert: "{% for domain in matrix_bot_postmoogle_domains %}/ssl/{{ domain }}/certificate.crt {% endfor %}"
  1440. matrix_playbook_bot_postmoogle_traefik_key: "{% for domain in matrix_bot_postmoogle_domains %}/ssl/{{ domain }}/privatekey.key {% endfor %}"
  1441. matrix_bot_postmoogle_tls_cert: |-
  1442. {{
  1443. {
  1444. 'playbook-managed-traefik': matrix_playbook_bot_postmoogle_traefik_tls_cert,
  1445. 'other-traefik-container': matrix_playbook_bot_postmoogle_traefik_tls_cert,
  1446. 'playbook-managed-nginx': (matrix_playbook_bot_postmoogle_nginx_proxy_tls_cert if matrix_playbook_ssl_retrieval_method != 'none' else ''),
  1447. 'other-nginx-non-container': (matrix_playbook_bot_postmoogle_nginx_proxy_tls_cert if matrix_playbook_ssl_retrieval_method != 'none' else ''),
  1448. 'other-on-same-host': '',
  1449. 'other-on-another-host': '',
  1450. 'none': '',
  1451. }[matrix_playbook_reverse_proxy_type]
  1452. }}
  1453. matrix_bot_postmoogle_tls_key: |-
  1454. {{
  1455. {
  1456. 'playbook-managed-traefik': matrix_playbook_bot_postmoogle_traefik_key,
  1457. 'other-traefik-container': matrix_playbook_bot_postmoogle_traefik_key,
  1458. 'playbook-managed-nginx': (matrix_playbook_bot_postmoogle_nginx_proxy_key if matrix_playbook_ssl_retrieval_method != 'none' else ''),
  1459. 'other-nginx-non-container': (matrix_playbook_bot_postmoogle_nginx_proxy_key if matrix_playbook_ssl_retrieval_method != 'none' else ''),
  1460. 'other-on-same-host': '',
  1461. 'other-on-another-host': '',
  1462. 'none': '',
  1463. }[matrix_playbook_reverse_proxy_type]
  1464. }}
  1465. 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 %}"
  1466. matrix_bot_postmoogle_systemd_required_services_list: |
  1467. {{
  1468. ['docker.service']
  1469. +
  1470. ([devture_postgres_identifier ~ '.service'] if devture_postgres_enabled else [])
  1471. +
  1472. (['matrix-synapse.service'] if matrix_synapse_enabled else [])
  1473. +
  1474. (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 [])
  1475. }}
  1476. # Postgres is the default, except if not using internal Postgres server
  1477. matrix_bot_postmoogle_database_engine: "{{ 'postgres' if devture_postgres_enabled else 'sqlite' }}"
  1478. matrix_bot_postmoogle_database_hostname: "{{ devture_postgres_connection_hostname if devture_postgres_enabled else '' }}"
  1479. matrix_bot_postmoogle_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'postmoogle.db', rounds=655555) | to_uuid }}"
  1480. ######################################################################
  1481. #
  1482. # /matrix-bot-postmoogle
  1483. #
  1484. ######################################################################
  1485. ######################################################################
  1486. #
  1487. # matrix-bot-chatgpt
  1488. #
  1489. ######################################################################
  1490. # We don't enable bots by default.
  1491. matrix_bot_chatgpt_enabled: false
  1492. matrix_bot_chatgpt_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm64'] }}"
  1493. ######################################################################
  1494. #
  1495. # /matrix-bot-chatgpt
  1496. #
  1497. ######################################################################
  1498. ######################################################################
  1499. #
  1500. # matrix-bot-go-neb
  1501. #
  1502. ######################################################################
  1503. # We don't enable bots by default.
  1504. matrix_bot_go_neb_enabled: false
  1505. matrix_bot_go_neb_scheme: "{{ 'https' if matrix_playbook_ssl_enabled else 'http' }}"
  1506. matrix_bot_go_neb_hostname: "{{ matrix_server_fqn_bot_go_neb }}"
  1507. matrix_bot_go_neb_container_network: "{{ matrix_nginx_proxy_container_network if matrix_playbook_reverse_proxy_type == 'playbook-managed-nginx' else 'matrix-bot-go-neb' }}"
  1508. matrix_bot_go_neb_container_additional_networks: |
  1509. {{
  1510. (
  1511. ([matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network else [])
  1512. +
  1513. ([matrix_homeserver_container_network] if matrix_homeserver_container_network != matrix_bot_go_neb_container_network else [])
  1514. +
  1515. ([devture_postgres_container_network] if devture_postgres_enabled and devture_postgres_container_network != matrix_bot_go_neb_container_network else [])
  1516. ) | unique
  1517. }}
  1518. 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 '' }}"
  1519. matrix_bot_go_neb_container_labels_traefik_enabled: "{{ matrix_playbook_traefik_labels_enabled }}"
  1520. matrix_bot_go_neb_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  1521. matrix_bot_go_neb_container_labels_traefik_entrypoints: "{{ devture_traefik_entrypoint_primary }}"
  1522. matrix_bot_go_neb_container_labels_traefik_tls_certResolver: "{{ devture_traefik_certResolver_primary }}"
  1523. matrix_bot_go_neb_systemd_required_services_list: |
  1524. {{
  1525. ['docker.service']
  1526. +
  1527. ['matrix-' + matrix_homeserver_implementation + '.service']
  1528. +
  1529. ([devture_postgres_identifier + '.service'] if devture_postgres_enabled else [])
  1530. +
  1531. (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
  1532. }}
  1533. ######################################################################
  1534. #
  1535. # /matrix-bot-go-neb
  1536. #
  1537. ######################################################################
  1538. ######################################################################
  1539. #
  1540. # matrix-bot-mjolnir
  1541. #
  1542. ######################################################################
  1543. # We don't enable bots by default.
  1544. matrix_bot_mjolnir_enabled: false
  1545. matrix_bot_mjolnir_container_image_self_build: "{{ matrix_architecture != 'amd64' }}"
  1546. matrix_bot_mjolnir_systemd_required_services_list: |
  1547. {{
  1548. ['docker.service']
  1549. +
  1550. ['matrix-' + matrix_homeserver_implementation + '.service']
  1551. +
  1552. ([devture_postgres_identifier ~ '.service'] if devture_postgres_enabled else [])
  1553. +
  1554. (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
  1555. }}
  1556. ######################################################################
  1557. #
  1558. # /matrix-bot-mjolnir
  1559. #
  1560. ######################################################################
  1561. ######################################################################
  1562. #
  1563. # matrix-bot-draupnir
  1564. #
  1565. ######################################################################
  1566. # We don't enable bots by default.
  1567. matrix_bot_draupnir_enabled: false
  1568. matrix_bot_draupnir_container_image_self_build: "{{ matrix_architecture != 'amd64' }}"
  1569. matrix_bot_draupnir_systemd_required_services_list: |
  1570. {{
  1571. ['docker.service']
  1572. +
  1573. ['matrix-' + matrix_homeserver_implementation + '.service']
  1574. +
  1575. ([devture_postgres_identifier ~ '.service'] if devture_postgres_enabled else [])
  1576. +
  1577. (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
  1578. }}
  1579. ######################################################################
  1580. #
  1581. # /matrix-bot-draupnir
  1582. #
  1583. ######################################################################
  1584. ######################################################################
  1585. #
  1586. # etke/backup_borg
  1587. #
  1588. ######################################################################
  1589. backup_borg_enabled: false
  1590. backup_borg_identifier: matrix-backup-borg
  1591. backup_borg_retention_prefix: matrix-
  1592. backup_borg_storage_archive_name_format: matrix-{now:%Y-%m-%d-%H%M%S}
  1593. backup_borg_base_path: "{{ matrix_base_data_path }}/backup-borg"
  1594. backup_borg_username: "{{ matrix_user_username }}"
  1595. backup_borg_uid: "{{ matrix_user_uid }}"
  1596. backup_borg_gid: "{{ matrix_user_gid }}"
  1597. backup_borg_container_network: "{{ devture_postgres_container_network if devture_postgres_enabled else backup_borg_identifier }}"
  1598. backup_borg_postgresql_version_detection_devture_postgres_role_name: "{{ 'galaxy/com.devture.ansible.role.postgres' if devture_postgres_enabled else '' }}"
  1599. backup_borg_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm32', 'arm64'] }}"
  1600. backup_borg_postgresql_enabled: "{{ devture_postgres_enabled }}"
  1601. backup_borg_postgresql_databases_hostname: "{{ devture_postgres_connection_hostname if devture_postgres_enabled else '' }}"
  1602. backup_borg_postgresql_databases_username: "{{ devture_postgres_connection_username if devture_postgres_enabled else '' }}"
  1603. backup_borg_postgresql_databases_password: "{{ devture_postgres_connection_password if devture_postgres_enabled else '' }}"
  1604. backup_borg_postgresql_databases_port: "{{ devture_postgres_connection_port if devture_postgres_enabled else 5432 }}"
  1605. backup_borg_postgresql_databases: "{{ devture_postgres_managed_databases | map(attribute='name') if devture_postgres_enabled else [] }}"
  1606. backup_borg_location_source_directories:
  1607. - "{{ matrix_base_data_path }}"
  1608. backup_borg_location_exclude_patterns: |
  1609. {{
  1610. ([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 [])
  1611. +
  1612. ([devture_postgres_data_path] if devture_postgres_enabled else [])
  1613. }}
  1614. backup_borg_systemd_required_services_list: |
  1615. {{
  1616. ['docker.service']
  1617. +
  1618. ([devture_postgres_identifier ~ '.service'] if devture_postgres_enabled else [])
  1619. }}
  1620. ######################################################################
  1621. #
  1622. # /etke/backup_borg
  1623. #
  1624. ######################################################################
  1625. ######################################################################
  1626. #
  1627. # matrix-cactus-comments
  1628. #
  1629. ######################################################################
  1630. matrix_cactus_comments_enabled: false
  1631. # Derive secret values from homeserver secret
  1632. matrix_cactus_comments_as_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'cactus.as.token', rounds=655555) | to_uuid }}"
  1633. matrix_cactus_comments_hs_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'cactus.hs.token', rounds=655555) | to_uuid }}"
  1634. matrix_cactus_comments_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm32', 'arm64'] }}"
  1635. matrix_cactus_comments_systemd_required_services_list: |
  1636. {{
  1637. (['docker.service'])
  1638. +
  1639. (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
  1640. +
  1641. (['matrix-' + matrix_homeserver_implementation + '.service'])
  1642. }}
  1643. matrix_cactus_comments_client_nginx_path: "{{ '/cactus-comments/' if matrix_nginx_proxy_enabled else matrix_cactus_comments_client_path + '/' }}"
  1644. ######################################################################
  1645. #
  1646. # /matrix-cactus-comments
  1647. #
  1648. ######################################################################
  1649. ######################################################################
  1650. #
  1651. # matrix-corporal
  1652. #
  1653. ######################################################################
  1654. matrix_corporal_enabled: false
  1655. matrix_corporal_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm32', 'arm64'] }}"
  1656. # Normally, matrix-nginx-proxy is enabled and nginx can reach matrix-corporal over the container network.
  1657. # If matrix-nginx-proxy is not enabled, or you otherwise have a need for it, you can expose
  1658. # matrix-corporal's web-server ports to the local host.
  1659. 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 '' }}"
  1660. 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 '' }}"
  1661. matrix_corporal_systemd_required_services_list: |
  1662. {{
  1663. (['docker.service'])
  1664. +
  1665. (['matrix-' + matrix_homeserver_implementation + '.service'])
  1666. }}
  1667. matrix_corporal_matrix_homeserver_api_endpoint: "{{ matrix_homeserver_container_url }}"
  1668. matrix_corporal_matrix_auth_shared_secret: "{{ matrix_synapse_ext_password_provider_shared_secret_auth_shared_secret }}"
  1669. # This is only useful if there's REST auth provider to make use of it.
  1670. matrix_corporal_http_gateway_internal_rest_auth_enabled: "{{ matrix_synapse_ext_password_provider_rest_auth_enabled }}"
  1671. matrix_corporal_matrix_registration_shared_secret: "{{ matrix_synapse_registration_shared_secret }}"
  1672. ######################################################################
  1673. #
  1674. # /matrix-corporal
  1675. #
  1676. ######################################################################
  1677. ######################################################################
  1678. #
  1679. # matrix-rageshake
  1680. #
  1681. ######################################################################
  1682. # We don't enable rageshake by default.
  1683. matrix_rageshake_enabled: false
  1684. matrix_rageshake_container_image_self_build: "{{ matrix_architecture not in ['amd64'] }}"
  1685. matrix_rageshake_hostname: "{{ matrix_server_fqn_rageshake }}"
  1686. matrix_rageshake_container_network: "{{ matrix_docker_network if matrix_playbook_reverse_proxy_type == 'playbook-managed-nginx' else 'matrix-rageshake' }}"
  1687. matrix_rageshake_container_additional_networks: "{{ [matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network else [] }}"
  1688. matrix_rageshake_container_http_host_bind_port: "{{ (matrix_playbook_service_host_bind_interface_prefix ~ '9110') if matrix_playbook_service_host_bind_interface_prefix else '' }}"
  1689. matrix_rageshake_container_labels_traefik_enabled: "{{ matrix_playbook_traefik_labels_enabled }}"
  1690. matrix_rageshake_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  1691. matrix_rageshake_container_labels_traefik_entrypoints: "{{ devture_traefik_entrypoint_primary }}"
  1692. matrix_rageshake_container_labels_traefik_tls_certResolver: "{{ devture_traefik_certResolver_primary }}"
  1693. ######################################################################
  1694. #
  1695. # /matrix-rageshake
  1696. #
  1697. ######################################################################
  1698. ######################################################################
  1699. #
  1700. # matrix-coturn
  1701. #
  1702. ######################################################################
  1703. matrix_coturn_enabled: true
  1704. matrix_coturn_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm32', 'arm64'] }}"
  1705. matrix_coturn_turn_external_ip_address: "{{ ansible_host }}"
  1706. matrix_coturn_turn_static_auth_secret: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'coturn.sas', rounds=655555) | to_uuid }}"
  1707. matrix_coturn_tls_enabled: "{{ matrix_playbook_ssl_retrieval_method != 'none' }}"
  1708. matrix_coturn_tls_cert_path: |-
  1709. {{
  1710. {
  1711. 'playbook-managed-traefik': '/certificate.crt',
  1712. 'other-traefik-container': '/certificate.crt',
  1713. 'playbook-managed-nginx': '/fullchain.pem',
  1714. 'other-nginx-non-container': '/fullchain.pem',
  1715. 'other-on-same-host': '',
  1716. 'other-on-another-host': '',
  1717. 'none': '',
  1718. }[matrix_playbook_reverse_proxy_type]
  1719. }}
  1720. matrix_coturn_tls_key_path: |-
  1721. {{
  1722. {
  1723. 'playbook-managed-traefik': '/privatekey.key',
  1724. 'other-traefik-container': '/privatekey.key',
  1725. 'playbook-managed-nginx': '/privkey.pem',
  1726. 'other-nginx-non-container': '/privkey.pem',
  1727. 'other-on-same-host': '',
  1728. 'other-on-another-host': '',
  1729. 'none': '',
  1730. }[matrix_playbook_reverse_proxy_type]
  1731. }}
  1732. matrix_coturn_container_additional_volumes: |
  1733. {{
  1734. (
  1735. [
  1736. {
  1737. 'src': (matrix_ssl_config_dir_path + '/live/' + matrix_server_fqn_matrix + '/fullchain.pem'),
  1738. 'dst': '/fullchain.pem',
  1739. 'options': 'ro',
  1740. },
  1741. {
  1742. 'src': (matrix_ssl_config_dir_path + '/live/' + matrix_server_fqn_matrix + '/privkey.pem'),
  1743. 'dst': '/privkey.pem',
  1744. 'options': 'ro',
  1745. },
  1746. ] if matrix_playbook_reverse_proxy_type in ['playbook-managed-nginx', 'other-nginx-non-container'] and matrix_coturn_tls_enabled else []
  1747. )
  1748. +
  1749. (
  1750. [
  1751. {
  1752. 'src': (devture_traefik_certs_dumper_dumped_certificates_dir_path + '/' + matrix_server_fqn_matrix + '/certificate.crt'),
  1753. 'dst': '/certificate.crt',
  1754. 'options': 'ro',
  1755. },
  1756. {
  1757. 'src': (devture_traefik_certs_dumper_dumped_certificates_dir_path + '/' + matrix_server_fqn_matrix + '/privatekey.key'),
  1758. 'dst': '/privatekey.key',
  1759. 'options': 'ro',
  1760. },
  1761. ] 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 []
  1762. )
  1763. }}
  1764. matrix_coturn_systemd_required_services_list: |
  1765. {{
  1766. ['docker.service']
  1767. +
  1768. ([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 [])
  1769. }}
  1770. ######################################################################
  1771. #
  1772. # /matrix-coturn
  1773. #
  1774. ######################################################################
  1775. ######################################################################
  1776. #
  1777. # matrix-dimension
  1778. #
  1779. ######################################################################
  1780. matrix_dimension_enabled: false
  1781. matrix_dimension_container_image_self_build: "{{ matrix_architecture != 'amd64' }}"
  1782. matrix_dimension_scheme: "{{ 'https' if matrix_playbook_ssl_enabled else 'http' }}"
  1783. matrix_dimension_hostname: "{{ matrix_server_fqn_dimension }}"
  1784. matrix_dimension_container_network: "{{ matrix_nginx_proxy_container_network if matrix_playbook_reverse_proxy_type == 'playbook-managed-nginx' else 'matrix-dimension' }}"
  1785. matrix_dimension_container_additional_networks: |
  1786. {{
  1787. (
  1788. ([matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network else [])
  1789. +
  1790. ([matrix_homeserver_container_network] if matrix_homeserver_container_network != matrix_dimension_container_network else [])
  1791. +
  1792. ([devture_postgres_container_network] if devture_postgres_enabled and devture_postgres_container_network != matrix_dimension_container_network else [])
  1793. ) | unique
  1794. }}
  1795. matrix_dimension_container_http_host_bind_port: "{{ (matrix_playbook_service_host_bind_interface_prefix ~ '8184') if matrix_playbook_service_host_bind_interface_prefix else '' }}"
  1796. matrix_dimension_container_labels_traefik_enabled: "{{ matrix_playbook_traefik_labels_enabled }}"
  1797. matrix_dimension_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  1798. matrix_dimension_container_labels_traefik_entrypoints: "{{ devture_traefik_entrypoint_primary }}"
  1799. matrix_dimension_container_labels_traefik_tls_certResolver: "{{ devture_traefik_certResolver_primary }}"
  1800. matrix_dimension_homeserver_clientServerUrl: "{{ matrix_homeserver_container_url }}"
  1801. matrix_dimension_homeserver_federationUrl: "{{ matrix_homeserver_container_federation_url }}"
  1802. matrix_dimension_homeserver_mediaUrl: "https://{{ matrix_server_fqn_matrix }}"
  1803. matrix_dimension_systemd_required_services_list: |
  1804. {{
  1805. ['docker.service']
  1806. +
  1807. ['matrix-' + matrix_homeserver_implementation + '.service']
  1808. +
  1809. ([devture_postgres_identifier ~ '.service'] if devture_postgres_enabled else [])
  1810. +
  1811. (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
  1812. }}
  1813. # Postgres is the default, except if not using internal Postgres server
  1814. matrix_dimension_database_engine: "{{ 'postgres' if devture_postgres_enabled else 'sqlite' }}"
  1815. matrix_dimension_database_hostname: "{{ devture_postgres_connection_hostname if devture_postgres_enabled else '' }}"
  1816. matrix_dimension_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'dimension.db', rounds=655555) | to_uuid }}"
  1817. ######################################################################
  1818. #
  1819. # /matrix-dimension
  1820. #
  1821. ######################################################################
  1822. ######################################################################
  1823. #
  1824. # etke/etherpad
  1825. #
  1826. ######################################################################
  1827. etherpad_enabled: false
  1828. etherpad_identifier: matrix-etherpad
  1829. etherpad_scheme: "{{ 'https' if matrix_playbook_ssl_enabled else 'http' }}"
  1830. etherpad_base_path: "{{ matrix_base_data_path }}/etherpad"
  1831. etherpad_framing_enabled: "{{ matrix_dimension_enabled or jitsi_enabled }}"
  1832. etherpad_hostname: "{{ matrix_server_fqn_etherpad }}"
  1833. etherpad_container_image_self_build: "{{ matrix_architecture not in ['amd64'] }}"
  1834. etherpad_container_http_host_bind_port: "{{ (matrix_playbook_service_host_bind_interface_prefix ~ '9001') if matrix_playbook_service_host_bind_interface_prefix else '' }}"
  1835. etherpad_container_network: "{{ matrix_nginx_proxy_container_network if matrix_playbook_reverse_proxy_type == 'playbook-managed-nginx' else etherpad_identifier }}"
  1836. etherpad_container_additional_networks: |
  1837. {{
  1838. (
  1839. ([matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network else [])
  1840. +
  1841. ([devture_postgres_container_network] if devture_postgres_enabled and devture_postgres_container_network != etherpad_container_network else [])
  1842. ) | unique
  1843. }}
  1844. etherpad_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  1845. etherpad_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  1846. etherpad_container_labels_traefik_entrypoints: "{{ devture_traefik_entrypoint_primary }}"
  1847. etherpad_container_labels_traefik_tls_certResolver: "{{ devture_traefik_certResolver_primary }}"
  1848. etherpad_systemd_required_services_list: |
  1849. {{
  1850. ['docker.service']
  1851. +
  1852. ([devture_postgres_identifier ~ '.service'] if devture_postgres_enabled else [])
  1853. }}
  1854. etherpad_database_hostname: "{{ devture_postgres_connection_hostname if devture_postgres_enabled else '' }}"
  1855. etherpad_database_name: matrix_etherpad
  1856. etherpad_database_username: matrix_etherpad
  1857. etherpad_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'etherpad.db', rounds=655555) | to_uuid }}"
  1858. ######################################################################
  1859. #
  1860. # /etke/etherpad
  1861. #
  1862. ######################################################################
  1863. ######################################################################
  1864. #
  1865. # matrix-dynamic-dns
  1866. #
  1867. ######################################################################
  1868. matrix_dynamic_dns_enabled: false
  1869. ######################################################################
  1870. #
  1871. # /matrix-dynamic-dns
  1872. #
  1873. ######################################################################
  1874. ######################################################################
  1875. #
  1876. # matrix-email2matrix
  1877. #
  1878. ######################################################################
  1879. matrix_email2matrix_enabled: false
  1880. matrix_email2matrix_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm32', 'arm64'] }}"
  1881. ######################################################################
  1882. #
  1883. # /matrix-email2matrix
  1884. #
  1885. ######################################################################
  1886. ######################################################################
  1887. #
  1888. # jitsi
  1889. #
  1890. ######################################################################
  1891. jitsi_enabled: false
  1892. jitsi_architecture: "{{ matrix_architecture }}"
  1893. jitsi_hostname: "{{ matrix_server_fqn_jitsi }}"
  1894. jitsi_identifier: matrix-jitsi
  1895. jitsi_base_path: "{{ matrix_base_data_path }}/jitsi"
  1896. jitsi_uid: "{{ matrix_user_uid }}"
  1897. jitsi_gid: "{{ matrix_user_gid }}"
  1898. # Normally, matrix-nginx-proxy is enabled and nginx can reach jitsi/web over the container network.
  1899. # If matrix-nginx-proxy is not enabled, or you otherwise have a need for it, you can expose
  1900. # the Jitsi HTTP port to the local host.
  1901. jitsi_web_container_http_host_bind_port: "{{ (matrix_playbook_service_host_bind_interface_prefix ~ '13080') if matrix_playbook_service_host_bind_interface_prefix else '' }}"
  1902. jitsi_web_container_additional_networks_auto: |
  1903. {{
  1904. ([matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network else [])
  1905. }}
  1906. 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 '' }}"
  1907. jitsi_jvb_container_additional_networks_auto: |
  1908. {{
  1909. ([matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network else [])
  1910. }}
  1911. jitsi_prosody_container_http_host_bind_port: "{{ (matrix_playbook_service_host_bind_interface_prefix ~ '5280') if matrix_playbook_service_host_bind_interface_prefix else '' }}"
  1912. jitsi_prosody_container_additional_networks_auto: |
  1913. {{
  1914. ([matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network else [])
  1915. }}
  1916. jitsi_container_labels_traefik_enabled: "{{ matrix_playbook_traefik_labels_enabled }}"
  1917. jitsi_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  1918. jitsi_container_labels_traefik_entrypoints: "{{ devture_traefik_entrypoint_primary }}"
  1919. jitsi_container_labels_traefik_tls_certResolver: "{{ devture_traefik_certResolver_primary }}"
  1920. jitsi_jibri_xmpp_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'jibri', rounds=655555) | to_uuid }}"
  1921. jitsi_jicofo_auth_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'jicofo', rounds=655555) | to_uuid }}"
  1922. jitsi_jvb_auth_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'jvb', rounds=655555) | to_uuid }}"
  1923. jitsi_web_stun_servers: |
  1924. {{
  1925. [
  1926. 'stun:' + matrix_server_fqn_matrix + ':5349',
  1927. 'stun:' + matrix_server_fqn_matrix + ':3478',
  1928. ]
  1929. if matrix_coturn_enabled
  1930. else [ 'stun:meet-jit-si-turnrelay.jitsi.net:443']
  1931. }}
  1932. # The Jitsi instance installed by this playbook is meant for embedding into Matrix clients, so framing is allowed.
  1933. jitsi_web_framing_enabled: true
  1934. jitsi_turn_credentials: "{{ matrix_coturn_turn_static_auth_secret if matrix_coturn_enabled else '' }}"
  1935. jitsi_turn_host: "{{ ('turn.' + matrix_server_fqn_matrix) if matrix_coturn_enabled else '' }}"
  1936. jitsi_turns_host: "{{ ('turn.' + matrix_server_fqn_matrix) if matrix_coturn_enabled else '' }}"
  1937. jitsi_turn_port: "{{ matrix_coturn_container_stun_plain_host_bind_port if matrix_coturn_enabled else '' }}"
  1938. jitsi_turns_port: "{{ matrix_coturn_container_stun_tls_host_bind_port if matrix_coturn_enabled else '' }}"
  1939. # If the self-hosted Etherpad instance is available, it will also show up in Jitsi conferences,
  1940. # unless explicitly disabled by setting `jitsi_etherpad_enabled` to false.
  1941. # Falls back to the scalar.vector.im etherpad in case someone sets `jitsi_etherpad_enabled` to true,
  1942. # while also setting `etherpad_enabled` to false.
  1943. jitsi_etherpad_enabled: "{{ etherpad_enabled }}"
  1944. jitsi_etherpad_base: "{{ etherpad_base_url if etherpad_enabled else 'https://scalar.vector.im/etherpad' }}"
  1945. # Allow verification using JWT and matrix-UVS
  1946. jitsi_prosody_auth_matrix_uvs_auth_token: "{{ matrix_user_verification_service_uvs_auth_token }}"
  1947. jitsi_prosody_auth_matrix_uvs_location: "{{ matrix_user_verification_service_container_url }}"
  1948. jitsi_self_check_validate_certificates: "{{ false if matrix_ssl_retrieval_method == 'self-signed' else true }}"
  1949. # Gravatar is enabled by default upstream, but there's no need to leak data there needlessly
  1950. # when embedding Jitsi in Matrix rooms.
  1951. jitsi_disable_gravatar: true
  1952. ######################################################################
  1953. #
  1954. # /jitsi
  1955. #
  1956. ######################################################################
  1957. ######################################################################
  1958. #
  1959. # matrix-ldap-registration-proxy
  1960. #
  1961. ######################################################################
  1962. # This is only for users with a specific LDAP setup
  1963. matrix_ldap_registration_proxy_enabled: false
  1964. ######################################################################
  1965. #
  1966. # /matrix-ldap-registration-proxy
  1967. #
  1968. ######################################################################
  1969. ######################################################################
  1970. #
  1971. # matrix-mailer
  1972. #
  1973. ######################################################################
  1974. # By default, this playbook sets up an exim mailer server (running in a container).
  1975. # This is so that Synapse can send email reminders for unread messages.
  1976. # Other services (like ma1sd), also use the mailer.
  1977. matrix_mailer_enabled: true
  1978. matrix_mailer_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm32', 'arm64'] }}"
  1979. ######################################################################
  1980. #
  1981. # /matrix-mailer
  1982. #
  1983. ######################################################################
  1984. ######################################################################
  1985. #
  1986. # matrix-ma1sd
  1987. #
  1988. ######################################################################
  1989. # We no longer install the ma1sd identity server by default.
  1990. #
  1991. # The main reason we used to install ma1sd by default in the past was to
  1992. # prevent Element from talking to the `matrix.org` / `vector.im` identity servers,
  1993. # by forcing it to talk to our own self-hosted (but otherwise useless) identity server instead,
  1994. # thus preventing contact list leaks.
  1995. #
  1996. # Since Element no longer defaults to using a public identity server if another one is not provided,
  1997. # we can stop installing ma1sd.
  1998. matrix_ma1sd_enabled: false
  1999. matrix_ma1sd_container_image_self_build: "{{ matrix_architecture != 'amd64' }}"
  2000. # Normally, matrix-nginx-proxy is enabled and nginx can reach ma1sd over the container network.
  2001. # If matrix-nginx-proxy is not enabled, or you otherwise have a need for it, you can expose
  2002. # ma1sd's web-server port.
  2003. 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 '' }}"
  2004. # We enable Synapse integration via its Postgres database by default.
  2005. # When using another Identity store, you might wish to disable this and define
  2006. # your own configuration in `matrix_ma1sd_configuration_extension_yaml`.
  2007. matrix_ma1sd_synapsesql_enabled: true
  2008. matrix_ma1sd_synapsesql_type: postgresql
  2009. matrix_ma1sd_synapsesql_connection: //{{ matrix_synapse_database_host }}/{{ matrix_synapse_database_database }}?user={{ matrix_synapse_database_user | urlencode() }}&password={{ matrix_synapse_database_password | urlencode() }}
  2010. matrix_ma1sd_dns_overwrite_enabled: true
  2011. matrix_ma1sd_dns_overwrite_homeserver_client_name: "{{ matrix_server_fqn_matrix }}"
  2012. # The `matrix_ma1sd_dns_overwrite_homeserver_client_value` value when matrix_nginx_proxy_enabled is false covers the general case,
  2013. # but may be inaccurate if matrix-corporal is enabled.
  2014. matrix_ma1sd_dns_overwrite_homeserver_client_value: "{{ matrix_homeserver_container_url }}"
  2015. # By default, we send mail through the `matrix-mailer` service.
  2016. matrix_ma1sd_threepid_medium_email_identity_from: "{{ matrix_mailer_sender_address }}"
  2017. matrix_ma1sd_threepid_medium_email_connectors_smtp_host: "matrix-mailer"
  2018. matrix_ma1sd_threepid_medium_email_connectors_smtp_port: 8025
  2019. matrix_ma1sd_threepid_medium_email_connectors_smtp_tls: 0
  2020. matrix_ma1sd_self_check_validate_certificates: "{{ false if matrix_playbook_ssl_retrieval_method == 'self-signed' else true }}"
  2021. matrix_ma1sd_systemd_required_services_list: |
  2022. {{
  2023. ([devture_postgres_identifier ~ '.service'] if devture_postgres_enabled else [])
  2024. }}
  2025. matrix_ma1sd_systemd_wanted_services_list: |
  2026. {{
  2027. (['matrix-corporal.service'] if matrix_corporal_enabled else ['matrix-' + matrix_homeserver_implementation + '.service'])
  2028. +
  2029. ([devture_postgres_identifier ~ '.service'] if devture_postgres_enabled else [])
  2030. +
  2031. (['matrix-mailer.service'] if matrix_mailer_enabled else [])
  2032. }}
  2033. # Postgres is the default, except if not using internal Postgres server
  2034. matrix_ma1sd_database_engine: "{{ 'postgres' if devture_postgres_enabled else 'sqlite' }}"
  2035. matrix_ma1sd_database_hostname: "{{ devture_postgres_connection_hostname if devture_postgres_enabled else '' }}"
  2036. matrix_ma1sd_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'ma1sd.db', rounds=655555) | to_uuid }}"
  2037. ######################################################################
  2038. #
  2039. # /matrix-ma1sd
  2040. #
  2041. ######################################################################
  2042. ######################################################################
  2043. #
  2044. # matrix-nginx-proxy
  2045. #
  2046. ######################################################################
  2047. # This playbook installs its own nginx if
  2048. # - it's explicitly enabled
  2049. # - Traefik is in use. Not all services are Traefik-native yet, so we use reverse-proxy to some via a local-only matrix-nginx-proxy
  2050. matrix_nginx_proxy_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-nginx', 'playbook-managed-traefik', 'other-traefik-container'] }}"
  2051. # matrix-nginx-proxy is only to handle HTTPS only if it's the chosen reverse-proxy.
  2052. # It may be enabled even if it's not chosen. See `matrix_nginx_proxy_enabled`.
  2053. matrix_ssl_retrieval_method: "{{ 'lets-encrypt' if matrix_playbook_reverse_proxy_type == 'playbook-managed-nginx' else 'none' }}"
  2054. matrix_nginx_proxy_https_enabled: "{{ matrix_playbook_reverse_proxy_type == 'playbook-managed-nginx' }}"
  2055. # matrix-nginx-proxy is to publish ports only if it's the chosen reverse-proxy.
  2056. # It may be enabled even if it's not chosen. See `matrix_nginx_proxy_enabled`.
  2057. matrix_nginx_proxy_container_http_host_bind_port: "{{ '80' if matrix_playbook_reverse_proxy_type == 'playbook-managed-nginx' else '' }}"
  2058. matrix_nginx_proxy_container_federation_host_bind_port: "{{ matrix_federation_public_port if matrix_playbook_reverse_proxy_type == 'playbook-managed-nginx' else '' }}"
  2059. # matrix-nginx-proxy is to trust reverse-proxy forwarded protocol and headers, unless it's the "main" (chosen) reverse-proxy
  2060. matrix_nginx_proxy_trust_forwarded_proto: "{{ matrix_playbook_reverse_proxy_type != 'playbook-managed-nginx' }}"
  2061. matrix_nginx_proxy_x_forwarded_for: "{{ '$remote_addr' if matrix_playbook_reverse_proxy_type == 'playbook-managed-nginx' else '$proxy_add_x_forwarded_for' }}"
  2062. matrix_nginx_proxy_container_additional_networks: |
  2063. {{
  2064. (
  2065. ([matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network else [])
  2066. +
  2067. ([jitsi_container_network] if jitsi_enabled and matrix_playbook_reverse_proxy_type == 'playbook-managed-nginx' and jitsi_container_network != matrix_nginx_proxy_container_network else [])
  2068. ) | unique
  2069. }}
  2070. matrix_nginx_proxy_proxy_matrix_client_api_addr_with_container: "{{ 'matrix-corporal:41080' if matrix_corporal_enabled else 'matrix-nginx-proxy:12080' }}"
  2071. matrix_nginx_proxy_proxy_matrix_client_api_addr_sans_container: "{{ '127.0.0.1:41080' if matrix_corporal_enabled else '127.0.0.1:12080' }}"
  2072. matrix_nginx_proxy_proxy_matrix_client_api_client_max_body_size_mb: |-
  2073. {{
  2074. {
  2075. 'synapse': matrix_synapse_max_upload_size_mb,
  2076. 'dendrite': (matrix_dendrite_max_file_size_bytes / 1024 / 1024) | round,
  2077. 'conduit': (matrix_conduit_max_request_size / 1024 / 1024) | round,
  2078. }[matrix_homeserver_implementation]|int
  2079. }}
  2080. matrix_nginx_proxy_proxy_matrix_client_api_forwarded_location_synapse_admin_api_enabled: "{{ matrix_synapse_admin_enabled or matrix_bot_matrix_registration_bot_enabled }}"
  2081. matrix_nginx_proxy_proxy_matrix_client_redirect_root_uri_to_domain: "{{ matrix_server_fqn_element if matrix_client_element_enabled else '' }}"
  2082. matrix_nginx_proxy_proxy_matrix_enabled: true
  2083. matrix_nginx_proxy_proxy_element_enabled: "{{ matrix_client_element_enabled and matrix_playbook_reverse_proxy_type in ['playbook-managed-nginx', 'other-nginx-non-container'] }}"
  2084. matrix_nginx_proxy_proxy_hydrogen_enabled: "{{ matrix_client_hydrogen_enabled and matrix_playbook_reverse_proxy_type in ['playbook-managed-nginx', 'other-nginx-non-container'] }}"
  2085. matrix_nginx_proxy_proxy_cinny_enabled: "{{ matrix_client_cinny_enabled and matrix_playbook_reverse_proxy_type in ['playbook-managed-nginx', 'other-nginx-non-container'] }}"
  2086. matrix_nginx_proxy_proxy_buscarron_enabled: "{{ matrix_bot_buscarron_enabled and matrix_playbook_reverse_proxy_type in ['playbook-managed-nginx', 'other-nginx-non-container'] }}"
  2087. matrix_nginx_proxy_proxy_dimension_enabled: "{{ matrix_dimension_enabled and matrix_playbook_reverse_proxy_type in ['playbook-managed-nginx', 'other-nginx-non-container'] }}"
  2088. matrix_nginx_proxy_proxy_rageshake_enabled: "{{ matrix_rageshake_enabled and matrix_playbook_reverse_proxy_type in ['playbook-managed-nginx', 'other-nginx-non-container'] }}"
  2089. matrix_nginx_proxy_proxy_etherpad_enabled: "{{ etherpad_enabled and not etherpad_nginx_proxy_dimension_integration_enabled and matrix_playbook_reverse_proxy_type in ['playbook-managed-nginx', 'other-nginx-non-container'] }}"
  2090. matrix_nginx_proxy_proxy_bot_go_neb_enabled: "{{ matrix_bot_go_neb_enabled and matrix_playbook_reverse_proxy_type in ['playbook-managed-nginx', 'other-nginx-non-container'] }}"
  2091. matrix_nginx_proxy_proxy_jitsi_enabled: "{{ jitsi_enabled and matrix_playbook_reverse_proxy_type in ['playbook-managed-nginx', 'other-nginx-non-container'] }}"
  2092. matrix_nginx_proxy_proxy_grafana_enabled: "{{ grafana_enabled and matrix_playbook_reverse_proxy_type in ['playbook-managed-nginx', 'other-nginx-non-container'] }}"
  2093. matrix_nginx_proxy_proxy_sygnal_enabled: "{{ matrix_sygnal_enabled and matrix_playbook_reverse_proxy_type in ['playbook-managed-nginx', 'other-nginx-non-container'] }}"
  2094. matrix_nginx_proxy_proxy_ntfy_enabled: "{{ ntfy_enabled and matrix_playbook_reverse_proxy_type in ['playbook-managed-nginx', 'other-nginx-non-container'] }}"
  2095. matrix_nginx_proxy_container_labels_traefik_enabled: "{{ matrix_playbook_traefik_labels_enabled }}"
  2096. matrix_nginx_proxy_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  2097. matrix_nginx_proxy_container_labels_traefik_entrypoints: "{{ devture_traefik_entrypoint_primary }}"
  2098. matrix_nginx_proxy_container_labels_traefik_tls_certResolver: "{{ devture_traefik_certResolver_primary }}"
  2099. matrix_nginx_proxy_container_labels_traefik_proxy_matrix_enabled: true
  2100. matrix_nginx_proxy_proxy_matrix_corporal_api_enabled: "{{ matrix_corporal_enabled and matrix_corporal_http_api_enabled }}"
  2101. matrix_nginx_proxy_proxy_matrix_corporal_api_addr_with_container: "matrix-corporal:41081"
  2102. matrix_nginx_proxy_proxy_matrix_corporal_api_addr_sans_container: "127.0.0.1:41081"
  2103. matrix_nginx_proxy_proxy_matrix_identity_api_enabled: "{{ matrix_ma1sd_enabled }}"
  2104. matrix_nginx_proxy_proxy_matrix_identity_api_addr_with_container: "matrix-ma1sd:{{ matrix_ma1sd_container_port }}"
  2105. matrix_nginx_proxy_proxy_matrix_identity_api_addr_sans_container: "127.0.0.1:{{ matrix_ma1sd_container_port }}"
  2106. # By default, we do TLS termination for the Matrix Federation API (port 8448) at matrix-nginx-proxy.
  2107. # Unless this is handled there OR Synapse's federation listener port is disabled, we'll reverse-proxy.
  2108. matrix_nginx_proxy_proxy_matrix_federation_api_enabled: |-
  2109. {{
  2110. {
  2111. 'synapse': (matrix_synapse_federation_port_enabled and not matrix_synapse_tls_federation_listener_enabled),
  2112. 'dendrite': matrix_dendrite_federation_enabled,
  2113. 'conduit': matrix_conduit_allow_federation,
  2114. }[matrix_homeserver_implementation]|bool
  2115. }}
  2116. matrix_nginx_proxy_proxy_matrix_federation_api_addr_with_container: "matrix-nginx-proxy:12088"
  2117. matrix_nginx_proxy_proxy_matrix_federation_api_addr_sans_container: "127.0.0.1:12088"
  2118. matrix_nginx_proxy_proxy_synapse_enabled: "{{ matrix_synapse_enabled }}"
  2119. matrix_nginx_proxy_proxy_synapse_client_api_addr_with_container: "{{ 'matrix-synapse-reverse-proxy-companion:8008' if matrix_synapse_reverse_proxy_companion_enabled else 'matrix-synapse:8008' }}"
  2120. matrix_nginx_proxy_proxy_synapse_client_api_addr_sans_container: "127.0.0.1:8008"
  2121. matrix_nginx_proxy_proxy_synapse_federation_api_addr_with_container: "{{ 'matrix-synapse-reverse-proxy-companion:8048' if matrix_synapse_reverse_proxy_companion_enabled else 'matrix-synapse:8048' }}"
  2122. matrix_nginx_proxy_proxy_synapse_federation_api_addr_sans_container: "127.0.0.1:8048"
  2123. matrix_nginx_proxy_proxy_dendrite_enabled: "{{ matrix_dendrite_enabled }}"
  2124. matrix_nginx_proxy_proxy_dendrite_client_api_addr_with_container: "matrix-dendrite:{{ matrix_dendrite_http_bind_port | string }}"
  2125. matrix_nginx_proxy_proxy_dendrite_client_api_addr_sans_container: "127.0.0.1:{{ matrix_dendrite_http_bind_port | string }}"
  2126. matrix_nginx_proxy_proxy_dendrite_federation_api_addr_with_container: "matrix-dendrite:{{ matrix_dendrite_http_bind_port | string }}"
  2127. matrix_nginx_proxy_proxy_dendrite_federation_api_addr_sans_container: "127.0.0.1:{{ matrix_dendrite_http_bind_port | string }}"
  2128. matrix_nginx_proxy_proxy_conduit_enabled: "{{ matrix_conduit_enabled }}"
  2129. matrix_nginx_proxy_proxy_conduit_client_api_addr_with_container: "matrix-conduit:{{ matrix_conduit_port_number|string }}"
  2130. matrix_nginx_proxy_proxy_conduit_client_api_addr_sans_container: "127.0.0.1:{{ matrix_conduit_port_number|string }}"
  2131. matrix_nginx_proxy_proxy_conduit_federation_api_addr_with_container: "matrix-conduit:{{ matrix_conduit_port_number|string }}"
  2132. matrix_nginx_proxy_proxy_conduit_federation_api_addr_sans_container: "127.0.0.1:{{ matrix_conduit_port_number|string }}"
  2133. # When matrix-nginx-proxy is disabled, the actual port number that the vhost uses may begin to matter.
  2134. matrix_nginx_proxy_proxy_matrix_federation_port: "{{ matrix_federation_public_port }}"
  2135. matrix_nginx_proxy_proxy_matrix_user_directory_search_enabled: "{{ matrix_ma1sd_enabled }}"
  2136. matrix_nginx_proxy_proxy_matrix_user_directory_search_addr_with_container: "{{ matrix_nginx_proxy_proxy_matrix_identity_api_addr_with_container }}"
  2137. matrix_nginx_proxy_proxy_matrix_user_directory_search_addr_sans_container: "{{ matrix_nginx_proxy_proxy_matrix_identity_api_addr_sans_container }}"
  2138. matrix_nginx_proxy_self_check_validate_certificates: "{{ false if matrix_playbook_ssl_retrieval_method == 'self-signed' else true }}"
  2139. # OCSP stapling does not make sense when self-signed certificates are used.
  2140. # See https://github.com/spantaleev/matrix-docker-ansible-deploy/issues/1073
  2141. # and https://github.com/spantaleev/matrix-docker-ansible-deploy/pull/1074
  2142. matrix_nginx_proxy_ocsp_stapling_enabled: "{{ matrix_playbook_ssl_retrieval_method != 'self-signed' }}"
  2143. matrix_nginx_proxy_systemd_wanted_services_list: |
  2144. {{
  2145. ['matrix-' + matrix_homeserver_implementation + '.service']
  2146. +
  2147. (matrix_synapse_webserving_workers_systemd_services_list if matrix_homeserver_implementation == 'synapse' and matrix_synapse_workers_enabled else [])
  2148. +
  2149. (['matrix-synapse-reverse-proxy-companion.service'] if matrix_synapse_reverse_proxy_companion_enabled else [])
  2150. +
  2151. (['matrix-corporal.service'] if matrix_corporal_enabled else [])
  2152. +
  2153. (['matrix-ma1sd.service'] if matrix_ma1sd_enabled else [])
  2154. +
  2155. (['matrix-client-cinny.service'] if matrix_client_cinny_enabled and matrix_playbook_reverse_proxy_type in ['playbook-managed-nginx', 'other-nginx-non-container'] else [])
  2156. +
  2157. (['matrix-bot-buscarron.service'] if matrix_bot_buscarron_enabled and matrix_playbook_reverse_proxy_type in ['playbook-managed-nginx', 'other-nginx-non-container'] else [])
  2158. +
  2159. (['matrix-client-element.service'] if matrix_client_element_enabled and matrix_playbook_reverse_proxy_type in ['playbook-managed-nginx', 'other-nginx-non-container'] else [])
  2160. +
  2161. (['matrix-client-hydrogen.service'] if matrix_client_hydrogen_enabled and matrix_playbook_reverse_proxy_type in ['playbook-managed-nginx', 'other-nginx-non-container'] else [])
  2162. +
  2163. ([(grafana_identifier + '.service')] if grafana_enabled and matrix_playbook_reverse_proxy_type in ['playbook-managed-nginx', 'other-nginx-non-container'] else [])
  2164. +
  2165. (['matrix-dimension.service'] if matrix_dimension_enabled and matrix_playbook_reverse_proxy_type in ['playbook-managed-nginx', 'other-nginx-non-container'] else [])
  2166. +
  2167. (['matrix-rageshake.service'] if matrix_rageshake_enabled and matrix_playbook_reverse_proxy_type in ['playbook-managed-nginx', 'other-nginx-non-container'] else [])
  2168. +
  2169. (['matrix-sygnal.service'] if matrix_sygnal_enabled and matrix_playbook_reverse_proxy_type in ['playbook-managed-nginx', 'other-nginx-non-container'] else [])
  2170. +
  2171. ([(ntfy_identifier + '.service')] if ntfy_enabled and matrix_playbook_reverse_proxy_type in ['playbook-managed-nginx', 'other-nginx-non-container'] else [])
  2172. +
  2173. ([(jitsi_identifier + '-web.service')] if jitsi_enabled and matrix_playbook_reverse_proxy_type in ['playbook-managed-nginx', 'other-nginx-non-container'] else [])
  2174. +
  2175. (['matrix-bot-go-neb.service'] if matrix_bot_go_neb_enabled and matrix_playbook_reverse_proxy_type in ['playbook-managed-nginx', 'other-nginx-non-container'] else [])
  2176. +
  2177. ([etherpad_identifier + '.service'] if etherpad_enabled and matrix_playbook_reverse_proxy_type in ['playbook-managed-nginx', 'other-nginx-non-container'] else [])
  2178. +
  2179. (['matrix-hookshot.service'] if matrix_hookshot_enabled and matrix_playbook_reverse_proxy_type in ['playbook-managed-nginx', 'other-nginx-non-container'] else [])
  2180. }}
  2181. matrix_ssl_domains_to_obtain_certificates_for: |
  2182. {{
  2183. ([matrix_server_fqn_matrix])
  2184. +
  2185. ([matrix_server_fqn_element] if matrix_client_element_enabled else [])
  2186. +
  2187. ([matrix_nginx_proxy_proxy_riot_compat_redirect_hostname] if matrix_nginx_proxy_proxy_riot_compat_redirect_enabled else [])
  2188. +
  2189. ([matrix_server_fqn_hydrogen] if matrix_client_hydrogen_enabled else [])
  2190. +
  2191. ([matrix_server_fqn_cinny] if matrix_client_cinny_enabled else [])
  2192. +
  2193. ([matrix_server_fqn_buscarron] if matrix_bot_buscarron_enabled else [])
  2194. +
  2195. ([matrix_server_fqn_dimension] if matrix_dimension_enabled else [])
  2196. +
  2197. ([matrix_server_fqn_etherpad] if (etherpad_enabled and not etherpad_nginx_proxy_dimension_integration_enabled) else [])
  2198. +
  2199. ([matrix_server_fqn_bot_go_neb] if matrix_bot_go_neb_enabled else [])
  2200. +
  2201. ([matrix_server_fqn_jitsi] if jitsi_enabled else [])
  2202. +
  2203. ([matrix_server_fqn_grafana] if grafana_enabled else [])
  2204. +
  2205. ([matrix_server_fqn_sygnal] if matrix_sygnal_enabled else [])
  2206. +
  2207. ([ntfy_hostname] if ntfy_enabled else [])
  2208. +
  2209. ([matrix_server_fqn_rageshake] if matrix_rageshake_enabled else [])
  2210. +
  2211. (matrix_bot_postmoogle_domains if matrix_bot_postmoogle_enabled else [])
  2212. +
  2213. ([matrix_domain] if matrix_nginx_proxy_base_domain_serving_enabled else [])
  2214. +
  2215. matrix_ssl_additional_domains_to_obtain_certificates_for
  2216. }}
  2217. matrix_ssl_architecture: "{{
  2218. {
  2219. 'amd64': 'amd64',
  2220. 'arm32': 'arm32v6',
  2221. 'arm64': 'arm64v8',
  2222. }[matrix_architecture]
  2223. }}"
  2224. matrix_ssl_pre_obtaining_required_service_name: "{{ 'matrix-dynamic-dns' if matrix_dynamic_dns_enabled else '' }}"
  2225. matrix_nginx_proxy_access_log_syslog_integration_enabled: "{{ matrix_prometheus_nginxlog_exporter_enabled }}"
  2226. matrix_nginx_proxy_access_log_syslog_integration_server_port: "{{ (matrix_prometheus_nginxlog_exporter_container_hostname | string +':'+ matrix_prometheus_nginxlog_exporter_container_syslog_port | string) | default('') }}"
  2227. ######################################################################
  2228. #
  2229. # /matrix-nginx-proxy
  2230. #
  2231. ######################################################################
  2232. ########################################################################
  2233. # #
  2234. # com.devture.ansible.role.postgres #
  2235. # #
  2236. ########################################################################
  2237. # To completely disable installing Postgres, use `devture_postgres_enabled: false`.
  2238. devture_postgres_identifier: matrix-postgres
  2239. devture_postgres_architecture: "{{ matrix_architecture }}"
  2240. devture_postgres_base_path: "{{ matrix_base_data_path }}/postgres"
  2241. devture_postgres_container_network: "{{ matrix_docker_network }}"
  2242. devture_postgres_uid: "{{ matrix_user_uid }}"
  2243. devture_postgres_gid: "{{ matrix_user_gid }}"
  2244. devture_postgres_connection_username: matrix
  2245. devture_postgres_db_name: matrix
  2246. devture_postgres_systemd_services_to_stop_for_maintenance_list: |
  2247. {{
  2248. ['matrix-' + matrix_homeserver_implementation + '.service']
  2249. }}
  2250. devture_postgres_managed_databases_auto: |
  2251. {{
  2252. ([{
  2253. 'name': matrix_synapse_database_database,
  2254. 'username': matrix_synapse_database_user,
  2255. 'password': matrix_synapse_database_password,
  2256. }] if (matrix_synapse_enabled and matrix_synapse_database_host == devture_postgres_connection_hostname) else [])
  2257. +
  2258. ([{
  2259. 'name': matrix_dendrite_federation_api_database,
  2260. 'username': matrix_dendrite_database_user,
  2261. 'password': matrix_dendrite_database_password,
  2262. },{
  2263. 'name': matrix_dendrite_key_server_database,
  2264. 'username': matrix_dendrite_database_user,
  2265. 'password': matrix_dendrite_database_password,
  2266. },{
  2267. 'name': matrix_dendrite_media_api_database,
  2268. 'username': matrix_dendrite_database_user,
  2269. 'password': matrix_dendrite_database_password,
  2270. },{
  2271. 'name': matrix_dendrite_room_database,
  2272. 'username': matrix_dendrite_database_user,
  2273. 'password': matrix_dendrite_database_password,
  2274. },{
  2275. 'name': matrix_dendrite_sync_api_database,
  2276. 'username': matrix_dendrite_database_user,
  2277. 'password': matrix_dendrite_database_password,
  2278. },{
  2279. 'name': matrix_dendrite_user_api_database,
  2280. 'username': matrix_dendrite_database_user,
  2281. 'password': matrix_dendrite_database_password,
  2282. },{
  2283. 'name': matrix_dendrite_relay_api_database,
  2284. 'username': matrix_dendrite_database_user,
  2285. 'password': matrix_dendrite_database_password,
  2286. },{
  2287. 'name': matrix_dendrite_push_server_database,
  2288. 'username': matrix_dendrite_database_user,
  2289. 'password': matrix_dendrite_database_password,
  2290. },{
  2291. 'name': matrix_dendrite_mscs_database,
  2292. 'username': matrix_dendrite_database_user,
  2293. 'password': matrix_dendrite_database_password,
  2294. }] if (matrix_dendrite_enabled and matrix_dendrite_database_hostname == devture_postgres_connection_hostname) else [])
  2295. +
  2296. ([{
  2297. 'name': matrix_sliding_sync_database_name,
  2298. 'username': matrix_sliding_sync_database_username,
  2299. 'password': matrix_sliding_sync_database_password,
  2300. }] if (matrix_sliding_sync_enabled) else [])
  2301. +
  2302. ([{
  2303. 'name': matrix_ma1sd_database_name,
  2304. 'username': matrix_ma1sd_database_username,
  2305. 'password': matrix_ma1sd_database_password,
  2306. }] if (matrix_ma1sd_enabled and matrix_ma1sd_database_engine == 'postgres' and matrix_ma1sd_database_hostname == devture_postgres_connection_hostname) else [])
  2307. +
  2308. ([{
  2309. 'name': matrix_bot_matrix_reminder_bot_database_name,
  2310. 'username': matrix_bot_matrix_reminder_bot_database_username,
  2311. 'password': matrix_bot_matrix_reminder_bot_database_password,
  2312. }] 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 [])
  2313. +
  2314. ([{
  2315. 'name': matrix_bot_honoroit_database_name,
  2316. 'username': matrix_bot_honoroit_database_username,
  2317. 'password': matrix_bot_honoroit_database_password,
  2318. }] if (matrix_bot_honoroit_enabled and matrix_bot_honoroit_database_engine == 'postgres' and matrix_bot_honoroit_database_hostname == devture_postgres_connection_hostname) else [])
  2319. +
  2320. ([{
  2321. 'name': matrix_bot_postmoogle_database_name,
  2322. 'username': matrix_bot_postmoogle_database_username,
  2323. 'password': matrix_bot_postmoogle_database_password,
  2324. }] if (matrix_bot_postmoogle_enabled and matrix_bot_postmoogle_database_engine == 'postgres' and matrix_bot_postmoogle_database_hostname == devture_postgres_connection_hostname) else [])
  2325. +
  2326. ([{
  2327. 'name': matrix_bot_maubot_database_name,
  2328. 'username': matrix_bot_maubot_database_username,
  2329. 'password': matrix_bot_maubot_database_password,
  2330. }] if (matrix_bot_maubot_enabled and matrix_bot_maubot_database_engine == 'postgres' and matrix_bot_maubot_database_hostname == devture_postgres_connection_hostname) else [])
  2331. +
  2332. ([{
  2333. 'name': matrix_bot_buscarron_database_name,
  2334. 'username': matrix_bot_buscarron_database_username,
  2335. 'password': matrix_bot_buscarron_database_password,
  2336. }] if (matrix_bot_buscarron_enabled and matrix_bot_buscarron_database_engine == 'postgres' and matrix_bot_buscarron_database_hostname == devture_postgres_connection_hostname) else [])
  2337. +
  2338. ([{
  2339. 'name': matrix_registration_database_name,
  2340. 'username': matrix_registration_database_username,
  2341. 'password': matrix_registration_database_password,
  2342. }] if (matrix_registration_enabled and matrix_registration_database_engine == 'postgres' and matrix_registration_database_hostname == devture_postgres_connection_hostname) else [])
  2343. +
  2344. ([{
  2345. 'name': matrix_appservice_discord_database_name,
  2346. 'username': matrix_appservice_discord_database_username,
  2347. 'password': matrix_appservice_discord_database_password,
  2348. }] if (matrix_appservice_discord_enabled and matrix_appservice_discord_database_engine == 'postgres' and matrix_appservice_discord_database_hostname == devture_postgres_connection_hostname) else [])
  2349. +
  2350. ([{
  2351. 'name': matrix_appservice_slack_database_name,
  2352. 'username': matrix_appservice_slack_database_username,
  2353. 'password': matrix_appservice_slack_database_password,
  2354. }] if (matrix_appservice_slack_enabled and matrix_appservice_slack_database_engine == 'postgres' and matrix_appservice_slack_database_hostname == devture_postgres_connection_hostname) else [])
  2355. +
  2356. ([{
  2357. 'name': matrix_appservice_irc_database_name,
  2358. 'username': matrix_appservice_irc_database_username,
  2359. 'password': matrix_appservice_irc_database_password,
  2360. }] if (matrix_appservice_irc_enabled and matrix_appservice_irc_database_engine == 'postgres' and matrix_appservice_irc_database_hostname == devture_postgres_connection_hostname) else [])
  2361. +
  2362. ([{
  2363. 'name': matrix_appservice_kakaotalk_database_name,
  2364. 'username': matrix_appservice_kakaotalk_database_username,
  2365. 'password': matrix_appservice_kakaotalk_database_password,
  2366. }] if (matrix_appservice_kakaotalk_enabled and matrix_appservice_kakaotalk_database_engine == 'postgres' and matrix_appservice_kakaotalk_database_hostname == devture_postgres_connection_hostname) else [])
  2367. +
  2368. ([{
  2369. 'name': matrix_beeper_linkedin_database_name,
  2370. 'username': matrix_beeper_linkedin_database_username,
  2371. 'password': matrix_beeper_linkedin_database_password,
  2372. }] if (matrix_beeper_linkedin_enabled and matrix_beeper_linkedin_database_engine == 'postgres' and matrix_beeper_linkedin_database_hostname == devture_postgres_connection_hostname) else [])
  2373. +
  2374. ([{
  2375. 'name': matrix_go_skype_bridge_database_name,
  2376. 'username': matrix_go_skype_bridge_database_username,
  2377. 'password': matrix_go_skype_bridge_database_password,
  2378. }] 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 [])
  2379. +
  2380. ([{
  2381. 'name': matrix_mautrix_facebook_database_name,
  2382. 'username': matrix_mautrix_facebook_database_username,
  2383. 'password': matrix_mautrix_facebook_database_password,
  2384. }] if (matrix_mautrix_facebook_enabled and matrix_mautrix_facebook_database_engine == 'postgres' and matrix_mautrix_facebook_database_hostname == devture_postgres_connection_hostname) else [])
  2385. +
  2386. ([{
  2387. 'name': matrix_mautrix_hangouts_database_name,
  2388. 'username': matrix_mautrix_hangouts_database_username,
  2389. 'password': matrix_mautrix_hangouts_database_password,
  2390. }] if (matrix_mautrix_hangouts_enabled and matrix_mautrix_hangouts_database_engine == 'postgres' and matrix_mautrix_hangouts_database_hostname == devture_postgres_connection_hostname) else [])
  2391. +
  2392. ([{
  2393. 'name': matrix_mautrix_googlechat_database_name,
  2394. 'username': matrix_mautrix_googlechat_database_username,
  2395. 'password': matrix_mautrix_googlechat_database_password,
  2396. }] if (matrix_mautrix_googlechat_enabled and matrix_mautrix_googlechat_database_engine == 'postgres' and matrix_mautrix_googlechat_database_hostname == devture_postgres_connection_hostname) else [])
  2397. +
  2398. ([{
  2399. 'name': matrix_mautrix_instagram_database_name,
  2400. 'username': matrix_mautrix_instagram_database_username,
  2401. 'password': matrix_mautrix_instagram_database_password,
  2402. }] if (matrix_mautrix_instagram_enabled and matrix_mautrix_instagram_database_engine == 'postgres' and matrix_mautrix_instagram_database_hostname == devture_postgres_connection_hostname) else [])
  2403. +
  2404. ([{
  2405. 'name': matrix_mautrix_signal_database_name,
  2406. 'username': matrix_mautrix_signal_database_username,
  2407. 'password': matrix_mautrix_signal_database_password,
  2408. }] if (matrix_mautrix_signal_enabled and matrix_mautrix_signal_database_engine == 'postgres' and matrix_mautrix_signal_database_hostname == devture_postgres_connection_hostname) else [])
  2409. +
  2410. ([{
  2411. 'name': matrix_mautrix_telegram_database_name,
  2412. 'username': matrix_mautrix_telegram_database_username,
  2413. 'password': matrix_mautrix_telegram_database_password,
  2414. }] if (matrix_mautrix_telegram_enabled and matrix_mautrix_telegram_database_engine == 'postgres' and matrix_mautrix_telegram_database_hostname == devture_postgres_connection_hostname) else [])
  2415. +
  2416. ([{
  2417. 'name': matrix_mautrix_twitter_database_name,
  2418. 'username': matrix_mautrix_twitter_database_username,
  2419. 'password': matrix_mautrix_twitter_database_password,
  2420. }] if (matrix_mautrix_twitter_enabled and matrix_mautrix_twitter_database_engine == 'postgres' and matrix_mautrix_twitter_database_hostname == devture_postgres_connection_hostname) else [])
  2421. +
  2422. ([{
  2423. 'name': matrix_mautrix_whatsapp_database_name,
  2424. 'username': matrix_mautrix_whatsapp_database_username,
  2425. 'password': matrix_mautrix_whatsapp_database_password,
  2426. }] if (matrix_mautrix_whatsapp_enabled and matrix_mautrix_whatsapp_database_engine == 'postgres' and matrix_mautrix_whatsapp_database_hostname == devture_postgres_connection_hostname) else [])
  2427. +
  2428. ([{
  2429. 'name': matrix_mautrix_discord_database_name,
  2430. 'username': matrix_mautrix_discord_database_username,
  2431. 'password': matrix_mautrix_discord_database_password,
  2432. }] if (matrix_mautrix_discord_enabled and matrix_mautrix_discord_database_engine == 'postgres' and matrix_mautrix_discord_database_hostname == devture_postgres_connection_hostname) else [])
  2433. +
  2434. ([{
  2435. 'name': matrix_mautrix_slack_database_name,
  2436. 'username': matrix_mautrix_slack_database_username,
  2437. 'password': matrix_mautrix_slack_database_password,
  2438. }] if (matrix_mautrix_slack_enabled and matrix_mautrix_slack_database_engine == 'postgres' and matrix_mautrix_slack_database_hostname == devture_postgres_connection_hostname) else [])
  2439. +
  2440. ([{
  2441. 'name': matrix_mx_puppet_slack_database_name,
  2442. 'username': matrix_mx_puppet_slack_database_username,
  2443. 'password': matrix_mx_puppet_slack_database_password,
  2444. }] 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 [])
  2445. +
  2446. ([{
  2447. 'name': matrix_mx_puppet_twitter_database_name,
  2448. 'username': matrix_mx_puppet_twitter_database_username,
  2449. 'password': matrix_mx_puppet_twitter_database_password,
  2450. }] 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 [])
  2451. +
  2452. ([{
  2453. 'name': matrix_mx_puppet_instagram_database_name,
  2454. 'username': matrix_mx_puppet_instagram_database_username,
  2455. 'password': matrix_mx_puppet_instagram_database_password,
  2456. }] 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 [])
  2457. +
  2458. ([{
  2459. 'name': matrix_mx_puppet_discord_database_name,
  2460. 'username': matrix_mx_puppet_discord_database_username,
  2461. 'password': matrix_mx_puppet_discord_database_password,
  2462. }] 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 [])
  2463. +
  2464. ([{
  2465. 'name': matrix_mx_puppet_steam_database_name,
  2466. 'username': matrix_mx_puppet_steam_database_username,
  2467. 'password': matrix_mx_puppet_steam_database_password,
  2468. }] 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 [])
  2469. +
  2470. ([{
  2471. 'name': matrix_mx_puppet_groupme_database_name,
  2472. 'username': matrix_mx_puppet_groupme_database_username,
  2473. 'password': matrix_mx_puppet_groupme_database_password,
  2474. }] 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 [])
  2475. +
  2476. ([{
  2477. 'name': matrix_dimension_database_name,
  2478. 'username': matrix_dimension_database_username,
  2479. 'password': matrix_dimension_database_password,
  2480. }] if (matrix_dimension_enabled and matrix_dimension_database_engine == 'postgres' and matrix_dimension_database_hostname == devture_postgres_connection_hostname) else [])
  2481. +
  2482. ([{
  2483. 'name': etherpad_database_name,
  2484. 'username': etherpad_database_username,
  2485. 'password': etherpad_database_password,
  2486. }] if (etherpad_enabled and etherpad_database_engine == 'postgres' and etherpad_database_hostname == devture_postgres_connection_hostname) else [])
  2487. +
  2488. ([{
  2489. 'name': prometheus_postgres_exporter_database_name,
  2490. 'username': prometheus_postgres_exporter_database_username,
  2491. 'password': prometheus_postgres_exporter_database_password,
  2492. }] if (prometheus_postgres_exporter_enabled and prometheus_postgres_exporter_database_hostname == devture_postgres_connection_hostname) else [])
  2493. }}
  2494. ########################################################################
  2495. # #
  2496. # /com.devture.ansible.role.postgres #
  2497. # #
  2498. ########################################################################
  2499. ########################################################################
  2500. # #
  2501. # com.devture.ansible.role.postgres_backup #
  2502. # #
  2503. ########################################################################
  2504. devture_postgres_backup_enabled: false
  2505. devture_postgres_backup_identifier: matrix-postgres-backup
  2506. devture_postgres_backup_architecture: "{{ matrix_architecture }}"
  2507. devture_postgres_backup_base_path: "{{ matrix_base_data_path }}/postgres-backup"
  2508. devture_postgres_backup_systemd_required_services_list: |
  2509. {{
  2510. (['docker.service'])
  2511. +
  2512. ([(devture_postgres_identifier + '.service')] if devture_postgres_enabled else [])
  2513. }}
  2514. devture_postgres_backup_container_network: "{{ matrix_docker_network }}"
  2515. devture_postgres_backup_uid: "{{ matrix_user_uid }}"
  2516. devture_postgres_backup_gid: "{{ matrix_user_gid }}"
  2517. devture_postgres_backup_connection_hostname: "{{ devture_postgres_connection_hostname if devture_postgres_enabled else '' }}"
  2518. devture_postgres_backup_connection_port: "{{ devture_postgres_connection_port if devture_postgres_enabled else 5432 }}"
  2519. devture_postgres_backup_connection_username: "{{ devture_postgres_connection_username if devture_postgres_enabled else '' }}"
  2520. devture_postgres_backup_connection_password: "{{ devture_postgres_connection_password if devture_postgres_enabled else '' }}"
  2521. devture_postgres_backup_postgres_data_path: "{{ devture_postgres_data_path if devture_postgres_enabled else '' }}"
  2522. devture_postgres_backup_databases: "{{ devture_postgres_managed_databases | map(attribute='name') if devture_postgres_enabled else [] }}"
  2523. ########################################################################
  2524. # #
  2525. # /com.devture.ansible.role.postgres_backup #
  2526. # #
  2527. ########################################################################
  2528. ######################################################################
  2529. #
  2530. # matrix-sygnal
  2531. #
  2532. ######################################################################
  2533. # Most people don't need their own push-server, because they also need their own app to utilize it from.
  2534. matrix_sygnal_enabled: false
  2535. # If someone instals Prometheus via the playbook, they most likely wish to monitor Sygnal.
  2536. matrix_sygnal_metrics_prometheus_enabled: "{{ prometheus_enabled }}"
  2537. matrix_sygnal_hostname: "{{ matrix_server_fqn_sygnal }}"
  2538. matrix_sygnal_container_network: "{{ matrix_nginx_proxy_container_network if matrix_playbook_reverse_proxy_type == 'playbook-managed-nginx' else 'matrix-sygnal' }}"
  2539. matrix_sygnal_container_additional_networks: "{{ [matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network else [] }}"
  2540. matrix_sygnal_container_http_host_bind_port: "{{ (matrix_playbook_service_host_bind_interface_prefix ~ '6000') if matrix_playbook_service_host_bind_interface_prefix else '' }}"
  2541. matrix_sygnal_container_labels_traefik_enabled: "{{ matrix_playbook_traefik_labels_enabled }}"
  2542. matrix_sygnal_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  2543. matrix_sygnal_container_labels_traefik_entrypoints: "{{ devture_traefik_entrypoint_primary }}"
  2544. matrix_sygnal_container_labels_traefik_tls_certResolver: "{{ devture_traefik_certResolver_primary }}"
  2545. ######################################################################
  2546. #
  2547. # /matrix-sygnal
  2548. #
  2549. ######################################################################
  2550. ######################################################################
  2551. #
  2552. # etke/ntfy
  2553. #
  2554. ######################################################################
  2555. ntfy_enabled: false
  2556. ntfy_identifier: matrix-ntfy
  2557. ntfy_base_path: "{{ matrix_base_data_path }}/ntfy"
  2558. ntfy_uid: "{{ matrix_user_uid }}"
  2559. ntfy_gid: "{{ matrix_user_gid }}"
  2560. ntfy_hostname: "{{ matrix_server_fqn_ntfy }}"
  2561. ntfy_container_network: "{{ matrix_nginx_proxy_container_network if matrix_playbook_reverse_proxy_type == 'playbook-managed-nginx' else ntfy_identifier }}"
  2562. ntfy_container_additional_networks: "{{ [matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network else [] }}"
  2563. ntfy_container_http_host_bind_port: "{{ (matrix_playbook_service_host_bind_interface_prefix ~ '2586') if matrix_playbook_service_host_bind_interface_prefix else '' }}"
  2564. ntfy_container_labels_traefik_enabled: "{{ matrix_playbook_traefik_labels_enabled }}"
  2565. ntfy_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  2566. ntfy_container_labels_traefik_entrypoints: "{{ devture_traefik_entrypoint_primary }}"
  2567. ntfy_container_labels_traefik_tls_certResolver: "{{ devture_traefik_certResolver_primary }}"
  2568. ntfy_visitor_request_limit_exempt_hosts_hostnames_auto: |
  2569. {{
  2570. [matrix_server_fqn_matrix]
  2571. }}
  2572. ######################################################################
  2573. #
  2574. # /etky/ntfy
  2575. #
  2576. ######################################################################
  2577. ######################################################################
  2578. #
  2579. # etke/redis
  2580. #
  2581. ######################################################################
  2582. redis_enabled: "{{ matrix_synapse_workers_enabled }}"
  2583. redis_identifier: matrix-redis
  2584. redis_uid: "{{ matrix_user_uid }}"
  2585. redis_gid: "{{ matrix_user_gid }}"
  2586. redis_base_path: "{{ matrix_base_data_path }}/redis"
  2587. ######################################################################
  2588. #
  2589. # /etle/redis
  2590. #
  2591. ######################################################################
  2592. ######################################################################
  2593. #
  2594. # matrix-client-element
  2595. #
  2596. ######################################################################
  2597. # By default, this playbook installs the Element web UI on the `matrix_server_fqn_element` domain.
  2598. # If you wish to connect to your Matrix server by other means, you may wish to disable this.
  2599. matrix_client_element_enabled: true
  2600. matrix_client_element_container_image_self_build: "{{ matrix_architecture not in ['arm64', 'amd64'] }}"
  2601. # Normally, matrix-nginx-proxy is enabled and nginx can reach Element over the container network.
  2602. # If matrix-nginx-proxy is not enabled, or you otherwise have a need for it, you can expose
  2603. # the Element HTTP port to the local host.
  2604. 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 '' }}"
  2605. matrix_client_element_container_network: "{{ matrix_nginx_proxy_container_network if matrix_playbook_reverse_proxy_type == 'playbook-managed-nginx' else 'matrix-client-element' }}"
  2606. matrix_client_element_container_additional_networks: "{{ [matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network else [] }}"
  2607. matrix_client_element_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  2608. matrix_client_element_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  2609. matrix_client_element_container_labels_traefik_entrypoints: "{{ devture_traefik_entrypoint_primary }}"
  2610. matrix_client_element_container_labels_traefik_tls_certResolver: "{{ devture_traefik_certResolver_primary }}"
  2611. matrix_client_element_default_hs_url: "{{ matrix_homeserver_url }}"
  2612. matrix_client_element_default_is_url: "{{ matrix_identity_server_url }}"
  2613. # Use Dimension if enabled, otherwise fall back to Scalar
  2614. matrix_client_element_integrations_ui_url: "{{ matrix_dimension_integrations_ui_url if matrix_dimension_enabled else 'https://scalar.vector.im/' }}"
  2615. matrix_client_element_integrations_rest_url: "{{ matrix_dimension_integrations_rest_url if matrix_dimension_enabled else 'https://scalar.vector.im/api' }}"
  2616. matrix_client_element_integrations_widgets_urls: "{{ matrix_dimension_integrations_widgets_urls if matrix_dimension_enabled else ['https://scalar.vector.im/api'] }}"
  2617. 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' }}"
  2618. matrix_client_element_self_check_validate_certificates: "{{ false if matrix_playbook_ssl_retrieval_method == 'self-signed' else true }}"
  2619. matrix_client_element_registration_enabled: "{{ matrix_synapse_enable_registration }}"
  2620. matrix_client_element_enable_presence_by_hs_url: |
  2621. {{
  2622. none
  2623. if matrix_synapse_presence_enabled
  2624. else {matrix_client_element_default_hs_url: false}
  2625. }}
  2626. matrix_client_element_welcome_user_id: ~
  2627. matrix_client_element_jitsi_preferredDomain: "{{ matrix_server_fqn_jitsi if jitsi_enabled else '' }}"
  2628. ######################################################################
  2629. #
  2630. # /matrix-client-element
  2631. #
  2632. ######################################################################
  2633. ######################################################################
  2634. #
  2635. # matrix-client-hydrogen
  2636. #
  2637. ######################################################################
  2638. matrix_client_hydrogen_enabled: false
  2639. matrix_client_hydrogen_container_image_self_build: "{{ matrix_architecture not in ['amd64'] }}"
  2640. # Normally, matrix-nginx-proxy is enabled and nginx can reach Hydrogen over the container network.
  2641. # If matrix-nginx-proxy is not enabled, or you otherwise have a need for it, you can expose
  2642. # the HTTP port to the local host.
  2643. 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 '' }}"
  2644. matrix_client_hydrogen_container_network: "{{ matrix_nginx_proxy_container_network if matrix_playbook_reverse_proxy_type == 'playbook-managed-nginx' else 'matrix-client-hydrogen' }}"
  2645. matrix_client_hydrogen_container_additional_networks: "{{ [matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network else [] }}"
  2646. matrix_client_hydrogen_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  2647. matrix_client_hydrogen_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  2648. matrix_client_hydrogen_container_labels_traefik_entrypoints: "{{ devture_traefik_entrypoint_primary }}"
  2649. matrix_client_hydrogen_container_labels_traefik_tls_certResolver: "{{ devture_traefik_certResolver_primary }}"
  2650. matrix_client_hydrogen_default_hs_url: "{{ matrix_homeserver_url }}"
  2651. matrix_client_hydrogen_self_check_validate_certificates: "{{ false if matrix_playbook_ssl_retrieval_method == 'self-signed' else true }}"
  2652. ######################################################################
  2653. #
  2654. # /matrix-client-hydrogen
  2655. #
  2656. ######################################################################
  2657. ######################################################################
  2658. #
  2659. # matrix-client-cinny
  2660. #
  2661. ######################################################################
  2662. matrix_client_cinny_enabled: false
  2663. matrix_client_cinny_container_image_self_build: "{{ matrix_architecture not in ['arm64', 'amd64'] }}"
  2664. # Normally, matrix-nginx-proxy is enabled and nginx can reach Cinny over the container network.
  2665. # If matrix-nginx-proxy is not enabled, or you otherwise have a need for it, you can expose
  2666. # the HTTP port to the local host.
  2667. 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 '' }}"
  2668. matrix_client_cinny_container_network: "{{ matrix_nginx_proxy_container_network if matrix_playbook_reverse_proxy_type == 'playbook-managed-nginx' else 'matrix-client-cinny' }}"
  2669. matrix_client_cinny_container_additional_networks: "{{ [matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network else [] }}"
  2670. matrix_client_cinny_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  2671. matrix_client_cinny_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  2672. matrix_client_cinny_container_labels_traefik_entrypoints: "{{ devture_traefik_entrypoint_primary }}"
  2673. matrix_client_cinny_container_labels_traefik_tls_certResolver: "{{ devture_traefik_certResolver_primary }}"
  2674. matrix_client_cinny_default_hs_url: "{{ matrix_homeserver_url }}"
  2675. matrix_client_cinny_self_check_validate_certificates: "{{ false if matrix_playbook_ssl_retrieval_method == 'self-signed' else true }}"
  2676. ######################################################################
  2677. #
  2678. # /matrix-client-cinny
  2679. #
  2680. ######################################################################
  2681. ######################################################################
  2682. #
  2683. # matrix-synapse
  2684. #
  2685. ######################################################################
  2686. matrix_synapse_enabled: "{{ matrix_homeserver_implementation == 'synapse' }}"
  2687. matrix_synapse_username: "{{ matrix_user_username }}"
  2688. matrix_synapse_uid: "{{ matrix_user_uid }}"
  2689. matrix_synapse_gid: "{{ matrix_user_gid }}"
  2690. matrix_synapse_container_image_self_build: "{{ matrix_architecture not in ['arm64', 'amd64'] }}"
  2691. # When ma1sd is enabled, we can use it to validate phone numbers. It's something that the homeserver cannot do by itself.
  2692. matrix_synapse_account_threepid_delegates_msisdn: "{{ 'http://matrix-ma1sd:' + matrix_ma1sd_container_port | string if matrix_ma1sd_enabled else '' }}"
  2693. # For exposing the Matrix Federation API's TLS port (HTTPS) to the internet on all network interfaces.
  2694. 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 '' }}"
  2695. #
  2696. # For exposing the Synapse Metrics API's port (plain HTTP) to the local host.
  2697. 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 '' }}"
  2698. #
  2699. # For exposing the Synapse Manhole port (plain HTTP) to the local host.
  2700. 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 '' }}"
  2701. matrix_synapse_container_additional_networks: |
  2702. {{
  2703. ([redis_container_network] if matrix_synapse_redis_enabled and matrix_synapse_redis_host == redis_identifier else [])
  2704. }}
  2705. # For exposing the Synapse worker (and metrics) ports to the local host.
  2706. 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 '' }}"
  2707. matrix_synapse_database_host: "{{ devture_postgres_connection_hostname if devture_postgres_enabled else '' }}"
  2708. matrix_synapse_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'synapse.db', rounds=655555) | to_uuid }}"
  2709. matrix_synapse_macaroon_secret_key: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'synapse.mac', rounds=655555) | to_uuid }}"
  2710. # We do not enable TLS in Synapse by default.
  2711. # TLS is handled by the matrix-nginx-proxy, which proxies the requests to Synapse.
  2712. matrix_synapse_tls_federation_listener_enabled: false
  2713. matrix_synapse_tls_certificate_path: ~
  2714. matrix_synapse_tls_private_key_path: ~
  2715. 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) }}"
  2716. # If someone instals Prometheus via the playbook, they most likely wish to monitor Synapse.
  2717. matrix_synapse_metrics_enabled: "{{ prometheus_enabled }}"
  2718. matrix_synapse_email_enabled: "{{ matrix_mailer_enabled }}"
  2719. matrix_synapse_email_smtp_host: "matrix-mailer"
  2720. matrix_synapse_email_smtp_port: 8025
  2721. matrix_synapse_email_smtp_require_transport_security: false
  2722. matrix_synapse_email_notif_from: "Matrix <{{ matrix_mailer_sender_address }}>"
  2723. # Even if TURN doesn't support TLS (it does by default),
  2724. # it doesn't hurt to try a secure connection anyway.
  2725. #
  2726. # When Let's Encrypt certificates are used (the default case),
  2727. # we don't enable `turns` endpoints, because WebRTC in Element can't talk to them.
  2728. # Learn more here: https://github.com/spantaleev/matrix-docker-ansible-deploy/pull/1145
  2729. matrix_synapse_turn_uris: |
  2730. {{
  2731. []
  2732. +
  2733. [
  2734. 'turns:' + matrix_server_fqn_matrix + '?transport=udp',
  2735. 'turns:' + matrix_server_fqn_matrix + '?transport=tcp',
  2736. ] if matrix_coturn_enabled and matrix_coturn_tls_enabled and matrix_playbook_ssl_retrieval_method != 'lets-encrypt' else []
  2737. +
  2738. [
  2739. 'turn:' + matrix_server_fqn_matrix + '?transport=udp',
  2740. 'turn:' + matrix_server_fqn_matrix + '?transport=tcp',
  2741. ] if matrix_coturn_enabled else []
  2742. }}
  2743. matrix_synapse_turn_shared_secret: "{{ matrix_coturn_turn_static_auth_secret if matrix_coturn_enabled else '' }}"
  2744. matrix_synapse_self_check_validate_certificates: "{{ false if matrix_playbook_ssl_retrieval_method == 'self-signed' else true }}"
  2745. matrix_synapse_systemd_required_services_list: |
  2746. {{
  2747. (['docker.service'])
  2748. +
  2749. ([devture_postgres_identifier ~ '.service'] if devture_postgres_enabled else [])
  2750. +
  2751. ([redis_identifier ~ '.service'] if matrix_synapse_redis_enabled and matrix_synapse_redis_host == redis_identifier else [])
  2752. +
  2753. (['matrix-goofys.service'] if matrix_s3_media_store_enabled else [])
  2754. }}
  2755. matrix_synapse_systemd_wanted_services_list: |
  2756. {{
  2757. (['matrix-coturn.service'] if matrix_coturn_enabled else [])
  2758. +
  2759. (['matrix-mailer.service'] if matrix_mailer_enabled else [])
  2760. }}
  2761. # Synapse workers (used for parallel load-scaling) need Redis for IPC.
  2762. matrix_synapse_redis_enabled: "{{ redis_enabled }}"
  2763. matrix_synapse_redis_host: "{{ redis_identifier if redis_enabled else '' }}"
  2764. matrix_synapse_redis_password: "{{ redis_connection_password if redis_enabled else '' }}"
  2765. matrix_synapse_container_extra_arguments_auto: "{{ matrix_homeserver_container_extra_arguments_auto }}"
  2766. matrix_synapse_app_service_config_files_auto: "{{ matrix_homeserver_app_service_config_files_auto }}"
  2767. ######################################################################
  2768. #
  2769. # /matrix-synapse
  2770. #
  2771. ######################################################################
  2772. ######################################################################
  2773. #
  2774. # matrix-synapse-auto-compressor
  2775. #
  2776. ######################################################################
  2777. # Not enabled by default, for now
  2778. matrix_synapse_auto_compressor_enabled: false
  2779. matrix_synapse_auto_compressor_container_image_self_build: "{{ matrix_architecture not in ['amd64'] }}"
  2780. matrix_synapse_auto_compressor_container_additional_networks: |
  2781. {{
  2782. ([devture_postgres_container_network] if devture_postgres_enabled and devture_postgres_container_network != matrix_synapse_auto_compressor_container_network else [])
  2783. }}
  2784. matrix_synapse_auto_compressor_database_username: "{{ matrix_synapse_database_user if matrix_synapse_enabled else '' }}"
  2785. matrix_synapse_auto_compressor_database_password: "{{ matrix_synapse_database_password if matrix_synapse_enabled else '' }}"
  2786. matrix_synapse_auto_compressor_database_hostname: "{{ matrix_synapse_database_host if matrix_synapse_enabled else '' }}"
  2787. matrix_synapse_auto_compressor_database_port: "{{ matrix_synapse_database_port if matrix_synapse_enabled else '5432' }}"
  2788. matrix_synapse_auto_compressor_database_name: "{{ matrix_synapse_database_database if matrix_synapse_enabled else '' }}"
  2789. matrix_synapse_auto_compressor_systemd_required_services_list: |
  2790. {{
  2791. ['docker.service']
  2792. +
  2793. ([devture_postgres_identifier ~ '.service'] if devture_postgres_enabled else [])
  2794. }}
  2795. ######################################################################
  2796. #
  2797. # /matrix-synapse-auto-compressor
  2798. #
  2799. ######################################################################
  2800. ######################################################################
  2801. #
  2802. # matrix-synapse-reverse-proxy-companion
  2803. #
  2804. ######################################################################
  2805. matrix_synapse_reverse_proxy_companion_enabled: "{{ matrix_synapse_enabled }}"
  2806. matrix_synapse_reverse_proxy_companion_client_api_client_max_body_size_mb: "{{ matrix_synapse_max_upload_size_mb }}"
  2807. 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 '' }}"
  2808. 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 '' }}"
  2809. matrix_synapse_reverse_proxy_companion_synapse_workers_enabled: "{{ matrix_synapse_workers_enabled }}"
  2810. matrix_synapse_reverse_proxy_companion_synapse_workers_list: "{{ matrix_synapse_workers_enabled_list }}"
  2811. matrix_synapse_reverse_proxy_companion_synapse_generic_worker_client_server_locations: "{{ matrix_synapse_workers_generic_worker_client_server_endpoints }}"
  2812. matrix_synapse_reverse_proxy_companion_synapse_generic_worker_federation_locations: "{{ matrix_synapse_workers_generic_worker_federation_endpoints }}"
  2813. 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 }}"
  2814. 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 }}"
  2815. 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 }}"
  2816. 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 }}"
  2817. 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 }}"
  2818. matrix_synapse_reverse_proxy_companion_synapse_media_repository_locations: "{{matrix_synapse_workers_media_repository_endpoints|default([]) }}"
  2819. matrix_synapse_reverse_proxy_companion_synapse_user_dir_locations: "{{ matrix_synapse_workers_user_dir_worker_client_server_endpoints|default([]) }}"
  2820. matrix_synapse_reverse_proxy_companion_access_log_syslog_integration_enabled: "{{ matrix_prometheus_nginxlog_exporter_enabled }}"
  2821. matrix_synapse_reverse_proxy_companion_access_log_syslog_integration_server_port: "{{ (matrix_prometheus_nginxlog_exporter_container_hostname | string +':'+ matrix_prometheus_nginxlog_exporter_container_syslog_port | string) | default('') }}"
  2822. ######################################################################
  2823. #
  2824. # /matrix-synapse-reverse-proxy-companion
  2825. #
  2826. ######################################################################
  2827. ######################################################################
  2828. #
  2829. # matrix-synapse-admin
  2830. #
  2831. ######################################################################
  2832. matrix_synapse_admin_enabled: false
  2833. matrix_synapse_admin_nginx_proxy_integration_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-nginx', 'other-nginx-non-container'] }}"
  2834. 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 '' }}"
  2835. matrix_synapse_admin_container_image_self_build: "{{ matrix_architecture not in ['arm64', 'amd64'] }}"
  2836. matrix_synapse_admin_container_network: "{{ matrix_nginx_proxy_container_network if matrix_playbook_reverse_proxy_type == 'playbook-managed-nginx' else 'matrix-synapse-admin' }}"
  2837. matrix_synapse_admin_container_additional_networks: "{{ [matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network else [] }}"
  2838. matrix_synapse_admin_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  2839. matrix_synapse_admin_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  2840. matrix_synapse_admin_container_labels_traefik_entrypoints: "{{ devture_traefik_entrypoint_primary }}"
  2841. matrix_synapse_admin_container_labels_traefik_tls_certResolver: "{{ devture_traefik_certResolver_primary }}"
  2842. ######################################################################
  2843. #
  2844. # /matrix-synapse-admin
  2845. #
  2846. ######################################################################
  2847. ######################################################################
  2848. #
  2849. # etke/prometheus_node_exporter
  2850. #
  2851. ######################################################################
  2852. prometheus_node_exporter_enabled: false
  2853. prometheus_node_exporter_identifier: matrix-prometheus-node-exporter
  2854. prometheus_node_exporter_base_path: "{{ matrix_base_data_path }}/prometheus-node-exporter"
  2855. prometheus_node_exporter_uid: "{{ matrix_user_uid }}"
  2856. prometheus_node_exporter_gid: "{{ matrix_user_gid }}"
  2857. # _server_fqn is the old var, _hostname - the new one. Seamless migration
  2858. prometheus_node_exporter_server_fqn: "{{ matrix_server_fqn_matrix }}"
  2859. prometheus_node_exporter_hostname: "{{ prometheus_node_exporter_server_fqn }}"
  2860. prometheus_node_exporter_container_network: "{{ matrix_docker_network }}"
  2861. prometheus_node_exporter_container_additional_networks: "{{ [matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network else [] }}"
  2862. prometheus_node_exporter_container_labels_traefik_enabled: false
  2863. prometheus_node_exporter_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  2864. prometheus_node_exporter_container_labels_traefik_entrypoints: "{{ devture_traefik_entrypoint_primary }}"
  2865. prometheus_node_exporter_container_labels_traefik_tls_certResolver: "{{ devture_traefik_certResolver_primary }}"
  2866. ######################################################################
  2867. #
  2868. # /etke/prometheus_node_exporter
  2869. #
  2870. ######################################################################
  2871. ######################################################################
  2872. #
  2873. # etke/prometheus_postgres_exporter
  2874. #
  2875. ######################################################################
  2876. prometheus_postgres_exporter_enabled: false
  2877. prometheus_postgres_exporter_identifier: matrix-prometheus-postgres-exporter
  2878. prometheus_postgres_exporter_base_path: "{{ matrix_base_data_path }}/prometheus-postgres-exporter"
  2879. prometheus_postgres_exporter_uid: "{{ matrix_user_uid }}"
  2880. prometheus_postgres_exporter_gid: "{{ matrix_user_gid }}"
  2881. prometheus_postgres_exporter_server_fqn: "{{ matrix_server_fqn_matrix }}"
  2882. prometheus_postgres_exporter_container_network: "{{ matrix_docker_network }}"
  2883. prometheus_postgres_exporter_container_additional_networks: "{{ [matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network else [] }}"
  2884. prometheus_postgres_exporter_container_labels_traefik_enabled: false
  2885. prometheus_postgres_exporter_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  2886. prometheus_postgres_exporter_container_labels_traefik_entrypoints: "{{ devture_traefik_entrypoint_primary }}"
  2887. prometheus_postgres_exporter_container_labels_traefik_tls_certResolver: "{{ devture_traefik_certResolver_primary }}"
  2888. prometheus_postgres_exporter_database_hostname: "{{ devture_postgres_connection_hostname if devture_postgres_enabled else '' }}"
  2889. prometheus_postgres_exporter_database_username: matrix_prometheus_postgres_exporter
  2890. prometheus_postgres_exporter_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'prometheus.pg.db', rounds=655555) | to_uuid }}"
  2891. prometheus_postgres_exporter_database_name: matrix_prometheus_postgres_exporter
  2892. prometheus_postgres_exporter_systemd_required_services_list: |
  2893. {{
  2894. ['docker.service']
  2895. +
  2896. ([devture_postgres_identifier ~ '.service'] if devture_postgres_enabled else [])
  2897. }}
  2898. ######################################################################
  2899. #
  2900. # /etke/prometheus_postgres_exporter
  2901. #
  2902. ######################################################################
  2903. ######################################################################
  2904. #
  2905. # matrix-prometheus-nginxlog-exporter
  2906. #
  2907. ######################################################################
  2908. matrix_prometheus_nginxlog_exporter_enabled: false
  2909. ######################################################################
  2910. #
  2911. # /matrix-prometheus-nginxlog-exporter
  2912. #
  2913. ######################################################################
  2914. ######################################################################
  2915. #
  2916. # prometheus
  2917. #
  2918. ######################################################################
  2919. prometheus_enabled: false
  2920. prometheus_identifier: matrix-prometheus
  2921. prometheus_base_path: "{{ matrix_base_data_path }}/prometheus"
  2922. prometheus_uid: "{{ matrix_user_uid }}"
  2923. prometheus_gid: "{{ matrix_user_gid }}"
  2924. prometheus_container_additional_networks: |
  2925. {{
  2926. (
  2927. ([prometheus_node_exporter_container_network] if prometheus_self_node_scraper_enabled and prometheus_node_exporter_container_network != prometheus_container_network else [])
  2928. +
  2929. ([matrix_synapse_container_network] if matrix_prometheus_services_connect_scraper_synapse_enabled and matrix_synapse_container_network != prometheus_container_network else [])
  2930. +
  2931. ([prometheus_postgres_exporter_container_network] if matrix_prometheus_services_connect_scraper_postgres_enabled and prometheus_postgres_exporter_container_network != prometheus_container_network else [])
  2932. +
  2933. ([matrix_hookshot_container_network] if matrix_prometheus_services_connect_scraper_hookshot_enabled and matrix_hookshot_container_network != prometheus_container_network else [])
  2934. +
  2935. ([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 [])
  2936. ) | unique
  2937. }}
  2938. # Normally, matrix-nginx-proxy is enabled and nginx can reach Prometheus over the container network.
  2939. # If matrix-nginx-proxy is not enabled, or you otherwise have a need for it, you can expose
  2940. # Prometheus' HTTP port to the local host.
  2941. prometheus_container_http_host_bind_port: "{{ (matrix_playbook_service_host_bind_interface_prefix ~ '9090') if matrix_playbook_service_host_bind_interface_prefix else '' }}"
  2942. prometheus_config_rule_files_auto: |
  2943. {{
  2944. (['synapse-v2.rules'] if matrix_prometheus_services_connect_synapse_rules_enabled else [])
  2945. }}
  2946. prometheus_self_node_scraper_enabled: "{{ prometheus_node_exporter_enabled }}"
  2947. prometheus_self_node_scraper_static_configs_target: "{{ (prometheus_node_exporter_identifier + ':9100') if prometheus_node_exporter_enabled else '' }}"
  2948. prometheus_config_scrape_configs_auto: |
  2949. {{
  2950. (matrix_prometheus_services_connect_scraper_synapse_configs if matrix_prometheus_services_connect_scraper_synapse_enabled else [])
  2951. +
  2952. (matrix_prometheus_services_connect_scraper_postgres_scrape_configs if matrix_prometheus_services_connect_scraper_postgres_enabled else [])
  2953. +
  2954. (matrix_prometheus_services_connect_scraper_hookshot_scrape_configs if matrix_prometheus_services_connect_scraper_hookshot_enabled else [])
  2955. +
  2956. (matrix_prometheus_services_connect_scraper_nginxlog_scrape_configs if matrix_prometheus_services_connect_scraper_nginxlog_enabled else [])
  2957. }}
  2958. ######################################################################
  2959. #
  2960. # /prometheus
  2961. #
  2962. ######################################################################
  2963. ######################################################################
  2964. #
  2965. # matrix-prometheus-services-connect
  2966. #
  2967. ######################################################################
  2968. matrix_prometheus_services_connect_synapse_enabled: "{{ prometheus_enabled and matrix_synapse_enabled }}"
  2969. matrix_prometheus_services_connect_synapse_rules_download_synapse_tag: "{{ matrix_synapse_docker_image_tag }}"
  2970. matrix_prometheus_services_connect_synapse_rules_download_dir_path: "{{ prometheus_config_path }}"
  2971. matrix_prometheus_services_connect_synapse_rules_download_owner: "{{ prometheus_uid }}"
  2972. matrix_prometheus_services_connect_synapse_rules_download_group: "{{ prometheus_gid }}"
  2973. matrix_prometheus_services_connect_scraper_synapse_enabled: "{{ matrix_synapse_enabled and matrix_synapse_metrics_enabled }}"
  2974. matrix_prometheus_services_connect_scraper_synapse_main_process_static_configs_target: "matrix-synapse:{{ matrix_synapse_metrics_port }}"
  2975. matrix_prometheus_services_connect_scraper_synapse_workers_enabled_list: "{{ matrix_synapse_workers_enabled_list }}"
  2976. matrix_prometheus_services_connect_scraper_postgres_enabled: "{{ prometheus_postgres_exporter_enabled }}"
  2977. matrix_prometheus_services_connect_scraper_postgres_static_configs_target: "{{ prometheus_postgres_exporter_identifier }}:{{ prometheus_postgres_exporter_port | string }}"
  2978. matrix_prometheus_services_connect_scraper_hookshot_enabled: "{{ matrix_hookshot_enabled and matrix_hookshot_metrics_enabled }}"
  2979. matrix_prometheus_services_connect_scraper_hookshot_static_configs_target: "{{ matrix_hookshot_container_url }}:{{ matrix_hookshot_metrics_port | string }}"
  2980. matrix_prometheus_services_connect_scraper_nginxlog_enabled: "{{ matrix_prometheus_nginxlog_exporter_enabled }}"
  2981. matrix_prometheus_services_connect_scraper_nginxlog_static_configs_target: "{{ matrix_prometheus_nginxlog_exporter_container_hostname }}:{{ matrix_prometheus_nginxlog_exporter_container_metrics_port | string }}"
  2982. ######################################################################
  2983. #
  2984. # /matrix-prometheus-services-connect
  2985. #
  2986. ######################################################################
  2987. ######################################################################
  2988. #
  2989. # etke/grafana
  2990. #
  2991. ######################################################################
  2992. grafana_enabled: false
  2993. grafana_identifier: matrix-grafana
  2994. grafana_uid: "{{ matrix_user_uid }}"
  2995. grafana_gid: "{{ matrix_user_gid }}"
  2996. grafana_hostname: "{{ matrix_server_fqn_grafana }}"
  2997. grafana_base_path: "{{ matrix_base_data_path }}/grafana"
  2998. grafana_container_network: "{{ matrix_nginx_proxy_container_network if matrix_playbook_reverse_proxy_type == 'playbook-managed-nginx' else grafana_identifier }}"
  2999. grafana_container_additional_networks: |
  3000. {{
  3001. (
  3002. ([matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network else [])
  3003. +
  3004. ([prometheus_container_network] if prometheus_enabled and prometheus_container_network != grafana_container_network else [])
  3005. ) | unique
  3006. }}
  3007. grafana_container_labels_traefik_enabled: "{{ matrix_playbook_traefik_labels_enabled }}"
  3008. grafana_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  3009. grafana_container_labels_traefik_entrypoints: "{{ devture_traefik_entrypoint_primary }}"
  3010. grafana_container_labels_traefik_tls_certResolver: "{{ devture_traefik_certResolver_primary }}"
  3011. # Normally, matrix-nginx-proxy is enabled and nginx can reach Grafana over the container network.
  3012. # If matrix-nginx-proxy is not enabled, or you otherwise have a need for it, you can expose
  3013. # Grafana's HTTP port to the local host.
  3014. grafana_container_http_host_bind_port: "{{ (matrix_playbook_service_host_bind_interface_prefix ~ '3000') if matrix_playbook_service_host_bind_interface_prefix else '' }}"
  3015. grafana_provisioning_datasources: |
  3016. {{
  3017. ([{
  3018. 'name': (matrix_server_fqn_matrix + ' - Prometheus'),
  3019. 'type': 'prometheus',
  3020. 'access': 'proxy',
  3021. 'url': 'http://matrix-prometheus:9090',
  3022. }] if prometheus_enabled else [])
  3023. }}
  3024. grafana_dashboard_download_urls: |
  3025. {{
  3026. (matrix_synapse_grafana_dashboard_urls if matrix_homeserver_implementation == 'synapse' and matrix_synapse_metrics_enabled else [])
  3027. +
  3028. (prometheus_node_exporter_dashboard_urls if prometheus_node_exporter_enabled else [])
  3029. +
  3030. (prometheus_postgres_exporter_dashboard_urls if prometheus_postgres_exporter_enabled else [])
  3031. +
  3032. (matrix_prometheus_nginxlog_exporter_dashboard_urls if matrix_prometheus_nginxlog_exporter_enabled else [])
  3033. }}
  3034. grafana_provisioning_dashboard_template_files: |
  3035. {{
  3036. ([{
  3037. 'path': 'roles/custom/matrix-prometheus-nginxlog-exporter/templates/grafana/nginx-proxy.json',
  3038. 'name': 'nginx-proxy.json',
  3039. }] if matrix_prometheus_nginxlog_exporter_enabled else [])
  3040. }}
  3041. grafana_default_home_dashboard_path: |-
  3042. {{
  3043. {
  3044. '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 '')),
  3045. 'dendrite': ('/etc/grafana/dashboards/node-exporter-full.json' if prometheus_node_exporter_enabled else ''),
  3046. 'conduit': ('/etc/grafana/dashboards/node-exporter-full.json' if prometheus_node_exporter_enabled else ''),
  3047. }[matrix_homeserver_implementation]
  3048. }}
  3049. ######################################################################
  3050. #
  3051. # /etke/grafana
  3052. #
  3053. ######################################################################
  3054. ######################################################################
  3055. #
  3056. # matrix-registration
  3057. #
  3058. ######################################################################
  3059. matrix_registration_enabled: false
  3060. # Normally, matrix-nginx-proxy is enabled and nginx can reach matrix-registration over the container network.
  3061. # If matrix-nginx-proxy is not enabled, or you otherwise have a need for it, you can expose
  3062. # matrix-registration's HTTP port to the local host.
  3063. matrix_registration_container_http_host_bind_port: "{{ (matrix_playbook_service_host_bind_interface_prefix ~ '8767') if matrix_playbook_service_host_bind_interface_prefix else '' }}"
  3064. matrix_registration_riot_instance: "{{ ('https://' + matrix_server_fqn_element) if matrix_client_element_enabled else 'https://riot.im/app/' }}"
  3065. matrix_registration_shared_secret: |-
  3066. {{
  3067. {
  3068. 'synapse': matrix_synapse_registration_shared_secret,
  3069. 'dendrite': matrix_dendrite_client_api_registration_shared_secret,
  3070. 'conduit': '',
  3071. }[matrix_homeserver_implementation]
  3072. }}
  3073. matrix_registration_server_location: "{{ matrix_homeserver_container_url }}"
  3074. matrix_registration_api_validate_certs: "{{ false if matrix_playbook_ssl_retrieval_method == 'self-signed' else true }}"
  3075. matrix_registration_container_image_self_build: "{{ matrix_architecture != 'amd64' }}"
  3076. matrix_registration_systemd_required_services_list: |
  3077. {{
  3078. ['docker.service']
  3079. +
  3080. ([devture_postgres_identifier ~ '.service'] if devture_postgres_enabled else [])
  3081. }}
  3082. # Postgres is the default, except if not using internal Postgres server
  3083. matrix_registration_database_engine: "{{ 'postgres' if devture_postgres_enabled else 'sqlite' }}"
  3084. matrix_registration_database_hostname: "{{ devture_postgres_connection_hostname if devture_postgres_enabled else '' }}"
  3085. matrix_registration_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mx.registr.db', rounds=655555) | to_uuid }}"
  3086. ######################################################################
  3087. #
  3088. # /matrix-registration
  3089. #
  3090. ######################################################################
  3091. ######################################################################
  3092. #
  3093. # matrix-sliding-sync
  3094. #
  3095. ######################################################################
  3096. # We don't enable the sliding sync proxy by default.
  3097. matrix_sliding_sync_enabled: false
  3098. matrix_sliding_sync_scheme: "{{ 'https' if matrix_playbook_ssl_enabled else 'http' }}"
  3099. matrix_sliding_sync_hostname: "{{ matrix_server_fqn_matrix }}"
  3100. matrix_sliding_sync_path_prefix: /sliding-sync
  3101. matrix_sliding_sync_container_image_self_build: "{{ matrix_architecture not in ['amd64'] }}"
  3102. matrix_sliding_sync_container_additional_networks: |
  3103. {{
  3104. (
  3105. ([matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network else [])
  3106. +
  3107. ([matrix_nginx_proxy_container_network] if matrix_nginx_proxy_enabled and matrix_nginx_proxy_container_network != matrix_sliding_sync_container_network else [])
  3108. +
  3109. ([devture_postgres_container_network] if devture_postgres_enabled and devture_postgres_container_network != matrix_sliding_sync_container_network else [])
  3110. ) | unique
  3111. }}
  3112. matrix_sliding_sync_container_labels_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type in ['playbook-managed-traefik', 'other-traefik-container'] }}"
  3113. matrix_sliding_sync_container_labels_traefik_docker_network: "{{ matrix_playbook_reverse_proxyable_services_additional_network }}"
  3114. matrix_sliding_sync_container_labels_traefik_entrypoints: "{{ devture_traefik_entrypoint_primary }}"
  3115. matrix_sliding_sync_container_labels_traefik_tls_certResolver: "{{ devture_traefik_certResolver_primary }}"
  3116. matrix_sliding_sync_systemd_required_services_list: |
  3117. {{
  3118. ['docker.service']
  3119. +
  3120. ['matrix-' + matrix_homeserver_implementation + '.service']
  3121. +
  3122. ([devture_postgres_identifier ~ '.service'] if devture_postgres_enabled else [])
  3123. +
  3124. (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
  3125. }}
  3126. matrix_sliding_sync_environment_variable_syncv3_secret: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'ss.secret', rounds=655555) | to_uuid }}"
  3127. matrix_sliding_sync_database_hostname: "{{ devture_postgres_connection_hostname if devture_postgres_enabled else '' }}"
  3128. matrix_sliding_sync_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'ss.db', rounds=655555) | to_uuid }}"
  3129. ######################################################################
  3130. #
  3131. # /matrix-sliding-sync
  3132. #
  3133. ######################################################################
  3134. ######################################################################
  3135. #
  3136. # matrix-dendrite
  3137. #
  3138. ######################################################################
  3139. matrix_dendrite_enabled: "{{ matrix_homeserver_implementation == 'dendrite' }}"
  3140. # Normally, matrix-nginx-proxy is enabled and nginx can reach Dendrite over the container network.
  3141. # If matrix-nginx-proxy is not enabled, or you otherwise have a need for it,
  3142. # you can expose Dendrite's ports to the host.
  3143. #
  3144. # For exposing Dendrite's plain HTTP server to the local host.
  3145. 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 '' }}"
  3146. #
  3147. # For exposing Dendrite's HTTPS server to the local host.
  3148. 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) }}"
  3149. matrix_dendrite_client_api_registration_shared_secret: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'dendrite.rss', rounds=655555) | to_uuid }}"
  3150. matrix_dendrite_database_hostname: "{{ devture_postgres_connection_hostname if devture_postgres_enabled else '' }}"
  3151. matrix_dendrite_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'dendrite.db', rounds=655555) | to_uuid }}"
  3152. # Even if TURN doesn't support TLS (it does by default),
  3153. # it doesn't hurt to try a secure connection anyway.
  3154. matrix_dendrite_client_api_turn_uris: |
  3155. {{
  3156. [
  3157. 'turns:' + matrix_server_fqn_matrix + '?transport=udp',
  3158. 'turns:' + matrix_server_fqn_matrix + '?transport=tcp',
  3159. 'turn:' + matrix_server_fqn_matrix + '?transport=udp',
  3160. 'turn:' + matrix_server_fqn_matrix + '?transport=tcp',
  3161. ]
  3162. if matrix_coturn_enabled
  3163. else []
  3164. }}
  3165. matrix_dendrite_client_api_turn_shared_secret: "{{ matrix_coturn_turn_static_auth_secret if matrix_coturn_enabled else '' }}"
  3166. matrix_dendrite_disable_tls_validation: "{{ true if matrix_playbook_ssl_retrieval_method == 'self-signed' else false }}"
  3167. matrix_dendrite_self_check_validate_certificates: "{{ false if matrix_playbook_ssl_retrieval_method == 'self-signed' else true }}"
  3168. matrix_dendrite_trusted_id_servers: "{{ [matrix_server_fqn_matrix] if matrix_ma1sd_enabled else ['matrix.org', 'vector.im'] }}"
  3169. matrix_dendrite_systemd_required_services_list: |
  3170. {{
  3171. (['docker.service'])
  3172. +
  3173. ([devture_postgres_identifier ~ '.service'] if devture_postgres_enabled else [])
  3174. +
  3175. (['matrix-goofys.service'] if matrix_s3_media_store_enabled else [])
  3176. }}
  3177. matrix_dendrite_systemd_wanted_services_list: |
  3178. {{
  3179. (['matrix-coturn.service'] if matrix_coturn_enabled else [])
  3180. }}
  3181. matrix_dendrite_container_extra_arguments_auto: "{{ matrix_homeserver_container_extra_arguments_auto }}"
  3182. matrix_dendrite_app_service_config_files_auto: "{{ matrix_homeserver_app_service_config_files_auto }}"
  3183. ######################################################################
  3184. #
  3185. # /matrix-dendrite
  3186. #
  3187. ######################################################################
  3188. ######################################################################
  3189. #
  3190. # matrix-conduit
  3191. #
  3192. ######################################################################
  3193. matrix_conduit_enabled: "{{ matrix_homeserver_implementation == 'conduit' }}"
  3194. matrix_conduit_systemd_required_services_list: |
  3195. {{
  3196. (['docker.service'])
  3197. }}
  3198. ######################################################################
  3199. #
  3200. # /matrix-conduit
  3201. #
  3202. ######################################################################
  3203. ######################################################################
  3204. #
  3205. # matrix-user-creator
  3206. #
  3207. ######################################################################
  3208. matrix_user_creator_users_auto: |
  3209. {{
  3210. ([{
  3211. 'username': matrix_bot_matrix_reminder_bot_matrix_user_id_localpart,
  3212. 'initial_password': matrix_bot_matrix_reminder_bot_matrix_user_password,
  3213. 'initial_type': 'bot',
  3214. }] if matrix_bot_matrix_reminder_bot_enabled else [])
  3215. +
  3216. ([{
  3217. 'username': matrix_bot_honoroit_login,
  3218. 'initial_password': matrix_bot_honoroit_password,
  3219. 'initial_type': 'bot',
  3220. }] if matrix_bot_honoroit_enabled else [])
  3221. +
  3222. ([{
  3223. 'username': matrix_bot_postmoogle_login,
  3224. 'initial_password': matrix_bot_postmoogle_password,
  3225. 'initial_type': 'bot',
  3226. }] if matrix_bot_postmoogle_enabled else [])
  3227. +
  3228. ([{
  3229. 'username': matrix_bot_buscarron_login,
  3230. 'initial_password': matrix_bot_buscarron_password,
  3231. 'initial_type': 'bot',
  3232. }] if matrix_bot_buscarron_enabled else [])
  3233. }}
  3234. ######################################################################
  3235. #
  3236. # /matrix-user-creator
  3237. #
  3238. ######################################################################
  3239. ######################################################################
  3240. #
  3241. # matrix-user-verification-service
  3242. #
  3243. ######################################################################
  3244. ## FIXME: Needs to be updated when there is a proper release by upstream.
  3245. matrix_user_verification_service_docker_image: "{{ matrix_user_verification_service_docker_image_name_prefix }}matrixdotorg/matrix-user-verification-service@sha256:d2aabc984dd69d258c91900c36928972d7aaef19d776caa3cd6a0fbc0e307270"
  3246. matrix_user_verification_service_enabled: false
  3247. matrix_user_verification_service_systemd_required_services_list: |
  3248. {{
  3249. ['docker.service']
  3250. +
  3251. (['matrix-synapse.service'] if matrix_synapse_enabled else [])
  3252. +
  3253. ([devture_postgres_identifier ~ '.service'] if devture_postgres_enabled else [])
  3254. }}
  3255. # If Jitsi is managed by this playbook we can use the docker network - no need to expose a port.
  3256. # If Jitsi is not managed by this playbook, or you otherwise have a need for it, you can expose
  3257. # matrix-user-verfification-services's client-server port to port 3003.
  3258. # By default Matrix-User-Verification-Service binds to port 3000, which collides with grafana, therefore this uses port 3003.
  3259. 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' }}"
  3260. # URL exposed in the docker network
  3261. matrix_user_verification_service_container_url: "http://{{ matrix_user_verification_service_container_name }}:3000"
  3262. # We connect via the container network (private IPs), so we need to disable IP checks
  3263. matrix_user_verification_service_uvs_disable_ip_blacklist: "{{'true' if matrix_synapse_enabled else 'false'}}"
  3264. matrix_user_verification_service_uvs_auth_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'uvs.auth.token', rounds=655555) | to_uuid }}"
  3265. ######################################################################
  3266. #
  3267. # /matrix-user-verification-service
  3268. #
  3269. ######################################################################
  3270. ########################################################################
  3271. # #
  3272. # com.devture.ansible.role.container_socket_proxy #
  3273. # #
  3274. ########################################################################
  3275. devture_container_socket_proxy_enabled: "{{ matrix_playbook_reverse_proxy_type == 'playbook-managed-traefik' }}"
  3276. devture_container_socket_proxy_identifier: matrix-container-socket-proxy
  3277. devture_container_socket_proxy_base_path: "{{ matrix_base_data_path }}/container-socket-proxy"
  3278. devture_container_socket_proxy_uid: "{{ matrix_user_uid }}"
  3279. devture_container_socket_proxy_gid: "{{ matrix_user_gid }}"
  3280. # Traefik requires read access to the containers APIs to do its job
  3281. devture_container_socket_proxy_api_containers_enabled: true
  3282. ########################################################################
  3283. # #
  3284. # /com.devture.ansible.role.container_socket_proxy #
  3285. # #
  3286. ########################################################################
  3287. ########################################################################
  3288. # #
  3289. # com.devture.ansible.role.traefik #
  3290. # #
  3291. ########################################################################
  3292. devture_traefik_enabled: "{{ matrix_playbook_reverse_proxy_type == 'playbook-managed-traefik' }}"
  3293. devture_traefik_identifier: matrix-traefik
  3294. devture_traefik_base_path: "{{ matrix_base_data_path }}/traefik"
  3295. devture_traefik_uid: "{{ matrix_user_uid }}"
  3296. devture_traefik_gid: "{{ matrix_user_gid }}"
  3297. devture_traefik_federation_entrypoint:
  3298. name: matrix-federation
  3299. port: "{{ matrix_federation_public_port }}"
  3300. host_bind_port: "{{ matrix_federation_public_port }}"
  3301. config: {}
  3302. devture_traefik_additional_entrypoints_auto: |
  3303. {{
  3304. ([devture_traefik_federation_entrypoint] if (matrix_federation_public_port != devture_traefik_config_entrypoint_web_port) and (matrix_federation_public_port != devture_traefik_config_entrypoint_web_secure_port) else [])
  3305. }}
  3306. devture_traefik_additional_domains_to_obtain_certificates_for: "{{ matrix_ssl_additional_domains_to_obtain_certificates_for }}"
  3307. devture_traefik_config_providers_docker_endpoint: "{{ devture_container_socket_proxy_endpoint if devture_container_socket_proxy_enabled else 'unix:///var/run/docker.sock' }}"
  3308. devture_traefik_container_additional_networks: |
  3309. {{
  3310. ([devture_container_socket_proxy_container_network] if devture_container_socket_proxy_enabled else [])
  3311. }}
  3312. devture_traefik_systemd_required_services_list: |
  3313. {{
  3314. (['docker.service'])
  3315. +
  3316. ([devture_container_socket_proxy_identifier + '.service'] if devture_container_socket_proxy_enabled else [])
  3317. }}
  3318. ########################################################################
  3319. # #
  3320. # /com.devture.ansible.role.traefik #
  3321. # #
  3322. ########################################################################
  3323. ########################################################################
  3324. # #
  3325. # com.devture.ansible.role.traefik_certs_dumper #
  3326. # #
  3327. ########################################################################
  3328. 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' }}"
  3329. devture_traefik_certs_dumper_identifier: matrix-traefik-certs-dumper
  3330. devture_traefik_certs_dumper_base_path: "{{ matrix_base_data_path }}/traefik-certs-dumper"
  3331. devture_traefik_certs_dumper_uid: "{{ matrix_user_uid }}"
  3332. devture_traefik_certs_dumper_gid: "{{ matrix_user_gid }}"
  3333. devture_traefik_certs_dumper_ssl_dir_path: "{{ devture_traefik_ssl_dir_path if devture_traefik_enabled else '' }}"
  3334. ########################################################################
  3335. # #
  3336. # /com.devture.ansible.role.traefik_certs_dumper #
  3337. # #
  3338. ########################################################################