Matrix Docker Ansible eploy
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.
 
 

3042 wiersze
137 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. # This list is not exhaustive and final.
  19. # Synapse workers are still injected into the list at runtime.
  20. # Additional JVB workers (playbooks/jitsi_jvb.yml -- roles/custom/matrix-jitsi/tasks/init_additional_jvb.yml) override this variable at runtime as well.
  21. matrix_systemd_services_list: |
  22. {{
  23. (['matrix-backup-borg.timer'] if matrix_backup_borg_enabled else [])
  24. +
  25. (['matrix-bot-buscarron.service'] if matrix_bot_buscarron_enabled else [])
  26. +
  27. (['matrix-bot-go-neb.service'] if matrix_bot_go_neb_enabled else [])
  28. +
  29. (['matrix-bot-honoroit.service'] if matrix_bot_honoroit_enabled else [])
  30. +
  31. (['matrix-bot-matrix-registration-bot.service'] if matrix_bot_matrix_registration_bot_enabled else [])
  32. +
  33. (['matrix-bot-matrix-reminder-bot.service'] if matrix_bot_matrix_reminder_bot_enabled else [])
  34. +
  35. (['matrix-bot-maubot.service'] if matrix_bot_maubot_enabled else [])
  36. +
  37. (['matrix-bot-mjolnir.service'] if matrix_bot_mjolnir_enabled else [])
  38. +
  39. (['matrix-bot-postmoogle.service'] if matrix_bot_postmoogle_enabled else [])
  40. +
  41. (['matrix-appservice-discord.service'] if matrix_appservice_discord_enabled else [])
  42. +
  43. (['matrix-appservice-irc.service'] if matrix_appservice_irc_enabled else [])
  44. +
  45. (['matrix-appservice-kakaotalk.service', 'matrix-appservice-kakaotalk-node.service'] if matrix_appservice_kakaotalk_enabled else [])
  46. +
  47. (['matrix-appservice-slack.service'] if matrix_appservice_slack_enabled else [])
  48. +
  49. (['matrix-appservice-webhooks.service'] if matrix_appservice_webhooks_enabled else [])
  50. +
  51. (['matrix-beeper-linkedin.service'] if matrix_beeper_linkedin_enabled else [])
  52. +
  53. (['matrix-go-skype-bridge.service'] if matrix_go_skype_bridge_enabled else [])
  54. +
  55. (['matrix-heisenbridge.service'] if matrix_heisenbridge_enabled else [])
  56. +
  57. (['matrix-hookshot.service'] if matrix_hookshot_enabled else [])
  58. +
  59. (['matrix-mautrix-discord.service'] if matrix_mautrix_discord_enabled else [])
  60. +
  61. (['matrix-mautrix-facebook.service'] if matrix_mautrix_facebook_enabled else [])
  62. +
  63. (['matrix-mautrix-googlechat.service'] if matrix_mautrix_googlechat_enabled else [])
  64. +
  65. (['matrix-mautrix-hangouts.service'] if matrix_mautrix_hangouts_enabled else [])
  66. +
  67. (['matrix-mautrix-instagram.service'] if matrix_mautrix_instagram_enabled else [])
  68. +
  69. (['matrix-mautrix-signal.service', 'matrix-mautrix-signal-daemon.service'] if matrix_mautrix_signal_enabled else [])
  70. +
  71. (['matrix-mautrix-telegram.service'] if matrix_mautrix_telegram_enabled else [])
  72. +
  73. (['matrix-mautrix-twitter.service'] if matrix_mautrix_twitter_enabled else [])
  74. +
  75. (['matrix-mautrix-whatsapp.service'] if matrix_mautrix_whatsapp_enabled else [])
  76. +
  77. (['matrix-mx-puppet-discord.service'] if matrix_mx_puppet_discord_enabled else [])
  78. +
  79. (['matrix-mx-puppet-groupme.service'] if matrix_mx_puppet_groupme_enabled else [])
  80. +
  81. (['matrix-mx-puppet-instagram.service'] if matrix_mx_puppet_instagram_enabled else [])
  82. +
  83. (['matrix-mx-puppet-slack.service'] if matrix_mx_puppet_slack_enabled else [])
  84. +
  85. (['matrix-mx-puppet-steam.service'] if matrix_mx_puppet_steam_enabled else [])
  86. +
  87. (['matrix-mx-puppet-twitter.service'] if matrix_mx_puppet_twitter_enabled else [])
  88. +
  89. (['matrix-sms-bridge.service'] if matrix_sms_bridge_enabled else [])
  90. +
  91. (['matrix-cactus-comments.service'] if matrix_cactus_comments_enabled else [])
  92. +
  93. (['matrix-client-cinny.service'] if matrix_client_cinny_enabled else [])
  94. +
  95. (['matrix-client-element.service'] if matrix_client_element_enabled else [])
  96. +
  97. (['matrix-client-hydrogen.service'] if matrix_client_hydrogen_enabled else [])
  98. +
  99. (['matrix-' + matrix_homeserver_implementation + '.service'])
  100. +
  101. (['matrix-corporal.service'] if matrix_corporal_enabled else [])
  102. +
  103. (['matrix-coturn.service'] if matrix_coturn_enabled else [])
  104. +
  105. (['matrix-coturn-reload.timer'] if (matrix_coturn_enabled and matrix_coturn_tls_enabled) else [])
  106. +
  107. (['matrix-dimension.service'] if matrix_dimension_enabled else [])
  108. +
  109. (['matrix-dynamic-dns.service'] if matrix_dynamic_dns_enabled else [])
  110. +
  111. (['matrix-email2matrix.service'] if matrix_email2matrix_enabled else [])
  112. +
  113. (['matrix-etherpad.service'] if matrix_etherpad_enabled else [])
  114. +
  115. (['matrix-grafana.service'] if matrix_grafana_enabled else [])
  116. +
  117. (['matrix-jitsi-web.service', 'matrix-jitsi-prosody.service', 'matrix-jitsi-jicofo.service', 'matrix-jitsi-jvb.service'] if matrix_jitsi_enabled else [])
  118. +
  119. (['matrix-ldap-registration-proxy.service'] if matrix_ldap_registration_proxy_enabled else [])
  120. +
  121. (['matrix-ma1sd.service'] if matrix_ma1sd_enabled else [])
  122. +
  123. (['matrix-mailer.service'] if matrix_mailer_enabled else [])
  124. +
  125. (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
  126. +
  127. (matrix_ssl_renewal_systemd_units_list | selectattr('applicable') | map(attribute='name'))
  128. +
  129. (['matrix-ntfy.service'] if matrix_ntfy_enabled else [])
  130. +
  131. (['matrix-postgres.service'] if matrix_postgres_enabled else [])
  132. +
  133. (['matrix-postgres-backup.service'] if matrix_postgres_backup_enabled else [])
  134. +
  135. (['matrix-prometheus.service'] if matrix_prometheus_enabled else [])
  136. +
  137. (['matrix-prometheus-node-exporter.service'] if matrix_prometheus_node_exporter_enabled else [])
  138. +
  139. (['matrix-prometheus-postgres-exporter.service'] if matrix_prometheus_postgres_exporter_enabled else [])
  140. +
  141. (['matrix-redis'] if matrix_redis_enabled else [])
  142. +
  143. (['matrix-registration.service'] if matrix_registration_enabled else [])
  144. +
  145. (['matrix-sygnal.service'] if matrix_sygnal_enabled else [])
  146. +
  147. (['matrix-goofys.service'] if matrix_s3_media_store_enabled else [])
  148. +
  149. (['matrix-synapse-s3-storage-provider-migrate.timer'] if matrix_synapse_ext_synapse_s3_storage_provider_enabled else [])
  150. +
  151. (['matrix-synapse-admin.service'] if matrix_synapse_admin_enabled else [])
  152. +
  153. (['matrix-synapse-reverse-proxy-companion.service'] if matrix_synapse_reverse_proxy_companion_enabled else [])
  154. }}
  155. matrix_homeserver_app_service_config_files_auto: |
  156. {{
  157. (['--mount type=bind,src=' + matrix_appservice_discord_config_path + '/registration.yaml,dst=/matrix-appservice-discord-registration.yaml,ro'] if matrix_appservice_discord_enabled else [])
  158. +
  159. (['--mount type=bind,src=' + matrix_appservice_irc_config_path + '/registration.yaml,dst=/matrix-appservice-irc-registration.yaml,ro'] if matrix_appservice_irc_enabled else [])
  160. +
  161. (['--mount type=bind,src=' + matrix_appservice_kakaotalk_config_path + '/registration.yaml,dst=/matrix-appservice-kakaotalk-registration.yaml,ro'] if matrix_appservice_kakaotalk_enabled else [])
  162. +
  163. (['--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 [])
  164. +
  165. (['--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 [])
  166. +
  167. (['--mount type=bind,src=' + matrix_beeper_linkedin_config_path + '/registration.yaml,dst=/matrix-beeper-linkedin-registration.yaml,ro'] if matrix_beeper_linkedin_enabled else [])
  168. +
  169. (['--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 [])
  170. +
  171. (['--mount type=bind,src=' + matrix_heisenbridge_base_path + '/registration.yaml,dst=/heisenbridge-registration.yaml,ro'] if matrix_heisenbridge_enabled else [])
  172. +
  173. (['--mount type=bind,src=' + matrix_hookshot_base_path + '/registration.yml,dst=/hookshot-registration.yml,ro'] if matrix_hookshot_enabled else [])
  174. +
  175. (['--mount type=bind,src=' + matrix_mautrix_discord_config_path + '/registration.yaml,dst=/matrix-mautrix-discord-registration.yaml,ro'] if matrix_mautrix_discord_enabled else [])
  176. +
  177. (['--mount type=bind,src=' + matrix_mautrix_facebook_config_path + '/registration.yaml,dst=/matrix-mautrix-facebook-registration.yaml,ro'] if matrix_mautrix_facebook_enabled else [])
  178. +
  179. (['--mount type=bind,src=' + matrix_mautrix_googlechat_config_path + '/registration.yaml,dst=/matrix-mautrix-googlechat-registration.yaml,ro'] if matrix_mautrix_googlechat_enabled else [])
  180. +
  181. (['--mount type=bind,src=' + matrix_mautrix_hangouts_config_path + '/registration.yaml,dst=/matrix-mautrix-hangouts-registration.yaml,ro'] if matrix_mautrix_hangouts_enabled else [])
  182. +
  183. (['--mount type=bind,src=' + matrix_mautrix_instagram_config_path + '/registration.yaml,dst=/matrix-mautrix-instagram-registration.yaml,ro'] if matrix_mautrix_instagram_enabled else [])
  184. +
  185. (['--mount type=bind,src=' + matrix_mautrix_signal_config_path + '/registration.yaml,dst=/matrix-mautrix-signal-registration.yaml,ro'] if matrix_mautrix_signal_enabled else [])
  186. +
  187. (['--mount type=bind,src=' + matrix_mautrix_telegram_config_path + '/registration.yaml,dst=/matrix-mautrix-telegram-registration.yaml,ro'] if matrix_mautrix_telegram_enabled else [])
  188. +
  189. (['--mount type=bind,src=' + matrix_mautrix_twitter_config_path + '/registration.yaml,dst=/matrix-mautrix-twitter-registration.yaml,ro'] if matrix_mautrix_twitter_enabled else [])
  190. +
  191. (['--mount type=bind,src=' + matrix_mautrix_whatsapp_config_path + '/registration.yaml,dst=/matrix-mautrix-whatsapp-registration.yaml,ro'] if matrix_mautrix_whatsapp_enabled else [])
  192. +
  193. (['--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 [])
  194. +
  195. (['--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 [])
  196. +
  197. (['--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 [])
  198. +
  199. (['--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 [])
  200. +
  201. (['--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 [])
  202. +
  203. (['--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 [])
  204. +
  205. (['--mount type=bind,src=' + matrix_sms_bridge_config_path + '/registration.yaml,dst=/matrix-sms-bridge-registration.yaml,ro'] if matrix_sms_bridge_enabled else [])
  206. +
  207. (['--mount type=bind,src=' + matrix_cactus_comments_app_service_config_file + ',dst=/matrix-cactus-comments.yaml,ro'] if matrix_cactus_comments_enabled else [])
  208. }}
  209. matrix_homeserver_additional_config_files_auto: |
  210. {{
  211. (['/matrix-appservice-discord-registration.yaml'] if matrix_appservice_discord_enabled else [])
  212. +
  213. (['/matrix-appservice-irc-registration.yaml'] if matrix_appservice_irc_enabled else [])
  214. +
  215. (['/matrix-appservice-kakaotalk-registration.yaml'] if matrix_appservice_kakaotalk_enabled else [])
  216. +
  217. (['/matrix-appservice-slack-registration.yaml'] if matrix_appservice_slack_enabled else [])
  218. +
  219. (['/matrix-appservice-webhooks-registration.yaml'] if matrix_appservice_webhooks_enabled else [])
  220. +
  221. (['/matrix-beeper-linkedin-registration.yaml'] if matrix_beeper_linkedin_enabled else [])
  222. +
  223. (['/matrix-go-skype-bridge-registration.yaml'] if matrix_go_skype_bridge_enabled else [])
  224. +
  225. (['/heisenbridge-registration.yaml'] if matrix_heisenbridge_enabled else [])
  226. +
  227. (['/hookshot-registration.yml'] if matrix_hookshot_enabled else [])
  228. +
  229. (['/matrix-mautrix-discord-registration.yaml'] if matrix_mautrix_discord_enabled else [])
  230. +
  231. (['/matrix-mautrix-facebook-registration.yaml'] if matrix_mautrix_facebook_enabled else [])
  232. +
  233. (['/matrix-mautrix-googlechat-registration.yaml'] if matrix_mautrix_googlechat_enabled else [])
  234. +
  235. (['/matrix-mautrix-hangouts-registration.yaml'] if matrix_mautrix_hangouts_enabled else [])
  236. +
  237. (['/matrix-mautrix-instagram-registration.yaml'] if matrix_mautrix_instagram_enabled else [])
  238. +
  239. (['/matrix-mautrix-signal-registration.yaml'] if matrix_mautrix_signal_enabled else [])
  240. +
  241. (['/matrix-mautrix-telegram-registration.yaml'] if matrix_mautrix_telegram_enabled else [])
  242. +
  243. (['/matrix-mautrix-twitter-registration.yaml'] if matrix_mautrix_twitter_enabled else [])
  244. +
  245. (['/matrix-mautrix-whatsapp-registration.yaml'] if matrix_mautrix_whatsapp_enabled else [])
  246. +
  247. (['/matrix-mx-puppet-discord-registration.yaml'] if matrix_mx_puppet_discord_enabled else [])
  248. +
  249. (['/matrix-mx-puppet-groupme-registration.yaml'] if matrix_mx_puppet_groupme_enabled else [])
  250. +
  251. (['/matrix-mx-puppet-instagram-registration.yaml'] if matrix_mx_puppet_instagram_enabled else [])
  252. +
  253. (['/matrix-mx-puppet-slack-registration.yaml'] if matrix_mx_puppet_slack_enabled else [])
  254. +
  255. (['/matrix-mx-puppet-steam-registration.yaml'] if matrix_mx_puppet_steam_enabled else [])
  256. +
  257. (['/matrix-mx-puppet-twitter-registration.yaml'] if matrix_mx_puppet_twitter_enabled else [])
  258. +
  259. (['/matrix-sms-bridge-registration.yaml'] if matrix_sms_bridge_enabled else [])
  260. +
  261. (['/matrix-cactus-comments.yaml'] if matrix_cactus_comments_enabled else [])
  262. }}
  263. ########################################################################
  264. # #
  265. # /Playbook #
  266. # #
  267. ########################################################################
  268. ########################################################################
  269. # #
  270. # com.devture.ansible.role.timesync #
  271. # #
  272. ########################################################################
  273. # To completely disable installing systemd-timesyncd/ntpd, use `devture_timesync_installation_enabled: false`.
  274. ########################################################################
  275. # #
  276. # /com.devture.ansible.role.timesync #
  277. # #
  278. ########################################################################
  279. ######################################################################
  280. #
  281. # com.devture.ansible.role.playbook_state_preserver
  282. #
  283. ######################################################################
  284. # To completely disable this feature, use `devture_playbook_state_preserver_enabled: false`.
  285. devture_playbook_state_preserver_uid: "{{ matrix_user_uid }}"
  286. devture_playbook_state_preserver_gid: "{{ matrix_user_gid }}"
  287. devture_playbook_state_preserver_vars_preservation_dst: "{{ matrix_base_data_path }}/vars.yml"
  288. devture_playbook_state_preserver_commit_hash_preservation_dst: "{{ matrix_base_data_path }}/git_hash.yml"
  289. ######################################################################
  290. #
  291. # /com.devture.ansible.role.playbook_state_preserver
  292. #
  293. ######################################################################
  294. ######################################################################
  295. #
  296. # matrix-base
  297. #
  298. ######################################################################
  299. matrix_identity_server_url: "{{ ('https://' + matrix_server_fqn_matrix) if matrix_ma1sd_enabled else None }}"
  300. matrix_homeserver_container_url: |-
  301. {{
  302. 'http://matrix-nginx-proxy:12080' if matrix_nginx_proxy_enabled else {
  303. '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),
  304. 'dendrite': ('http://matrix-dendrite:' + matrix_dendrite_http_bind_port|string),
  305. 'conduit': ('http://matrix-conduit:' + matrix_conduit_port_number|string),
  306. }[matrix_homeserver_implementation]
  307. }}
  308. matrix_homeserver_container_federation_url: |-
  309. {{
  310. 'http://matrix-nginx-proxy:12088' if matrix_nginx_proxy_enabled else {
  311. '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),
  312. 'dendrite': ('http://matrix-dendrite:' + matrix_dendrite_http_bind_port|string),
  313. 'conduit': ('http://matrix-conduit:' + matrix_conduit_port_number|string),
  314. }[matrix_homeserver_implementation]
  315. }}
  316. matrix_integration_manager_rest_url: "{{ matrix_dimension_integrations_rest_url if matrix_dimension_enabled else None }}"
  317. matrix_integration_manager_ui_url: "{{ matrix_dimension_integrations_ui_url if matrix_dimension_enabled else None }}"
  318. ######################################################################
  319. #
  320. # /matrix-base
  321. #
  322. ######################################################################
  323. ######################################################################
  324. #
  325. # matrix-bridge-appservice-discord
  326. #
  327. ######################################################################
  328. # We don't enable bridges by default.
  329. matrix_appservice_discord_enabled: false
  330. # Normally, matrix-nginx-proxy is enabled and nginx can reach matrix-appservice-discord over the container network.
  331. # If matrix-nginx-proxy is not enabled, or you otherwise have a need for it, you can expose
  332. # matrix-appservice-discord's client-server port to the local host.
  333. matrix_appservice_discord_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:9005' }}"
  334. # If the homeserver disables presence, it's likely better (less wasteful) to also disable presence on the bridge side.
  335. matrix_appservice_discord_bridge_disablePresence: "{{ not matrix_synapse_presence_enabled }}"
  336. matrix_appservice_discord_systemd_required_services_list: |
  337. {{
  338. ['docker.service']
  339. +
  340. ['matrix-' + matrix_homeserver_implementation + '.service']
  341. +
  342. (['matrix-postgres.service'] if matrix_postgres_enabled else [])
  343. +
  344. (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
  345. }}
  346. matrix_appservice_discord_appservice_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'discord.as.token') | to_uuid }}"
  347. matrix_appservice_discord_homeserver_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'discord.hs.token') | to_uuid }}"
  348. # We only make this use Postgres if our own Postgres server is enabled.
  349. # It's only then (for now) that we can automatically create the necessary database and user for this service.
  350. matrix_appservice_discord_database_engine: "{{ 'postgres' if matrix_postgres_enabled else 'sqlite' }}"
  351. matrix_appservice_discord_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'as.discord.db') | to_uuid }}"
  352. ######################################################################
  353. #
  354. # /matrix-bridge-appservice-discord
  355. #
  356. ######################################################################
  357. ######################################################################
  358. #
  359. # matrix-appservice-webhooks
  360. #
  361. ######################################################################
  362. # We don't enable bridges by default.
  363. matrix_appservice_webhooks_enabled: false
  364. matrix_appservice_webhooks_container_image_self_build: "{{ matrix_architecture != 'amd64' }}"
  365. # Normally, matrix-nginx-proxy is enabled and nginx can reach matrix-appservice-webhooks over the container network.
  366. # If matrix-nginx-proxy is not enabled, or you otherwise have a need for it, you can expose
  367. # matrix-appservice-webhooks' client-server port to the local host.
  368. matrix_appservice_webhooks_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else ('127.0.0.1:' ~ matrix_appservice_webhooks_matrix_port) }}"
  369. matrix_appservice_webhooks_appservice_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'webhook.as.token') | to_uuid }}"
  370. matrix_appservice_webhooks_homeserver_url: "{{ matrix_homeserver_container_url }}"
  371. matrix_appservice_webhooks_homeserver_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'webhook.hs.token') | to_uuid }}"
  372. matrix_appservice_webhooks_id_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'webhook.id.token') | to_uuid }}"
  373. matrix_appservice_webhooks_systemd_required_services_list: |
  374. {{
  375. ['docker.service']
  376. +
  377. ['matrix-' + matrix_homeserver_implementation + '.service']
  378. +
  379. (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
  380. }}
  381. ######################################################################
  382. #
  383. # /matrix-appservice-webhooks
  384. #
  385. ######################################################################
  386. ######################################################################
  387. #
  388. # matrix-appservice-slack
  389. #
  390. ######################################################################
  391. # We don't enable bridges by default.
  392. matrix_appservice_slack_enabled: false
  393. matrix_appservice_slack_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm64'] }}"
  394. # Normally, matrix-nginx-proxy is enabled and nginx can reach matrix-appservice-slack over the container network.
  395. # If matrix-nginx-proxy is not enabled, or you otherwise have a need for it, you can expose
  396. # matrix-appservice-slack's client-server port to the local host.
  397. matrix_appservice_slack_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else ('127.0.0.1:' ~ matrix_appservice_slack_slack_port) }}"
  398. matrix_appservice_slack_appservice_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'slack.as.token') | to_uuid }}"
  399. matrix_appservice_slack_homeserver_url: "{{ matrix_homeserver_container_url }}"
  400. matrix_appservice_slack_homeserver_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'slack.hs.token') | to_uuid }}"
  401. matrix_appservice_slack_id_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'slack.id.token') | to_uuid }}"
  402. matrix_appservice_slack_systemd_required_services_list: |
  403. {{
  404. ['docker.service']
  405. +
  406. ['matrix-' + matrix_homeserver_implementation + '.service']
  407. +
  408. (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
  409. }}
  410. # Postgres is the default, except if not using `matrix_postgres` (internal postgres)
  411. matrix_appservice_slack_database_engine: "{{ 'postgres' if matrix_postgres_enabled else 'nedb' }}"
  412. matrix_appservice_slack_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'as.slack.db') | to_uuid }}"
  413. ######################################################################
  414. #
  415. # /matrix-bridge-appservice-slack
  416. #
  417. ######################################################################
  418. ######################################################################
  419. #
  420. # matrix-bridge-appservice-irc
  421. #
  422. ######################################################################
  423. # We don't enable bridges by default.
  424. matrix_appservice_irc_enabled: false
  425. matrix_appservice_irc_container_image_self_build: "{{ matrix_architecture != 'amd64' }}"
  426. # Normally, matrix-nginx-proxy is enabled and nginx can reach matrix-appservice-irc over the container network.
  427. # If matrix-nginx-proxy is not enabled, or you otherwise have a need for it, you can expose
  428. # matrix-appservice-irc's client-server port to the local host.
  429. matrix_appservice_irc_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:9999' }}"
  430. # The IRC bridge docs say that if homeserver presence is disabled, it's better to also disable
  431. # IRC bridge presence, for performance reasons.
  432. matrix_appservice_irc_homeserver_enablePresence: "{{ matrix_synapse_presence_enabled }}"
  433. matrix_appservice_irc_systemd_required_services_list: |
  434. {{
  435. ['docker.service']
  436. +
  437. ['matrix-' + matrix_homeserver_implementation + '.service']
  438. +
  439. (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
  440. }}
  441. matrix_appservice_irc_appservice_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'irc.as.token') | to_uuid }}"
  442. matrix_appservice_irc_homeserver_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'irc.hs.token') | to_uuid }}"
  443. matrix_appservice_irc_database_engine: "{{ 'postgres' if matrix_postgres_enabled else 'nedb' }}"
  444. matrix_appservice_irc_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'as.irc.db') | to_uuid }}"
  445. ######################################################################
  446. #
  447. # /matrix-bridge-appservice-irc
  448. #
  449. ######################################################################
  450. ######################################################################
  451. #
  452. # matrix-bridge-appservice-kakaotalk
  453. #
  454. ######################################################################
  455. # We don't enable bridges by default.
  456. matrix_appservice_kakaotalk_enabled: false
  457. matrix_appservice_kakaotalk_systemd_required_services_list: |
  458. {{
  459. ['docker.service']
  460. +
  461. ['matrix-appservice-kakaotalk-node.service']
  462. +
  463. ['matrix-' + matrix_homeserver_implementation + '.service']
  464. +
  465. (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
  466. +
  467. (['matrix-postgres.service'] if matrix_postgres_enabled else [])
  468. }}
  469. matrix_appservice_kakaotalk_appservice_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'as.kakao.hs') | to_uuid }}"
  470. matrix_appservice_kakaotalk_homeserver_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'as.kakao.hs') | to_uuid }}"
  471. 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 '' }}"
  472. matrix_appservice_kakaotalk_database_engine: "{{ 'postgres' if matrix_postgres_enabled else 'sqlite' }}"
  473. matrix_appservice_kakaotalk_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'as.kakao.db') | to_uuid }}"
  474. ######################################################################
  475. #
  476. # /matrix-bridge-appservice-kakaotalk
  477. #
  478. ######################################################################
  479. ######################################################################
  480. #
  481. # matrix-bridge-beeper-linkedin
  482. #
  483. ######################################################################
  484. # We don't enable bridges by default.
  485. matrix_beeper_linkedin_enabled: false
  486. matrix_beeper_linkedin_container_image_self_build: "{{ matrix_architecture not in ['amd64'] }}"
  487. matrix_beeper_linkedin_systemd_required_services_list: |
  488. {{
  489. ['docker.service']
  490. +
  491. ['matrix-' + matrix_homeserver_implementation + '.service']
  492. +
  493. (['matrix-postgres.service'] if matrix_postgres_enabled else [])
  494. +
  495. (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
  496. }}
  497. matrix_beeper_linkedin_appservice_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'linked.as.token') | to_uuid }}"
  498. matrix_beeper_linkedin_homeserver_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'linked.hs.token') | to_uuid }}"
  499. 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 '' }}"
  500. matrix_beeper_linkedin_bridge_presence: "{{ matrix_synapse_presence_enabled if matrix_synapse_enabled else true }}"
  501. matrix_beeper_linkedin_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'maulinkedin.db') | to_uuid }}"
  502. ######################################################################
  503. #
  504. # /matrix-bridge-beeper-linkedin
  505. #
  506. ######################################################################
  507. ######################################################################
  508. #
  509. # matrix-bridge-go-skype-bridge
  510. #
  511. ######################################################################
  512. # We don't enable bridges by default.
  513. matrix_go_skype_bridge_enabled: false
  514. matrix_go_skype_bridge_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm64'] }}"
  515. matrix_go_skype_bridge_systemd_required_services_list: |
  516. {{
  517. ['docker.service']
  518. +
  519. ['matrix-' + matrix_homeserver_implementation + '.service']
  520. +
  521. (['matrix-postgres.service'] if matrix_postgres_enabled else [])
  522. +
  523. (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
  524. }}
  525. matrix_go_skype_bridge_appservice_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'skype.as.token') | to_uuid }}"
  526. matrix_go_skype_bridge_homeserver_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'skype.hs.token') | to_uuid }}"
  527. 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 '' }}"
  528. # Postgres is the default, except if not using `matrix_postgres` (internal postgres)
  529. matrix_go_skype_bridge_database_engine: "{{ 'postgres' if matrix_postgres_enabled else 'sqlite' }}"
  530. matrix_go_skype_bridge_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'goskype.db') | to_uuid }}"
  531. ######################################################################
  532. #
  533. # /matrix-bridge-go-skype-bridge
  534. #
  535. ######################################################################
  536. ######################################################################
  537. #
  538. # matrix-bridge-mautrix-facebook
  539. #
  540. ######################################################################
  541. # We don't enable bridges by default.
  542. matrix_mautrix_facebook_enabled: false
  543. matrix_mautrix_facebook_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm64'] }}"
  544. matrix_mautrix_facebook_systemd_required_services_list: |
  545. {{
  546. ['docker.service']
  547. +
  548. ['matrix-' + matrix_homeserver_implementation + '.service']
  549. +
  550. (['matrix-postgres.service'] if matrix_postgres_enabled else [])
  551. +
  552. (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
  553. }}
  554. matrix_mautrix_facebook_appservice_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'fb.as.token') | to_uuid }}"
  555. matrix_mautrix_facebook_homeserver_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'fb.hs.token') | to_uuid }}"
  556. matrix_mautrix_facebook_public_endpoint: "/{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'facebook') | to_uuid }}"
  557. matrix_mautrix_facebook_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:9008' }}"
  558. 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 '' }}"
  559. matrix_mautrix_facebook_bridge_presence: "{{ matrix_synapse_presence_enabled if matrix_synapse_enabled else true }}"
  560. # We'd like to force-set people with external Postgres to SQLite, so the bridge role can complain
  561. # and point them to a migration path.
  562. matrix_mautrix_facebook_database_engine: "{{ 'postgres' if matrix_postgres_enabled else 'sqlite' }}"
  563. matrix_mautrix_facebook_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mau.fb.db') | to_uuid }}"
  564. ######################################################################
  565. #
  566. # /matrix-bridge-mautrix-facebook
  567. #
  568. ######################################################################
  569. ######################################################################
  570. #
  571. # matrix-bridge-mautrix-hangouts
  572. #
  573. ######################################################################
  574. # We don't enable bridges by default.
  575. matrix_mautrix_hangouts_enabled: false
  576. matrix_mautrix_hangouts_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm64'] }}"
  577. matrix_mautrix_hangouts_systemd_required_services_list: |
  578. {{
  579. ['docker.service']
  580. +
  581. ['matrix-' + matrix_homeserver_implementation + '.service']
  582. +
  583. (['matrix-postgres.service'] if matrix_postgres_enabled else [])
  584. +
  585. (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
  586. }}
  587. matrix_mautrix_hangouts_appservice_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'ho.as.token') | to_uuid }}"
  588. matrix_mautrix_hangouts_homeserver_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'ho.hs.token') | to_uuid }}"
  589. matrix_mautrix_hangouts_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:9007' }}"
  590. 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 '' }}"
  591. # Postgres is the default, except if not using `matrix_postgres` (internal postgres)
  592. matrix_mautrix_hangouts_database_engine: "{{ 'postgres' if matrix_postgres_enabled else 'sqlite' }}"
  593. matrix_mautrix_hangouts_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mau.hangouts.db') | to_uuid }}"
  594. ######################################################################
  595. #
  596. # /matrix-bridge-mautrix-hangouts
  597. #
  598. ######################################################################
  599. ######################################################################
  600. #
  601. # matrix-bridge-mautrix-googlechat
  602. #
  603. ######################################################################
  604. # We don't enable bridges by default.
  605. matrix_mautrix_googlechat_enabled: false
  606. matrix_mautrix_googlechat_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm64'] }}"
  607. matrix_mautrix_googlechat_systemd_required_services_list: |
  608. {{
  609. ['docker.service']
  610. +
  611. ['matrix-' + matrix_homeserver_implementation + '.service']
  612. +
  613. (['matrix-postgres.service'] if matrix_postgres_enabled else [])
  614. +
  615. (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
  616. }}
  617. matrix_mautrix_googlechat_appservice_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'gc.as.token') | to_uuid }}"
  618. matrix_mautrix_googlechat_homeserver_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'gc.hs.token') | to_uuid }}"
  619. matrix_mautrix_googlechat_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:9007' }}"
  620. 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 '' }}"
  621. # Postgres is the default, except if not using `matrix_postgres` (internal postgres)
  622. matrix_mautrix_googlechat_database_engine: "{{ 'postgres' if matrix_postgres_enabled else 'sqlite' }}"
  623. matrix_mautrix_googlechat_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mau.gc.db') | to_uuid }}"
  624. ######################################################################
  625. #
  626. # /matrix-bridge-mautrix-googlechat
  627. #
  628. ######################################################################
  629. ######################################################################
  630. #
  631. # matrix-bridge-mautrix-instagram
  632. #
  633. ######################################################################
  634. # We don't enable bridges by default.
  635. matrix_mautrix_instagram_enabled: false
  636. matrix_mautrix_instagram_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm64'] }}"
  637. matrix_mautrix_instagram_systemd_required_services_list: |
  638. {{
  639. ['docker.service']
  640. +
  641. ['matrix-' + matrix_homeserver_implementation + '.service']
  642. +
  643. (['matrix-postgres.service'] if matrix_postgres_enabled else [])
  644. +
  645. (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
  646. }}
  647. matrix_mautrix_instagram_appservice_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'ig.as.token') | to_uuid }}"
  648. matrix_mautrix_instagram_homeserver_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'ig.hs.token') | to_uuid }}"
  649. 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 '' }}"
  650. matrix_mautrix_instagram_bridge_presence: "{{ matrix_synapse_presence_enabled if matrix_synapse_enabled else true }}"
  651. # We'd like to force-set people with external Postgres to SQLite, so the bridge role can complain
  652. # and point them to a migration path.
  653. matrix_mautrix_instagram_database_engine: "{{ 'postgres' if matrix_postgres_enabled else 'sqlite' }}"
  654. matrix_mautrix_instagram_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mau.ig.db') | to_uuid }}"
  655. ######################################################################
  656. #
  657. # /matrix-bridge-mautrix-instagram
  658. #
  659. ######################################################################
  660. ######################################################################
  661. #
  662. # matrix-bridge-mautrix-signal
  663. #
  664. ######################################################################
  665. # We don't enable bridges by default.
  666. matrix_mautrix_signal_enabled: false
  667. matrix_mautrix_signal_systemd_required_services_list: |
  668. {{
  669. ['docker.service']
  670. +
  671. ['matrix-' + matrix_homeserver_implementation + '.service']
  672. +
  673. (['matrix-postgres.service'] if matrix_postgres_enabled else [])
  674. +
  675. (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
  676. +
  677. ['matrix-mautrix-signal-daemon.service']
  678. }}
  679. matrix_mautrix_signal_homeserver_domain: '{{ matrix_domain }}'
  680. matrix_mautrix_signal_homeserver_address: "{{ matrix_homeserver_container_url }}"
  681. matrix_mautrix_signal_homeserver_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'si.hs.token') | to_uuid }}"
  682. matrix_mautrix_signal_appservice_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'si.as.token') | to_uuid }}"
  683. 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 '' }}"
  684. matrix_mautrix_signal_database_engine: 'postgres'
  685. matrix_mautrix_signal_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mau.signal.db') | to_uuid }}"
  686. matrix_mautrix_signal_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm64'] }}"
  687. matrix_mautrix_signal_daemon_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm64'] }}"
  688. ######################################################################
  689. #
  690. # /matrix-bridge-mautrix-signal
  691. #
  692. ######################################################################
  693. ######################################################################
  694. #
  695. # matrix-bridge-mautrix-telegram
  696. #
  697. ######################################################################
  698. # We don't enable bridges by default.
  699. matrix_mautrix_telegram_enabled: false
  700. # Images are multi-arch (amd64 and arm64, but not arm32).
  701. matrix_mautrix_telegram_container_image_self_build: "{{ matrix_architecture not in ['arm64', 'amd64'] }}"
  702. matrix_telegram_lottieconverter_container_image_self_build: "{{ matrix_architecture not in ['arm64', 'amd64'] }}"
  703. matrix_telegram_lottieconverter_container_image_self_build_mask_arch: "{{ matrix_architecture != 'amd64' }}"
  704. matrix_mautrix_telegram_systemd_required_services_list: |
  705. {{
  706. ['docker.service']
  707. +
  708. ['matrix-' + matrix_homeserver_implementation + '.service']
  709. +
  710. (['matrix-postgres.service'] if matrix_postgres_enabled else [])
  711. +
  712. (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
  713. }}
  714. matrix_mautrix_telegram_appservice_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'telegr.as.token') | to_uuid }}"
  715. matrix_mautrix_telegram_homeserver_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'telegr.hs.token') | to_uuid }}"
  716. matrix_mautrix_telegram_public_endpoint: "/{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'telegram') | to_uuid }}"
  717. matrix_mautrix_telegram_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:9006' }}"
  718. 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 '' }}"
  719. # Postgres is the default, except if not using `matrix_postgres` (internal postgres)
  720. matrix_mautrix_telegram_database_engine: "{{ 'postgres' if matrix_postgres_enabled else 'sqlite' }}"
  721. matrix_mautrix_telegram_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mau.telegram.db') | to_uuid }}"
  722. ######################################################################
  723. #
  724. # /matrix-bridge-mautrix-telegram
  725. #
  726. ######################################################################
  727. ######################################################################
  728. #
  729. # matrix-bridge-mautrix-twitter
  730. #
  731. ######################################################################
  732. # We don't enable bridges by default.
  733. matrix_mautrix_twitter_enabled: false
  734. matrix_mautrix_twitter_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm64'] }}"
  735. matrix_mautrix_twitter_systemd_required_services_list: |
  736. {{
  737. ['docker.service']
  738. +
  739. ['matrix-' + matrix_homeserver_implementation + '.service']
  740. +
  741. (['matrix-postgres.service'] if matrix_postgres_enabled else [])
  742. +
  743. (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
  744. }}
  745. matrix_mautrix_twitter_appservice_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'twt.as.token') | to_uuid }}"
  746. matrix_mautrix_twitter_homeserver_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'twt.hs.token') | to_uuid }}"
  747. 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 '' }}"
  748. matrix_mautrix_twitter_database_hostname: "{{ 'matrix-postgres' if matrix_postgres_enabled else '' }}"
  749. matrix_mautrix_twitter_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mau.twt.db') | to_uuid if matrix_postgres_enabled else '' }}"
  750. ######################################################################
  751. #
  752. # /matrix-bridge-mautrix-twitter
  753. #
  754. ######################################################################
  755. ######################################################################
  756. #
  757. # matrix-bridge-mautrix-whatsapp
  758. #
  759. ######################################################################
  760. # We don't enable bridges by default.
  761. matrix_mautrix_whatsapp_enabled: false
  762. matrix_mautrix_whatsapp_container_image_self_build: "{{ matrix_architecture not in ['arm64', 'amd64'] }}"
  763. matrix_mautrix_whatsapp_systemd_required_services_list: |
  764. {{
  765. ['docker.service']
  766. +
  767. ['matrix-' + matrix_homeserver_implementation + '.service']
  768. +
  769. (['matrix-postgres.service'] if matrix_postgres_enabled else [])
  770. +
  771. (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
  772. }}
  773. matrix_mautrix_whatsapp_appservice_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'whats.as.token') | to_uuid }}"
  774. matrix_mautrix_whatsapp_homeserver_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'whats.hs.token') | to_uuid }}"
  775. 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 '' }}"
  776. # Postgres is the default, except if not using `matrix_postgres` (internal postgres)
  777. matrix_mautrix_whatsapp_database_engine: "{{ 'postgres' if matrix_postgres_enabled else 'sqlite' }}"
  778. matrix_mautrix_whatsapp_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mauwhatsapp.db') | to_uuid }}"
  779. ######################################################################
  780. #
  781. # /matrix-bridge-mautrix-whatsapp
  782. #
  783. ######################################################################
  784. ######################################################################
  785. #
  786. # matrix-bridge-mautrix-discord
  787. #
  788. ######################################################################
  789. # We don't enable bridges by default.
  790. matrix_mautrix_discord_enabled: false
  791. matrix_mautrix_discord_container_image_self_build: "{{ matrix_architecture not in ['arm64', 'amd64'] }}"
  792. matrix_mautrix_discord_systemd_required_services_list: |
  793. {{
  794. ['docker.service']
  795. +
  796. ['matrix-' + matrix_homeserver_implementation + '.service']
  797. +
  798. (['matrix-postgres.service'] if matrix_postgres_enabled else [])
  799. +
  800. (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
  801. }}
  802. matrix_mautrix_discord_appservice_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'maudisc.as.tok') | to_uuid }}"
  803. matrix_mautrix_discord_homeserver_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'maudisc.hs.tok') | to_uuid }}"
  804. 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 '' }}"
  805. # Postgres is the default, except if not using `matrix_postgres` (internal postgres)
  806. matrix_mautrix_discord_database_engine: "{{ 'postgres' if matrix_postgres_enabled else 'sqlite' }}"
  807. matrix_mautrix_discord_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'maudiscord.db') | to_uuid }}"
  808. # Enabling bridge.restricted_rooms for this bridge does not work well with Conduit, so we disable it by default.
  809. # This will be fixed in the upcoming `0.5.0` release of conduit.
  810. matrix_mautrix_discord_bridge_restricted_rooms: "{{ false if matrix_homeserver_implementation == 'conduit' else true }}"
  811. ######################################################################
  812. #
  813. # /matrix-bridge-mautrix-discord
  814. #
  815. ######################################################################
  816. ######################################################################
  817. #
  818. # matrix-sms-bridge
  819. #
  820. ######################################################################
  821. # We don't enable bridges by default.
  822. matrix_sms_bridge_enabled: false
  823. matrix_sms_bridge_systemd_required_services_list: |
  824. {{
  825. ['docker.service']
  826. +
  827. ['matrix-' + matrix_homeserver_implementation + '.service']
  828. +
  829. (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
  830. }}
  831. matrix_sms_bridge_appservice_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'sms.as.token') | to_uuid }}"
  832. matrix_sms_bridge_homeserver_port: "{{ matrix_synapse_container_client_api_port }}"
  833. matrix_sms_bridge_homeserver_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'sms.hs.token') | to_uuid }}"
  834. ######################################################################
  835. #
  836. # /matrix-sms-bridge
  837. #
  838. ######################################################################
  839. ######################################################################
  840. #
  841. # matrix-bridge-heisenbridge
  842. #
  843. ######################################################################
  844. # We don't enable bridges by default.
  845. matrix_heisenbridge_enabled: false
  846. matrix_heisenbridge_appservice_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'heisen.as.tok') | to_uuid }}"
  847. matrix_heisenbridge_homeserver_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'heisen.hs.tok') | to_uuid }}"
  848. matrix_heisenbridge_systemd_wanted_services_list: |
  849. {{
  850. ['matrix-' + matrix_homeserver_implementation + '.service']
  851. +
  852. (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
  853. }}
  854. ######################################################################
  855. #
  856. # /matrix-bridge-heisenbridge
  857. #
  858. ######################################################################
  859. ######################################################################
  860. #
  861. # matrix-bridge-hookshot
  862. #
  863. ######################################################################
  864. # We don't enable bridges by default.
  865. matrix_hookshot_enabled: false
  866. matrix_hookshot_container_image_self_build: "{{ matrix_architecture not in ['arm64', 'amd64'] }}"
  867. matrix_hookshot_appservice_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'hookshot.as.tok') | to_uuid }}"
  868. matrix_hookshot_homeserver_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'hookshot.hs.tok') | to_uuid }}"
  869. matrix_hookshot_systemd_wanted_services_list: |
  870. {{
  871. (['matrix-' + matrix_homeserver_implementation + '.service'])
  872. +
  873. (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
  874. }}
  875. matrix_hookshot_container_http_host_bind_ports_defaultmapping:
  876. - "127.0.0.1:{{ matrix_hookshot_appservice_port }}:{{ matrix_hookshot_appservice_port }}"
  877. - "127.0.0.1:{{ matrix_hookshot_metrics_port }}:{{ matrix_hookshot_metrics_port }}"
  878. - "127.0.0.1:{{ matrix_hookshot_webhook_port }}:{{ matrix_hookshot_webhook_port }}"
  879. - "127.0.0.1:{{ matrix_hookshot_provisioning_port }}:{{ matrix_hookshot_provisioning_port }}"
  880. matrix_hookshot_container_http_host_bind_ports: "{{ [] if matrix_nginx_proxy_enabled else matrix_hookshot_container_http_host_bind_ports_defaultmapping }}"
  881. matrix_hookshot_provisioning_enabled: "{{ matrix_hookshot_provisioning_secret and matrix_dimension_enabled }}"
  882. # We only enable metrics (locally, in the container network) for the bridge if Prometheus is enabled.
  883. #
  884. # People using an external Prometheus server will need to toggle all of these to be able to consume metrics remotely:
  885. # - `matrix_hookshot_metrics_enabled`
  886. # - `matrix_hookshot_metrics_proxying_enabled`
  887. # - `matrix_nginx_proxy_proxy_matrix_metrics_enabled`
  888. matrix_hookshot_metrics_enabled: "{{ matrix_prometheus_enabled }}"
  889. 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 }}"
  890. 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 }}"
  891. matrix_hookshot_urlprefix: "http{{ 's' if matrix_nginx_proxy_https_enabled else '' }}://{{ matrix_server_fqn_matrix }}{{ matrix_hookshot_urlprefix_port if matrix_hookshot_urlprefix_port_enabled else '' }}"
  892. ######################################################################
  893. #
  894. # /matrix-bridge-hookshot
  895. #
  896. ######################################################################
  897. ######################################################################
  898. #
  899. # matrix-bridge-mx-puppet-slack
  900. #
  901. ######################################################################
  902. # We don't enable bridges by default.
  903. matrix_mx_puppet_slack_enabled: false
  904. matrix_mx_puppet_slack_container_image_self_build: "{{ matrix_architecture != 'amd64' }}"
  905. matrix_mx_puppet_slack_systemd_required_services_list: |
  906. {{
  907. ['docker.service']
  908. +
  909. ['matrix-' + matrix_homeserver_implementation + '.service']
  910. +
  911. (['matrix-postgres.service'] if matrix_postgres_enabled else [])
  912. +
  913. (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
  914. }}
  915. matrix_mx_puppet_slack_appservice_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mxslk.as.tok') | to_uuid }}"
  916. matrix_mx_puppet_slack_homeserver_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mxslk.hs.tok') | to_uuid }}"
  917. 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 '' }}"
  918. # Postgres is the default, except if not using `matrix_postgres` (internal postgres)
  919. matrix_mx_puppet_slack_database_engine: "{{ 'postgres' if matrix_postgres_enabled else 'sqlite' }}"
  920. matrix_mx_puppet_slack_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mxpup.slack.db') | to_uuid }}"
  921. ######################################################################
  922. #
  923. # /matrix-bridge-mx-puppet-slack
  924. #
  925. ######################################################################
  926. ######################################################################
  927. #
  928. # matrix-bridge-mx-puppet-twitter
  929. #
  930. ######################################################################
  931. # We don't enable bridges by default.
  932. matrix_mx_puppet_twitter_enabled: false
  933. matrix_mx_puppet_twitter_container_image_self_build: "{{ matrix_architecture != 'amd64' }}"
  934. matrix_mx_puppet_twitter_systemd_required_services_list: |
  935. {{
  936. ['docker.service']
  937. +
  938. ['matrix-' + matrix_homeserver_implementation + '.service']
  939. +
  940. (['matrix-postgres.service'] if matrix_postgres_enabled else [])
  941. +
  942. (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
  943. }}
  944. matrix_mx_puppet_twitter_appservice_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mxtwt.as.tok') | to_uuid }}"
  945. matrix_mx_puppet_twitter_homeserver_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mxtwt.hs.tok') | to_uuid }}"
  946. 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 '' }}"
  947. matrix_mx_puppet_twitter_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else ('127.0.0.1:' ~ matrix_mx_puppet_twitter_appservice_port) }}"
  948. # Postgres is the default, except if not using `matrix_postgres` (internal postgres)
  949. matrix_mx_puppet_twitter_database_engine: "{{ 'postgres' if matrix_postgres_enabled else 'sqlite' }}"
  950. matrix_mx_puppet_twitter_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mxpup.twitter.db') | to_uuid }}"
  951. ######################################################################
  952. #
  953. # /matrix-bridge-mx-puppet-twitter
  954. #
  955. ######################################################################
  956. ######################################################################
  957. #
  958. # matrix-bridge-mx-puppet-instagram
  959. #
  960. ######################################################################
  961. # We don't enable bridges by default.
  962. matrix_mx_puppet_instagram_enabled: false
  963. matrix_mx_puppet_instagram_container_image_self_build: "{{ matrix_architecture != 'amd64' }}"
  964. matrix_mx_puppet_instagram_systemd_required_services_list: |
  965. {{
  966. ['docker.service']
  967. +
  968. ['matrix-' + matrix_homeserver_implementation + '.service']
  969. +
  970. (['matrix-postgres.service'] if matrix_postgres_enabled else [])
  971. +
  972. (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
  973. }}
  974. matrix_mx_puppet_instagram_appservice_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mxig.as.tok') | to_uuid }}"
  975. matrix_mx_puppet_instagram_homeserver_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mxig.hs.tok') | to_uuid }}"
  976. 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 '' }}"
  977. # Postgres is the default, except if not using `matrix_postgres` (internal postgres)
  978. matrix_mx_puppet_instagram_database_engine: "{{ 'postgres' if matrix_postgres_enabled else 'sqlite' }}"
  979. matrix_mx_puppet_instagram_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mxpup.ig.db') | to_uuid }}"
  980. ######################################################################
  981. #
  982. # /matrix-bridge-mx-puppet-instagram
  983. #
  984. ######################################################################
  985. ######################################################################
  986. #
  987. # matrix-bridge-mx-puppet-discord
  988. #
  989. ######################################################################
  990. # We don't enable bridges by default.
  991. matrix_mx_puppet_discord_enabled: false
  992. matrix_mx_puppet_discord_container_image_self_build: "{{ matrix_architecture != 'amd64' }}"
  993. matrix_mx_puppet_discord_systemd_required_services_list: |
  994. {{
  995. ['docker.service']
  996. +
  997. ['matrix-' + matrix_homeserver_implementation + '.service']
  998. +
  999. (['matrix-postgres.service'] if matrix_postgres_enabled else [])
  1000. +
  1001. (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
  1002. }}
  1003. matrix_mx_puppet_discord_appservice_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mxdsc.as.tok') | to_uuid }}"
  1004. matrix_mx_puppet_discord_homeserver_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mxdsc.hs.tok') | to_uuid }}"
  1005. 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 '' }}"
  1006. # Postgres is the default, except if not using `matrix_postgres` (internal postgres)
  1007. matrix_mx_puppet_discord_database_engine: "{{ 'postgres' if matrix_postgres_enabled else 'sqlite' }}"
  1008. matrix_mx_puppet_discord_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mxpup.dsc.db') | to_uuid }}"
  1009. ######################################################################
  1010. #
  1011. # /matrix-bridge-mx-puppet-discord
  1012. #
  1013. ######################################################################
  1014. ######################################################################
  1015. #
  1016. # matrix-bridge-mx-puppet-steam
  1017. #
  1018. ######################################################################
  1019. # We don't enable bridges by default.
  1020. matrix_mx_puppet_steam_enabled: false
  1021. matrix_mx_puppet_steam_container_image_self_build: "{{ matrix_architecture not in ['arm64', 'amd64'] }}"
  1022. matrix_mx_puppet_steam_systemd_required_services_list: |
  1023. {{
  1024. ['docker.service']
  1025. +
  1026. ['matrix-' + matrix_homeserver_implementation + '.service']
  1027. +
  1028. (['matrix-postgres.service'] if matrix_postgres_enabled else [])
  1029. +
  1030. (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
  1031. }}
  1032. matrix_mx_puppet_steam_appservice_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mxste.as.tok') | to_uuid }}"
  1033. matrix_mx_puppet_steam_homeserver_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mxste.hs.tok') | to_uuid }}"
  1034. 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 '' }}"
  1035. # Postgres is the default, except if not using `matrix_postgres` (internal postgres)
  1036. matrix_mx_puppet_steam_database_engine: "{{ 'postgres' if matrix_postgres_enabled else 'sqlite' }}"
  1037. matrix_mx_puppet_steam_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mxpup.steam.db') | to_uuid }}"
  1038. ######################################################################
  1039. #
  1040. # /matrix-bridge-mx-puppet-steam
  1041. #
  1042. ######################################################################
  1043. ######################################################################
  1044. #
  1045. # matrix-bridge-mx-puppet-groupme
  1046. #
  1047. ######################################################################
  1048. # We don't enable bridges by default.
  1049. matrix_mx_puppet_groupme_enabled: false
  1050. matrix_mx_puppet_groupme_container_image_self_build: "{{ matrix_architecture != 'amd64' }}"
  1051. matrix_mx_puppet_groupme_systemd_required_services_list: |
  1052. {{
  1053. ['docker.service']
  1054. +
  1055. ['matrix-' + matrix_homeserver_implementation + '.service']
  1056. +
  1057. (['matrix-postgres.service'] if matrix_postgres_enabled else [])
  1058. +
  1059. (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
  1060. }}
  1061. matrix_mx_puppet_groupme_appservice_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mxgro.as.tok') | to_uuid }}"
  1062. matrix_mx_puppet_groupme_homeserver_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mxgro.hs.tok') | to_uuid }}"
  1063. 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 '' }}"
  1064. # Postgres is the default, except if not using `matrix_postgres` (internal postgres)
  1065. matrix_mx_puppet_groupme_database_engine: "{{ 'postgres' if matrix_postgres_enabled else 'sqlite' }}"
  1066. matrix_mx_puppet_groupme_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mxpup.groupme.db') | to_uuid }}"
  1067. ######################################################################
  1068. #
  1069. # /matrix-bridge-mx-puppet-groupme
  1070. #
  1071. ######################################################################
  1072. ######################################################################
  1073. #
  1074. # matrix-bot-matrix-reminder-bot
  1075. #
  1076. ######################################################################
  1077. # We don't enable bots by default.
  1078. matrix_bot_matrix_reminder_bot_enabled: false
  1079. matrix_bot_matrix_reminder_bot_systemd_required_services_list: |
  1080. {{
  1081. ['docker.service']
  1082. +
  1083. ['matrix-' + matrix_homeserver_implementation + '.service']
  1084. +
  1085. (['matrix-postgres.service'] if matrix_postgres_enabled else [])
  1086. +
  1087. (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
  1088. }}
  1089. # Postgres is the default, except if not using `matrix_postgres` (internal postgres)
  1090. matrix_bot_matrix_reminder_bot_database_engine: "{{ 'postgres' if matrix_postgres_enabled else 'sqlite' }}"
  1091. matrix_bot_matrix_reminder_bot_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'reminder.bot.db') | to_uuid }}"
  1092. matrix_bot_matrix_reminder_bot_container_image_self_build: "{{ matrix_architecture != 'amd64' }}"
  1093. ######################################################################
  1094. #
  1095. # /matrix-bot-matrix-reminder-bot
  1096. #
  1097. ######################################################################
  1098. ######################################################################
  1099. #
  1100. # matrix-bot-matrix-registration-bot
  1101. #
  1102. ######################################################################
  1103. # We don't enable bots by default.
  1104. matrix_bot_matrix_registration_bot_enabled: false
  1105. matrix_bot_matrix_registration_bot_container_image_self_build: "{{ matrix_architecture not in ['amd64'] }}"
  1106. matrix_bot_matrix_registration_bot_systemd_required_services_list: |
  1107. {{
  1108. ['docker.service']
  1109. +
  1110. ['matrix-' + matrix_homeserver_implementation + '.service']
  1111. +
  1112. (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
  1113. }}
  1114. ######################################################################
  1115. #
  1116. # /matrix-bot-matrix-registration-bot
  1117. #
  1118. ######################################################################
  1119. ######################################################################
  1120. #
  1121. # matrix-bot-maubot
  1122. #
  1123. ######################################################################
  1124. # We don't enable bots by default.
  1125. matrix_bot_maubot_enabled: false
  1126. matrix_bot_maubot_container_image_self_build: "{{ matrix_architecture not in ['amd64'] }}"
  1127. matrix_bot_maubot_systemd_required_services_list: |
  1128. {{
  1129. ['docker.service']
  1130. +
  1131. ['matrix-' + matrix_homeserver_implementation + '.service']
  1132. +
  1133. (['matrix-postgres.service'] if matrix_postgres_enabled else [])
  1134. +
  1135. (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
  1136. }}
  1137. matrix_bot_maubot_registration_shared_secret: |-
  1138. {{
  1139. {
  1140. 'synapse': matrix_synapse_registration_shared_secret,
  1141. 'dendrite': matrix_dendrite_registration_shared_secret,
  1142. }[matrix_homeserver_implementation]
  1143. }}
  1144. matrix_bot_maubot_management_interface_http_bind_port: "{{ '' if matrix_nginx_proxy_enabled else ('127.0.0.1:' + matrix_bot_maubot_management_interface_port | string) }}"
  1145. # Postgres is the default, except if not using `matrix_postgres` (internal postgres)
  1146. matrix_bot_maubot_database_engine: "{{ 'postgres' if matrix_postgres_enabled else 'sqlite' }}"
  1147. matrix_bot_maubot_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mxpup.dsc.db') | to_uuid }}"
  1148. ######################################################################
  1149. #
  1150. # /matrix-bot-maubot
  1151. #
  1152. ######################################################################
  1153. ######################################################################
  1154. #
  1155. # matrix-bot-honoroit
  1156. #
  1157. ######################################################################
  1158. # We don't enable bots by default.
  1159. matrix_bot_honoroit_enabled: false
  1160. matrix_bot_honoroit_systemd_required_services_list: |
  1161. {{
  1162. ['docker.service']
  1163. +
  1164. (['matrix-postgres.service'] if matrix_postgres_enabled else [])
  1165. +
  1166. (['matrix-synapse.service'] if matrix_synapse_enabled else [])
  1167. +
  1168. (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
  1169. }}
  1170. # Postgres is the default, except if not using `matrix_postgres` (internal postgres)
  1171. matrix_bot_honoroit_database_engine: "{{ 'postgres' if matrix_postgres_enabled else 'sqlite' }}"
  1172. matrix_bot_honoroit_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'honoroit.bot.db') | to_uuid }}"
  1173. matrix_bot_honoroit_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm64'] }}"
  1174. ######################################################################
  1175. #
  1176. # /matrix-bot-honoroit
  1177. #
  1178. ######################################################################
  1179. ######################################################################
  1180. #
  1181. # matrix-bot-buscarron
  1182. #
  1183. ######################################################################
  1184. # We don't enable bots by default.
  1185. matrix_bot_buscarron_enabled: false
  1186. matrix_bot_buscarron_systemd_required_services_list: |
  1187. {{
  1188. ['docker.service']
  1189. +
  1190. (['matrix-postgres.service'] if matrix_postgres_enabled else [])
  1191. +
  1192. (['matrix-synapse.service'] if matrix_synapse_enabled else [])
  1193. +
  1194. (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
  1195. }}
  1196. # Postgres is the default, except if not using `matrix_postgres` (internal postgres)
  1197. matrix_bot_buscarron_database_engine: "{{ 'postgres' if matrix_postgres_enabled else 'sqlite' }}"
  1198. matrix_bot_buscarron_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'buscarron.bot.db') | to_uuid }}"
  1199. matrix_bot_buscarron_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm64'] }}"
  1200. ######################################################################
  1201. #
  1202. # /matrix-bot-buscarron
  1203. #
  1204. ######################################################################
  1205. ######################################################################
  1206. #
  1207. # matrix-bot-postmoogle
  1208. #
  1209. ######################################################################
  1210. # We don't enable bots by default.
  1211. matrix_bot_postmoogle_enabled: false
  1212. matrix_bot_postmoogle_ssl_path: "{{ matrix_ssl_config_dir_path }}"
  1213. matrix_bot_postmoogle_tls_cert: "{% for domain in matrix_bot_postmoogle_domains %}/ssl/live/{{ domain }}/fullchain.pem {% endfor %}"
  1214. matrix_bot_postmoogle_tls_key: "{% for domain in matrix_bot_postmoogle_domains %}/ssl/live/{{ domain }}/privkey.pem {% endfor %}"
  1215. matrix_bot_postmoogle_systemd_required_services_list: |
  1216. {{
  1217. ['docker.service']
  1218. +
  1219. (['matrix-postgres.service'] if matrix_postgres_enabled else [])
  1220. +
  1221. (['matrix-synapse.service'] if matrix_synapse_enabled else [])
  1222. }}
  1223. # Postgres is the default, except if not using `matrix_postgres` (internal postgres)
  1224. matrix_bot_postmoogle_database_engine: "{{ 'postgres' if matrix_postgres_enabled else 'sqlite' }}"
  1225. matrix_bot_postmoogle_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'postmoogle.db') | to_uuid }}"
  1226. matrix_bot_postmoogle_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm64'] }}"
  1227. ######################################################################
  1228. #
  1229. # /matrix-bot-postmoogle
  1230. #
  1231. ######################################################################
  1232. ######################################################################
  1233. #
  1234. # matrix-bot-go-neb
  1235. #
  1236. ######################################################################
  1237. # We don't enable bots by default.
  1238. matrix_bot_go_neb_enabled: false
  1239. matrix_bot_go_neb_systemd_required_services_list: |
  1240. {{
  1241. ['docker.service']
  1242. +
  1243. ['matrix-' + matrix_homeserver_implementation + '.service']
  1244. +
  1245. (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
  1246. }}
  1247. matrix_bot_go_neb_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:4050' }}"
  1248. ######################################################################
  1249. #
  1250. # /matrix-bot-go-neb
  1251. #
  1252. ######################################################################
  1253. ######################################################################
  1254. #
  1255. # matrix-bot-mjolnir
  1256. #
  1257. ######################################################################
  1258. # We don't enable bots by default.
  1259. matrix_bot_mjolnir_enabled: false
  1260. matrix_bot_mjolnir_container_image_self_build: "{{ matrix_architecture != 'amd64' }}"
  1261. matrix_bot_mjolnir_systemd_required_services_list: |
  1262. {{
  1263. ['docker.service']
  1264. +
  1265. ['matrix-' + matrix_homeserver_implementation + '.service']
  1266. +
  1267. (['matrix-postgres.service'] if matrix_postgres_enabled else [])
  1268. +
  1269. (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
  1270. }}
  1271. ######################################################################
  1272. #
  1273. # /matrix-bot-mjolnir
  1274. #
  1275. ######################################################################
  1276. ######################################################################
  1277. #
  1278. # matrix-backup-borg
  1279. #
  1280. ######################################################################
  1281. matrix_backup_borg_enabled: false
  1282. matrix_backup_borg_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm32', 'arm64'] }}"
  1283. matrix_backup_borg_postgresql_enabled: "{{ matrix_postgres_enabled }}"
  1284. matrix_backup_borg_postgresql_databases_hostname: "{{ matrix_postgres_connection_hostname }}"
  1285. matrix_backup_borg_postgresql_databases_username: "{{ matrix_postgres_connection_username }}"
  1286. matrix_backup_borg_postgresql_databases_password: "{{ matrix_postgres_connection_password }}"
  1287. matrix_backup_borg_postgresql_databases_port: "{{ matrix_postgres_connection_port }}"
  1288. matrix_backup_borg_postgresql_databases: |
  1289. {{
  1290. (([{
  1291. 'name': matrix_synapse_database_database
  1292. }] if (matrix_synapse_enabled and matrix_synapse_database_database == matrix_postgres_db_name and matrix_synapse_database_host == 'matrix-postgres') else [])
  1293. +
  1294. matrix_postgres_additional_databases)|map(attribute='name') | list
  1295. }}
  1296. matrix_backup_borg_location_source_directories:
  1297. - "{{ matrix_base_data_path }}"
  1298. matrix_backup_borg_location_exclude_patterns: |
  1299. {{
  1300. ([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 [])
  1301. +
  1302. ([matrix_postgres_data_path] if matrix_postgres_enabled else [])
  1303. }}
  1304. matrix_backup_borg_systemd_required_services_list: |
  1305. {{
  1306. ['docker.service']
  1307. +
  1308. (['matrix-postgres.service'] if matrix_postgres_enabled else [])
  1309. }}
  1310. ######################################################################
  1311. #
  1312. # /matrix-backup-borg
  1313. #
  1314. ######################################################################
  1315. ######################################################################
  1316. #
  1317. # matrix-cactus-comments
  1318. #
  1319. ######################################################################
  1320. matrix_cactus_comments_enabled: false
  1321. # Derive secret values from homeserver secret
  1322. matrix_cactus_comments_as_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'cactus.as.token') | to_uuid }}"
  1323. matrix_cactus_comments_hs_token: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'cactus.hs.token') | to_uuid }}"
  1324. matrix_cactus_comments_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm32', 'arm64'] }}"
  1325. matrix_cactus_comments_systemd_required_services_list: |
  1326. {{
  1327. (['docker.service'])
  1328. +
  1329. (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
  1330. +
  1331. (['matrix-' + matrix_homeserver_implementation + '.service'])
  1332. }}
  1333. matrix_cactus_comments_client_nginx_path: "{{ '/cactus-comments/' if matrix_nginx_proxy_enabled else matrix_cactus_comments_client_path + '/' }}"
  1334. ######################################################################
  1335. #
  1336. # /matrix-cactus-comments
  1337. #
  1338. ######################################################################
  1339. ######################################################################
  1340. #
  1341. # matrix-corporal
  1342. #
  1343. ######################################################################
  1344. matrix_corporal_enabled: false
  1345. matrix_corporal_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm32', 'arm64'] }}"
  1346. # Normally, matrix-nginx-proxy is enabled and nginx can reach matrix-corporal over the container network.
  1347. # If matrix-nginx-proxy is not enabled, or you otherwise have a need for it, you can expose
  1348. # matrix-corporal's web-server ports to the local host.
  1349. matrix_corporal_container_http_gateway_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:41080' }}"
  1350. matrix_corporal_container_http_api_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:41081' }}"
  1351. matrix_corporal_systemd_required_services_list: |
  1352. {{
  1353. (['docker.service'])
  1354. +
  1355. (['matrix-' + matrix_homeserver_implementation + '.service'])
  1356. }}
  1357. matrix_corporal_matrix_homeserver_api_endpoint: "{{ matrix_homeserver_container_url }}"
  1358. matrix_corporal_matrix_auth_shared_secret: "{{ matrix_synapse_ext_password_provider_shared_secret_auth_shared_secret }}"
  1359. # This is only useful if there's REST auth provider to make use of it.
  1360. matrix_corporal_http_gateway_internal_rest_auth_enabled: "{{ matrix_synapse_ext_password_provider_rest_auth_enabled }}"
  1361. matrix_corporal_matrix_registration_shared_secret: "{{ matrix_synapse_registration_shared_secret }}"
  1362. ######################################################################
  1363. #
  1364. # /matrix-corporal
  1365. #
  1366. ######################################################################
  1367. ######################################################################
  1368. #
  1369. # matrix-coturn
  1370. #
  1371. ######################################################################
  1372. matrix_coturn_enabled: true
  1373. matrix_coturn_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm32', 'arm64'] }}"
  1374. matrix_coturn_turn_external_ip_address: "{{ ansible_host }}"
  1375. matrix_coturn_turn_static_auth_secret: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'coturn.sas') | to_uuid }}"
  1376. matrix_coturn_tls_enabled: "{{ matrix_ssl_retrieval_method != 'none' }}"
  1377. matrix_coturn_tls_cert_path: "{{ matrix_ssl_config_dir_path }}/live/{{ matrix_server_fqn_matrix }}/fullchain.pem"
  1378. matrix_coturn_tls_key_path: "{{ matrix_ssl_config_dir_path }}/live/{{ matrix_server_fqn_matrix }}/privkey.pem"
  1379. matrix_coturn_container_additional_volumes: |
  1380. {{
  1381. ([] if matrix_ssl_retrieval_method == 'none' else [
  1382. {
  1383. 'src': matrix_ssl_config_dir_path,
  1384. 'dst': matrix_ssl_config_dir_path,
  1385. 'options': 'ro',
  1386. }
  1387. ])
  1388. }}
  1389. ######################################################################
  1390. #
  1391. # /matrix-coturn
  1392. #
  1393. ######################################################################
  1394. ######################################################################
  1395. #
  1396. # matrix-dimension
  1397. #
  1398. ######################################################################
  1399. matrix_dimension_enabled: false
  1400. matrix_dimension_container_image_self_build: "{{ matrix_architecture != 'amd64' }}"
  1401. # Normally, matrix-nginx-proxy is enabled and nginx can reach Dimension over the container network.
  1402. # If matrix-nginx-proxy is not enabled, or you otherwise have a need for it, you can expose
  1403. # the Dimension HTTP port to the local host.
  1404. matrix_dimension_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:8184' }}"
  1405. matrix_dimension_homeserver_federationUrl: "{{ matrix_homeserver_container_federation_url }}"
  1406. matrix_dimension_systemd_required_services_list: |
  1407. {{
  1408. ['docker.service']
  1409. +
  1410. ['matrix-' + matrix_homeserver_implementation + '.service']
  1411. +
  1412. (['matrix-postgres.service'] if matrix_postgres_enabled else [])
  1413. +
  1414. (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
  1415. }}
  1416. # Postgres is the default, except if not using `matrix_postgres` (internal postgres)
  1417. matrix_dimension_database_engine: "{{ 'postgres' if matrix_postgres_enabled else 'sqlite' }}"
  1418. matrix_dimension_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'dimension.db') | to_uuid }}"
  1419. ######################################################################
  1420. #
  1421. # /matrix-dimension
  1422. #
  1423. ######################################################################
  1424. ######################################################################
  1425. #
  1426. # matrix-etherpad
  1427. #
  1428. ######################################################################
  1429. matrix_etherpad_enabled: false
  1430. matrix_etherpad_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:9001' }}"
  1431. matrix_etherpad_base_url: "{{ 'https://'+ matrix_server_fqn_dimension + matrix_etherpad_public_endpoint if matrix_etherpad_mode == 'dimension' else 'https://' + matrix_server_fqn_etherpad + '/' }}"
  1432. matrix_etherpad_systemd_required_services_list: |
  1433. {{
  1434. ['docker.service']
  1435. +
  1436. (['matrix-postgres.service'] if matrix_postgres_enabled else [])
  1437. }}
  1438. matrix_etherpad_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'etherpad.db') | to_uuid }}"
  1439. ######################################################################
  1440. #
  1441. # /matrix-etherpad
  1442. #
  1443. ######################################################################
  1444. ######################################################################
  1445. #
  1446. # matrix-dynamic-dns
  1447. #
  1448. ######################################################################
  1449. matrix_dynamic_dns_enabled: false
  1450. ######################################################################
  1451. #
  1452. # /matrix-dynamic-dns
  1453. #
  1454. ######################################################################
  1455. ######################################################################
  1456. #
  1457. # matrix-email2matrix
  1458. #
  1459. ######################################################################
  1460. matrix_email2matrix_enabled: false
  1461. matrix_email2matrix_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm32', 'arm64'] }}"
  1462. ######################################################################
  1463. #
  1464. # /matrix-email2matrix
  1465. #
  1466. ######################################################################
  1467. ######################################################################
  1468. #
  1469. # matrix-jitsi
  1470. #
  1471. ######################################################################
  1472. matrix_jitsi_enabled: false
  1473. # Normally, matrix-nginx-proxy is enabled and nginx can reach jitsi/web over the container network.
  1474. # If matrix-nginx-proxy is not enabled, or you otherwise have a need for it, you can expose
  1475. # the Jitsi HTTP port to the local host.
  1476. matrix_jitsi_web_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:13080' }}"
  1477. matrix_jitsi_jvb_container_colibri_ws_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:13090' }}"
  1478. matrix_jitsi_prosody_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:5280' }}"
  1479. matrix_jitsi_jibri_xmpp_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'jibri') | to_uuid }}"
  1480. matrix_jitsi_jicofo_auth_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'jicofo') | to_uuid }}"
  1481. matrix_jitsi_jvb_auth_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'jvb') | to_uuid }}"
  1482. matrix_jitsi_web_stun_servers: |
  1483. {{
  1484. [
  1485. 'stun:' + matrix_server_fqn_matrix + ':5349',
  1486. 'stun:' + matrix_server_fqn_matrix + ':3478',
  1487. ]
  1488. if matrix_coturn_enabled
  1489. else [ 'stun:meet-jit-si-turnrelay.jitsi.net:443']
  1490. }}
  1491. # If the self-hosted Etherpad instance is available, it will also show up in Jitsi conferences,
  1492. # unless explicitly disabled by setting `matrix_jitsi_etherpad_enabled` to false.
  1493. # Falls back to the scalar.vector.im etherpad in case someone sets `matrix_jitsi_etherpad_enabled` to true,
  1494. # while also setting `matrix_etherpad_enabled` to false.
  1495. matrix_jitsi_etherpad_enabled: "{{ matrix_etherpad_enabled }}"
  1496. matrix_jitsi_etherpad_base: "{{ matrix_etherpad_base_url if matrix_etherpad_enabled else 'https://scalar.vector.im/etherpad' }}"
  1497. ######################################################################
  1498. #
  1499. # /matrix-jitsi
  1500. #
  1501. ######################################################################
  1502. ######################################################################
  1503. #
  1504. # matrix-ldap-registration-proxy
  1505. #
  1506. ######################################################################
  1507. # This is only for users with a specific LDAP setup
  1508. matrix_ldap_registration_proxy_enabled: false
  1509. ######################################################################
  1510. #
  1511. # /matrix-ldap-registration-proxy
  1512. #
  1513. ######################################################################
  1514. ######################################################################
  1515. #
  1516. # matrix-mailer
  1517. #
  1518. ######################################################################
  1519. # By default, this playbook sets up an exim mailer server (running in a container).
  1520. # This is so that Synapse can send email reminders for unread messages.
  1521. # Other services (like ma1sd), also use the mailer.
  1522. matrix_mailer_enabled: true
  1523. matrix_mailer_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm32', 'arm64'] }}"
  1524. ######################################################################
  1525. #
  1526. # /matrix-mailer
  1527. #
  1528. ######################################################################
  1529. ######################################################################
  1530. #
  1531. # matrix-ma1sd
  1532. #
  1533. ######################################################################
  1534. # We no longer install the ma1sd identity server by default.
  1535. #
  1536. # The main reason we used to install ma1sd by default in the past was to
  1537. # prevent Element from talking to the `matrix.org` / `vector.im` identity servers,
  1538. # by forcing it to talk to our own self-hosted (but otherwise useless) identity server instead,
  1539. # thus preventing contact list leaks.
  1540. #
  1541. # Since Element no longer defaults to using a public identity server if another one is not provided,
  1542. # we can stop installing ma1sd.
  1543. matrix_ma1sd_enabled: false
  1544. matrix_ma1sd_container_image_self_build: "{{ matrix_architecture != 'amd64' }}"
  1545. # Normally, matrix-nginx-proxy is enabled and nginx can reach ma1sd over the container network.
  1546. # If matrix-nginx-proxy is not enabled, or you otherwise have a need for it, you can expose
  1547. # ma1sd's web-server port.
  1548. matrix_ma1sd_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:' + matrix_ma1sd_container_port | string }}"
  1549. # We enable Synapse integration via its Postgres database by default.
  1550. # When using another Identity store, you might wish to disable this and define
  1551. # your own configuration in `matrix_ma1sd_configuration_extension_yaml`.
  1552. matrix_ma1sd_synapsesql_enabled: true
  1553. matrix_ma1sd_synapsesql_type: postgresql
  1554. matrix_ma1sd_synapsesql_connection: //{{ matrix_synapse_database_host }}/{{ matrix_synapse_database_database }}?user={{ matrix_synapse_database_user | urlencode() }}&password={{ matrix_synapse_database_password | urlencode() }}
  1555. matrix_ma1sd_dns_overwrite_enabled: true
  1556. matrix_ma1sd_dns_overwrite_homeserver_client_name: "{{ matrix_server_fqn_matrix }}"
  1557. # The `matrix_ma1sd_dns_overwrite_homeserver_client_value` value when matrix_nginx_proxy_enabled is false covers the general case,
  1558. # but may be inaccurate if matrix-corporal is enabled.
  1559. matrix_ma1sd_dns_overwrite_homeserver_client_value: "{{ ('http://' + matrix_nginx_proxy_proxy_matrix_client_api_addr_with_container) if matrix_nginx_proxy_enabled else matrix_homeserver_container_url }}"
  1560. # By default, we send mail through the `matrix-mailer` service.
  1561. matrix_ma1sd_threepid_medium_email_identity_from: "{{ matrix_mailer_sender_address }}"
  1562. matrix_ma1sd_threepid_medium_email_connectors_smtp_host: "matrix-mailer"
  1563. matrix_ma1sd_threepid_medium_email_connectors_smtp_port: 8025
  1564. matrix_ma1sd_threepid_medium_email_connectors_smtp_tls: 0
  1565. matrix_ma1sd_self_check_validate_certificates: "{{ false if matrix_ssl_retrieval_method == 'self-signed' else true }}"
  1566. matrix_ma1sd_systemd_required_services_list: |
  1567. {{
  1568. (['matrix-postgres.service'] if matrix_postgres_enabled else [])
  1569. }}
  1570. matrix_ma1sd_systemd_wanted_services_list: |
  1571. {{
  1572. (['matrix-corporal.service'] if matrix_corporal_enabled else ['matrix-' + matrix_homeserver_implementation + '.service'])
  1573. +
  1574. (['matrix-postgres.service'] if matrix_postgres_enabled else [])
  1575. +
  1576. (['matrix-mailer.service'] if matrix_mailer_enabled else [])
  1577. }}
  1578. # Postgres is the default, except if not using `matrix_postgres` (internal postgres)
  1579. matrix_ma1sd_database_engine: "{{ 'postgres' if matrix_postgres_enabled else 'sqlite' }}"
  1580. matrix_ma1sd_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'ma1sd.db') | to_uuid }}"
  1581. ######################################################################
  1582. #
  1583. # /matrix-ma1sd
  1584. #
  1585. ######################################################################
  1586. ######################################################################
  1587. #
  1588. # matrix-nginx-proxy
  1589. #
  1590. ######################################################################
  1591. # By default, this playbook sets up a reverse-proxy nginx proxy server on TCP ports 80, 443 and 8448.
  1592. # This is fine if you're dedicating the whole server to Matrix.
  1593. # If that's not the case, you may wish to disable this and take care of proxying yourself.
  1594. matrix_nginx_proxy_enabled: true
  1595. matrix_nginx_proxy_proxy_matrix_client_api_addr_with_container: "{{ 'matrix-corporal:41080' if matrix_corporal_enabled else 'matrix-nginx-proxy:12080' }}"
  1596. 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' }}"
  1597. matrix_nginx_proxy_proxy_matrix_client_api_client_max_body_size_mb: |-
  1598. {{
  1599. {
  1600. 'synapse': matrix_synapse_max_upload_size_mb,
  1601. 'dendrite': (matrix_dendrite_max_file_size_bytes / 1024 / 1024) | round,
  1602. 'conduit': (matrix_conduit_max_request_size / 1024 / 1024) | round,
  1603. }[matrix_homeserver_implementation]|int
  1604. }}
  1605. matrix_nginx_proxy_proxy_matrix_client_api_forwarded_location_synapse_admin_api_enabled: "{{ matrix_synapse_admin_enabled or matrix_bot_matrix_registration_bot_enabled }}"
  1606. matrix_nginx_proxy_proxy_matrix_client_redirect_root_uri_to_domain: "{{ matrix_server_fqn_element if matrix_client_element_enabled else '' }}"
  1607. matrix_nginx_proxy_proxy_matrix_enabled: true
  1608. matrix_nginx_proxy_proxy_element_enabled: "{{ matrix_client_element_enabled }}"
  1609. matrix_nginx_proxy_proxy_hydrogen_enabled: "{{ matrix_client_hydrogen_enabled }}"
  1610. matrix_nginx_proxy_proxy_cinny_enabled: "{{ matrix_client_cinny_enabled }}"
  1611. matrix_nginx_proxy_proxy_buscarron_enabled: "{{ matrix_bot_buscarron_enabled }}"
  1612. matrix_nginx_proxy_proxy_dimension_enabled: "{{ matrix_dimension_enabled }}"
  1613. matrix_nginx_proxy_proxy_etherpad_enabled: "{{ matrix_etherpad_enabled and matrix_etherpad_mode == 'standalone' }}"
  1614. matrix_nginx_proxy_proxy_bot_go_neb_enabled: "{{ matrix_bot_go_neb_enabled }}"
  1615. matrix_nginx_proxy_proxy_jitsi_enabled: "{{ matrix_jitsi_enabled }}"
  1616. matrix_nginx_proxy_proxy_grafana_enabled: "{{ matrix_grafana_enabled }}"
  1617. matrix_nginx_proxy_proxy_sygnal_enabled: "{{ matrix_sygnal_enabled }}"
  1618. matrix_nginx_proxy_proxy_ntfy_enabled: "{{ matrix_ntfy_enabled }}"
  1619. matrix_nginx_proxy_proxy_matrix_corporal_api_enabled: "{{ matrix_corporal_enabled and matrix_corporal_http_api_enabled }}"
  1620. matrix_nginx_proxy_proxy_matrix_corporal_api_addr_with_container: "matrix-corporal:41081"
  1621. matrix_nginx_proxy_proxy_matrix_corporal_api_addr_sans_container: "127.0.0.1:41081"
  1622. matrix_nginx_proxy_proxy_matrix_identity_api_enabled: "{{ matrix_ma1sd_enabled }}"
  1623. matrix_nginx_proxy_proxy_matrix_identity_api_addr_with_container: "matrix-ma1sd:{{ matrix_ma1sd_container_port }}"
  1624. matrix_nginx_proxy_proxy_matrix_identity_api_addr_sans_container: "127.0.0.1:{{ matrix_ma1sd_container_port }}"
  1625. # By default, we do TLS termination for the Matrix Federation API (port 8448) at matrix-nginx-proxy.
  1626. # Unless this is handled there OR Synapse's federation listener port is disabled, we'll reverse-proxy.
  1627. matrix_nginx_proxy_proxy_matrix_federation_api_enabled: |-
  1628. {{
  1629. {
  1630. 'synapse': (matrix_synapse_federation_port_enabled and not matrix_synapse_tls_federation_listener_enabled),
  1631. 'dendrite': matrix_dendrite_federation_enabled,
  1632. 'conduit': matrix_conduit_allow_federation,
  1633. }[matrix_homeserver_implementation]|bool
  1634. }}
  1635. matrix_nginx_proxy_proxy_matrix_federation_api_addr_with_container: "matrix-nginx-proxy:12088"
  1636. matrix_nginx_proxy_proxy_matrix_federation_api_addr_sans_container: "127.0.0.1:12088"
  1637. matrix_nginx_proxy_proxy_synapse_enabled: "{{ matrix_synapse_enabled }}"
  1638. 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' }}"
  1639. matrix_nginx_proxy_proxy_synapse_client_api_addr_sans_container: "127.0.0.1:8008"
  1640. 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' }}"
  1641. matrix_nginx_proxy_proxy_synapse_federation_api_addr_sans_container: "127.0.0.1:8048"
  1642. matrix_nginx_proxy_proxy_dendrite_enabled: "{{ matrix_dendrite_enabled }}"
  1643. matrix_nginx_proxy_proxy_dendrite_client_api_addr_with_container: "matrix-dendrite:{{ matrix_dendrite_http_bind_port | string }}"
  1644. matrix_nginx_proxy_proxy_dendrite_client_api_addr_sans_container: "127.0.0.1:{{ matrix_dendrite_http_bind_port | string }}"
  1645. matrix_nginx_proxy_proxy_dendrite_federation_api_addr_with_container: "matrix-dendrite:{{ matrix_dendrite_http_bind_port | string }}"
  1646. matrix_nginx_proxy_proxy_dendrite_federation_api_addr_sans_container: "127.0.0.1:{{ matrix_dendrite_http_bind_port | string }}"
  1647. matrix_nginx_proxy_proxy_conduit_enabled: "{{ matrix_conduit_enabled }}"
  1648. matrix_nginx_proxy_proxy_conduit_client_api_addr_with_container: "matrix-conduit:{{ matrix_conduit_port_number|string }}"
  1649. matrix_nginx_proxy_proxy_conduit_client_api_addr_sans_container: "127.0.0.1:{{ matrix_conduit_port_number|string }}"
  1650. matrix_nginx_proxy_proxy_conduit_federation_api_addr_with_container: "matrix-conduit:{{ matrix_conduit_port_number|string }}"
  1651. matrix_nginx_proxy_proxy_conduit_federation_api_addr_sans_container: "127.0.0.1:{{ matrix_conduit_port_number|string }}"
  1652. # When matrix-nginx-proxy is disabled, the actual port number that the vhost uses may begin to matter.
  1653. matrix_nginx_proxy_proxy_matrix_federation_port: "{{ matrix_federation_public_port }}"
  1654. matrix_nginx_proxy_container_federation_host_bind_port: "{{ matrix_federation_public_port }}"
  1655. matrix_nginx_proxy_proxy_matrix_user_directory_search_enabled: "{{ matrix_ma1sd_enabled }}"
  1656. matrix_nginx_proxy_proxy_matrix_user_directory_search_addr_with_container: "{{ matrix_nginx_proxy_proxy_matrix_identity_api_addr_with_container }}"
  1657. matrix_nginx_proxy_proxy_matrix_user_directory_search_addr_sans_container: "{{ matrix_nginx_proxy_proxy_matrix_identity_api_addr_sans_container }}"
  1658. matrix_nginx_proxy_self_check_validate_certificates: "{{ false if matrix_ssl_retrieval_method == 'self-signed' else true }}"
  1659. # OCSP stapling does not make sense when self-signed certificates are used.
  1660. # See https://github.com/spantaleev/matrix-docker-ansible-deploy/issues/1073
  1661. # and https://github.com/spantaleev/matrix-docker-ansible-deploy/pull/1074
  1662. matrix_nginx_proxy_ocsp_stapling_enabled: "{{ matrix_ssl_retrieval_method != 'self-signed' }}"
  1663. matrix_nginx_proxy_systemd_wanted_services_list: |
  1664. {{
  1665. ['matrix-' + matrix_homeserver_implementation + '.service']
  1666. +
  1667. (matrix_synapse_webserving_workers_systemd_services_list if matrix_homeserver_implementation == 'synapse' and matrix_synapse_workers_enabled else [])
  1668. +
  1669. (['matrix-synapse-reverse-proxy-companion.service'] if matrix_synapse_reverse_proxy_companion_enabled else [])
  1670. +
  1671. (['matrix-corporal.service'] if matrix_corporal_enabled else [])
  1672. +
  1673. (['matrix-ma1sd.service'] if matrix_ma1sd_enabled else [])
  1674. +
  1675. (['matrix-client-cinny.service'] if matrix_client_cinny_enabled else [])
  1676. +
  1677. (['matrix-bot-buscarron.service'] if matrix_bot_buscarron_enabled else [])
  1678. +
  1679. (['matrix-client-element.service'] if matrix_client_element_enabled else [])
  1680. +
  1681. (['matrix-client-hydrogen.service'] if matrix_client_hydrogen_enabled else [])
  1682. +
  1683. (['matrix-grafana.service'] if matrix_grafana_enabled else [])
  1684. +
  1685. (['matrix-dimension.service'] if matrix_dimension_enabled else [])
  1686. +
  1687. (['matrix-sygnal.service'] if matrix_sygnal_enabled else [])
  1688. +
  1689. (['matrix-ntfy.service'] if matrix_ntfy_enabled else [])
  1690. +
  1691. (['matrix-jitsi.service'] if matrix_jitsi_enabled else [])
  1692. +
  1693. (['matrix-bot-go-neb.service'] if matrix_bot_go_neb_enabled else [])
  1694. +
  1695. (['matrix-etherpad.service'] if matrix_etherpad_enabled else [])
  1696. +
  1697. (['matrix-hookshot.service'] if matrix_hookshot_enabled else [])
  1698. }}
  1699. matrix_ssl_domains_to_obtain_certificates_for: |
  1700. {{
  1701. ([matrix_server_fqn_matrix])
  1702. +
  1703. ([matrix_server_fqn_element] if matrix_client_element_enabled else [])
  1704. +
  1705. ([matrix_nginx_proxy_proxy_riot_compat_redirect_hostname] if matrix_nginx_proxy_proxy_riot_compat_redirect_enabled else [])
  1706. +
  1707. ([matrix_server_fqn_hydrogen] if matrix_client_hydrogen_enabled else [])
  1708. +
  1709. ([matrix_server_fqn_cinny] if matrix_client_cinny_enabled else [])
  1710. +
  1711. ([matrix_server_fqn_buscarron] if matrix_bot_buscarron_enabled else [])
  1712. +
  1713. ([matrix_server_fqn_dimension] if matrix_dimension_enabled else [])
  1714. +
  1715. ([matrix_server_fqn_etherpad] if (matrix_etherpad_enabled and matrix_etherpad_mode == 'standalone') else [])
  1716. +
  1717. ([matrix_server_fqn_bot_go_neb] if matrix_bot_go_neb_enabled else [])
  1718. +
  1719. ([matrix_server_fqn_jitsi] if matrix_jitsi_enabled else [])
  1720. +
  1721. ([matrix_server_fqn_grafana] if matrix_grafana_enabled else [])
  1722. +
  1723. ([matrix_server_fqn_sygnal] if matrix_sygnal_enabled else [])
  1724. +
  1725. ([matrix_server_fqn_ntfy] if matrix_ntfy_enabled else [])
  1726. +
  1727. ([matrix_bot_postmoogle_domain] if matrix_bot_postmoogle_enabled else [])
  1728. +
  1729. ([matrix_domain] if matrix_nginx_proxy_base_domain_serving_enabled else [])
  1730. +
  1731. matrix_ssl_additional_domains_to_obtain_certificates_for
  1732. }}
  1733. matrix_ssl_architecture: "{{
  1734. {
  1735. 'amd64': 'amd64',
  1736. 'arm32': 'arm32v6',
  1737. 'arm64': 'arm64v8',
  1738. }[matrix_architecture]
  1739. }}"
  1740. matrix_ssl_pre_obtaining_required_service_name: "{{ 'matrix-dynamic-dns' if matrix_dynamic_dns_enabled else '' }}"
  1741. ######################################################################
  1742. #
  1743. # /matrix-nginx-proxy
  1744. #
  1745. ######################################################################
  1746. ######################################################################
  1747. #
  1748. # matrix-postgres
  1749. #
  1750. ######################################################################
  1751. matrix_postgres_enabled: true
  1752. matrix_postgres_architecture: "{{ matrix_architecture }}"
  1753. # We unset this if internal Postgres disabled, which will cascade to some other variables
  1754. # and tell users they need to set it (either here or in those variables).
  1755. matrix_postgres_connection_hostname: "{{ 'matrix-postgres' if matrix_postgres_enabled else '' }}"
  1756. matrix_postgres_pgloader_container_image_self_build: "{{ matrix_architecture != 'amd64' }}"
  1757. matrix_postgres_additional_databases: |
  1758. {{
  1759. ([{
  1760. 'name': matrix_synapse_database_database,
  1761. 'username': matrix_synapse_database_user,
  1762. 'password': matrix_synapse_database_password,
  1763. }] if (matrix_synapse_enabled and matrix_synapse_database_database != matrix_postgres_db_name and matrix_synapse_database_host == 'matrix-postgres') else [])
  1764. +
  1765. ([{
  1766. 'name': matrix_dendrite_federationapi_database,
  1767. 'username': matrix_dendrite_database_user,
  1768. 'password': matrix_dendrite_database_password,
  1769. },{
  1770. 'name': matrix_dendrite_keyserver_database,
  1771. 'username': matrix_dendrite_database_user,
  1772. 'password': matrix_dendrite_database_password,
  1773. },{
  1774. 'name': matrix_dendrite_mediaapi_database,
  1775. 'username': matrix_dendrite_database_user,
  1776. 'password': matrix_dendrite_database_password,
  1777. },{
  1778. 'name': matrix_dendrite_room_database,
  1779. 'username': matrix_dendrite_database_user,
  1780. 'password': matrix_dendrite_database_password,
  1781. },{
  1782. 'name': matrix_dendrite_syncapi_database,
  1783. 'username': matrix_dendrite_database_user,
  1784. 'password': matrix_dendrite_database_password,
  1785. },{
  1786. 'name': matrix_dendrite_userapi_database,
  1787. 'username': matrix_dendrite_database_user,
  1788. 'password': matrix_dendrite_database_password,
  1789. },{
  1790. 'name': matrix_dendrite_pushserver_database,
  1791. 'username': matrix_dendrite_database_user,
  1792. 'password': matrix_dendrite_database_password,
  1793. },{
  1794. 'name': matrix_dendrite_mscs_database,
  1795. 'username': matrix_dendrite_database_user,
  1796. 'password': matrix_dendrite_database_password,
  1797. }] if (matrix_dendrite_enabled and matrix_dendrite_database_hostname == 'matrix-postgres') else [])
  1798. +
  1799. ([{
  1800. 'name': matrix_ma1sd_database_name,
  1801. 'username': matrix_ma1sd_database_username,
  1802. 'password': matrix_ma1sd_database_password,
  1803. }] if (matrix_ma1sd_enabled and matrix_ma1sd_database_engine == 'postgres' and matrix_ma1sd_database_hostname == 'matrix-postgres') else [])
  1804. +
  1805. ([{
  1806. 'name': matrix_bot_matrix_reminder_bot_database_name,
  1807. 'username': matrix_bot_matrix_reminder_bot_database_username,
  1808. 'password': matrix_bot_matrix_reminder_bot_database_password,
  1809. }] if (matrix_bot_matrix_reminder_bot_enabled and matrix_bot_matrix_reminder_bot_database_engine == 'postgres' and matrix_bot_matrix_reminder_bot_database_hostname == 'matrix-postgres') else [])
  1810. +
  1811. ([{
  1812. 'name': matrix_bot_honoroit_database_name,
  1813. 'username': matrix_bot_honoroit_database_username,
  1814. 'password': matrix_bot_honoroit_database_password,
  1815. }] if (matrix_bot_honoroit_enabled and matrix_bot_honoroit_database_engine == 'postgres' and matrix_bot_honoroit_database_hostname == 'matrix-postgres') else [])
  1816. +
  1817. ([{
  1818. 'name': matrix_bot_postmoogle_database_name,
  1819. 'username': matrix_bot_postmoogle_database_username,
  1820. 'password': matrix_bot_postmoogle_database_password,
  1821. }] if (matrix_bot_postmoogle_enabled and matrix_bot_postmoogle_database_engine == 'postgres' and matrix_bot_postmoogle_database_hostname == 'matrix-postgres') else [])
  1822. +
  1823. ([{
  1824. 'name': matrix_bot_maubot_database_name,
  1825. 'username': matrix_bot_maubot_database_username,
  1826. 'password': matrix_bot_maubot_database_password,
  1827. }] if (matrix_bot_maubot_enabled and matrix_bot_maubot_database_engine == 'postgres' and matrix_bot_maubot_database_hostname == 'matrix-postgres') else [])
  1828. +
  1829. ([{
  1830. 'name': matrix_bot_buscarron_database_name,
  1831. 'username': matrix_bot_buscarron_database_username,
  1832. 'password': matrix_bot_buscarron_database_password,
  1833. }] if (matrix_bot_buscarron_enabled and matrix_bot_buscarron_database_engine == 'postgres' and matrix_bot_buscarron_database_hostname == 'matrix-postgres') else [])
  1834. +
  1835. ([{
  1836. 'name': matrix_registration_database_name,
  1837. 'username': matrix_registration_database_username,
  1838. 'password': matrix_registration_database_password,
  1839. }] if (matrix_registration_enabled and matrix_registration_database_engine == 'postgres' and matrix_registration_database_hostname == 'matrix-postgres') else [])
  1840. +
  1841. ([{
  1842. 'name': matrix_appservice_discord_database_name,
  1843. 'username': matrix_appservice_discord_database_username,
  1844. 'password': matrix_appservice_discord_database_password,
  1845. }] if (matrix_appservice_discord_enabled and matrix_appservice_discord_database_engine == 'postgres' and matrix_appservice_discord_database_hostname == 'matrix-postgres') else [])
  1846. +
  1847. ([{
  1848. 'name': matrix_appservice_slack_database_name,
  1849. 'username': matrix_appservice_slack_database_username,
  1850. 'password': matrix_appservice_slack_database_password,
  1851. }] if (matrix_appservice_slack_enabled and matrix_appservice_slack_database_engine == 'postgres' and matrix_appservice_slack_database_hostname == 'matrix-postgres') else [])
  1852. +
  1853. ([{
  1854. 'name': matrix_appservice_irc_database_name,
  1855. 'username': matrix_appservice_irc_database_username,
  1856. 'password': matrix_appservice_irc_database_password,
  1857. }] if (matrix_appservice_irc_enabled and matrix_appservice_irc_database_engine == 'postgres' and matrix_appservice_irc_database_hostname == 'matrix-postgres') else [])
  1858. +
  1859. ([{
  1860. 'name': matrix_appservice_kakaotalk_database_name,
  1861. 'username': matrix_appservice_kakaotalk_database_username,
  1862. 'password': matrix_appservice_kakaotalk_database_password,
  1863. }] if (matrix_appservice_kakaotalk_enabled and matrix_appservice_kakaotalk_database_engine == 'postgres' and matrix_appservice_kakaotalk_database_hostname == 'matrix-postgres') else [])
  1864. +
  1865. ([{
  1866. 'name': matrix_beeper_linkedin_database_name,
  1867. 'username': matrix_beeper_linkedin_database_username,
  1868. 'password': matrix_beeper_linkedin_database_password,
  1869. }] if (matrix_beeper_linkedin_enabled and matrix_beeper_linkedin_database_engine == 'postgres' and matrix_beeper_linkedin_database_hostname == 'matrix-postgres') else [])
  1870. +
  1871. ([{
  1872. 'name': matrix_go_skype_bridge_database_name,
  1873. 'username': matrix_go_skype_bridge_database_username,
  1874. 'password': matrix_go_skype_bridge_database_password,
  1875. }] if (matrix_go_skype_bridge_enabled and matrix_go_skype_bridge_database_engine == 'postgres' and matrix_go_skype_bridge_database_hostname == 'matrix-postgres') else [])
  1876. +
  1877. ([{
  1878. 'name': matrix_mautrix_facebook_database_name,
  1879. 'username': matrix_mautrix_facebook_database_username,
  1880. 'password': matrix_mautrix_facebook_database_password,
  1881. }] if (matrix_mautrix_facebook_enabled and matrix_mautrix_facebook_database_engine == 'postgres' and matrix_mautrix_facebook_database_hostname == 'matrix-postgres') else [])
  1882. +
  1883. ([{
  1884. 'name': matrix_mautrix_hangouts_database_name,
  1885. 'username': matrix_mautrix_hangouts_database_username,
  1886. 'password': matrix_mautrix_hangouts_database_password,
  1887. }] if (matrix_mautrix_hangouts_enabled and matrix_mautrix_hangouts_database_engine == 'postgres' and matrix_mautrix_hangouts_database_hostname == 'matrix-postgres') else [])
  1888. +
  1889. ([{
  1890. 'name': matrix_mautrix_googlechat_database_name,
  1891. 'username': matrix_mautrix_googlechat_database_username,
  1892. 'password': matrix_mautrix_googlechat_database_password,
  1893. }] if (matrix_mautrix_googlechat_enabled and matrix_mautrix_googlechat_database_engine == 'postgres' and matrix_mautrix_googlechat_database_hostname == 'matrix-postgres') else [])
  1894. +
  1895. ([{
  1896. 'name': matrix_mautrix_instagram_database_name,
  1897. 'username': matrix_mautrix_instagram_database_username,
  1898. 'password': matrix_mautrix_instagram_database_password,
  1899. }] if (matrix_mautrix_instagram_enabled and matrix_mautrix_instagram_database_engine == 'postgres' and matrix_mautrix_instagram_database_hostname == 'matrix-postgres') else [])
  1900. +
  1901. ([{
  1902. 'name': matrix_mautrix_signal_database_name,
  1903. 'username': matrix_mautrix_signal_database_username,
  1904. 'password': matrix_mautrix_signal_database_password,
  1905. }] if (matrix_mautrix_signal_enabled and matrix_mautrix_signal_database_engine == 'postgres' and matrix_mautrix_signal_database_hostname == 'matrix-postgres') else [])
  1906. +
  1907. ([{
  1908. 'name': matrix_mautrix_telegram_database_name,
  1909. 'username': matrix_mautrix_telegram_database_username,
  1910. 'password': matrix_mautrix_telegram_database_password,
  1911. }] if (matrix_mautrix_telegram_enabled and matrix_mautrix_telegram_database_engine == 'postgres' and matrix_mautrix_telegram_database_hostname == 'matrix-postgres') else [])
  1912. +
  1913. ([{
  1914. 'name': matrix_mautrix_twitter_database_name,
  1915. 'username': matrix_mautrix_twitter_database_username,
  1916. 'password': matrix_mautrix_twitter_database_password,
  1917. }] if (matrix_mautrix_twitter_enabled and matrix_mautrix_twitter_database_engine == 'postgres' and matrix_mautrix_twitter_database_hostname == 'matrix-postgres') else [])
  1918. +
  1919. ([{
  1920. 'name': matrix_mautrix_whatsapp_database_name,
  1921. 'username': matrix_mautrix_whatsapp_database_username,
  1922. 'password': matrix_mautrix_whatsapp_database_password,
  1923. }] if (matrix_mautrix_whatsapp_enabled and matrix_mautrix_whatsapp_database_engine == 'postgres' and matrix_mautrix_whatsapp_database_hostname == 'matrix-postgres') else [])
  1924. +
  1925. ([{
  1926. 'name': matrix_mautrix_discord_database_name,
  1927. 'username': matrix_mautrix_discord_database_username,
  1928. 'password': matrix_mautrix_discord_database_password,
  1929. }] if (matrix_mautrix_discord_enabled and matrix_mautrix_discord_database_engine == 'postgres' and matrix_mautrix_discord_database_hostname == 'matrix-postgres') else [])
  1930. +
  1931. ([{
  1932. 'name': matrix_mx_puppet_slack_database_name,
  1933. 'username': matrix_mx_puppet_slack_database_username,
  1934. 'password': matrix_mx_puppet_slack_database_password,
  1935. }] if (matrix_mx_puppet_slack_enabled and matrix_mx_puppet_slack_database_engine == 'postgres' and matrix_mx_puppet_slack_database_hostname == 'matrix-postgres') else [])
  1936. +
  1937. ([{
  1938. 'name': matrix_mx_puppet_twitter_database_name,
  1939. 'username': matrix_mx_puppet_twitter_database_username,
  1940. 'password': matrix_mx_puppet_twitter_database_password,
  1941. }] if (matrix_mx_puppet_twitter_enabled and matrix_mx_puppet_twitter_database_engine == 'postgres' and matrix_mx_puppet_twitter_database_hostname == 'matrix-postgres') else [])
  1942. +
  1943. ([{
  1944. 'name': matrix_mx_puppet_instagram_database_name,
  1945. 'username': matrix_mx_puppet_instagram_database_username,
  1946. 'password': matrix_mx_puppet_instagram_database_password,
  1947. }] if (matrix_mx_puppet_instagram_enabled and matrix_mx_puppet_instagram_database_engine == 'postgres' and matrix_mx_puppet_instagram_database_hostname == 'matrix-postgres') else [])
  1948. +
  1949. ([{
  1950. 'name': matrix_mx_puppet_discord_database_name,
  1951. 'username': matrix_mx_puppet_discord_database_username,
  1952. 'password': matrix_mx_puppet_discord_database_password,
  1953. }] if (matrix_mx_puppet_discord_enabled and matrix_mx_puppet_discord_database_engine == 'postgres' and matrix_mx_puppet_discord_database_hostname == 'matrix-postgres') else [])
  1954. +
  1955. ([{
  1956. 'name': matrix_mx_puppet_steam_database_name,
  1957. 'username': matrix_mx_puppet_steam_database_username,
  1958. 'password': matrix_mx_puppet_steam_database_password,
  1959. }] if (matrix_mx_puppet_steam_enabled and matrix_mx_puppet_steam_database_engine == 'postgres' and matrix_mx_puppet_steam_database_hostname == 'matrix-postgres') else [])
  1960. +
  1961. ([{
  1962. 'name': matrix_mx_puppet_groupme_database_name,
  1963. 'username': matrix_mx_puppet_groupme_database_username,
  1964. 'password': matrix_mx_puppet_groupme_database_password,
  1965. }] if (matrix_mx_puppet_groupme_enabled and matrix_mx_puppet_groupme_database_engine == 'postgres' and matrix_mx_puppet_groupme_database_hostname == 'matrix-postgres') else [])
  1966. +
  1967. ([{
  1968. 'name': matrix_dimension_database_name,
  1969. 'username': matrix_dimension_database_username,
  1970. 'password': matrix_dimension_database_password,
  1971. }] if (matrix_dimension_enabled and matrix_dimension_database_engine == 'postgres' and matrix_dimension_database_hostname == 'matrix-postgres') else [])
  1972. +
  1973. ([{
  1974. 'name': matrix_etherpad_database_name,
  1975. 'username': matrix_etherpad_database_username,
  1976. 'password': matrix_etherpad_database_password,
  1977. }] if (matrix_etherpad_enabled and matrix_etherpad_database_engine == 'postgres' and matrix_etherpad_database_hostname == 'matrix-postgres') else [])
  1978. +
  1979. ([{
  1980. 'name': matrix_prometheus_postgres_exporter_database_name,
  1981. 'username': matrix_prometheus_postgres_exporter_database_username,
  1982. 'password': matrix_prometheus_postgres_exporter_database_password,
  1983. }] if (matrix_prometheus_postgres_exporter_enabled and matrix_prometheus_postgres_exporter_database_hostname == 'matrix-postgres') else [])
  1984. }}
  1985. matrix_postgres_systemd_services_to_stop_for_maintenance_list: |
  1986. {{
  1987. ['matrix-' + matrix_homeserver_implementation + '.service']
  1988. }}
  1989. ######################################################################
  1990. #
  1991. # /matrix-postgres
  1992. #
  1993. ######################################################################
  1994. ######################################################################
  1995. #
  1996. # matrix-sygnal
  1997. #
  1998. ######################################################################
  1999. # Most people don't need their own push-server, because they also need their own app to utilize it from.
  2000. matrix_sygnal_enabled: false
  2001. # If someone instals Prometheus via the playbook, they most likely wish to monitor Sygnal.
  2002. matrix_sygnal_metrics_prometheus_enabled: "{{ matrix_prometheus_enabled }}"
  2003. matrix_sygnal_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:6000' }}"
  2004. ######################################################################
  2005. #
  2006. # /matrix-sygnal
  2007. #
  2008. ######################################################################
  2009. ######################################################################
  2010. #
  2011. # matrix-ntfy
  2012. #
  2013. ######################################################################
  2014. matrix_ntfy_enabled: false
  2015. matrix_ntfy_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:2586' }}"
  2016. ######################################################################
  2017. #
  2018. # /matrix-ntfy
  2019. #
  2020. ######################################################################
  2021. ######################################################################
  2022. #
  2023. # matrix-redis
  2024. #
  2025. ######################################################################
  2026. matrix_redis_enabled: "{{ matrix_synapse_workers_enabled }}"
  2027. ######################################################################
  2028. #
  2029. # /matrix-redis
  2030. #
  2031. ######################################################################
  2032. ######################################################################
  2033. #
  2034. # matrix-client-element
  2035. #
  2036. ######################################################################
  2037. # By default, this playbook installs the Element web UI on the `matrix_server_fqn_element` domain.
  2038. # If you wish to connect to your Matrix server by other means, you may wish to disable this.
  2039. matrix_client_element_enabled: true
  2040. matrix_client_element_container_image_self_build: "{{ matrix_architecture not in ['arm64', 'amd64'] }}"
  2041. # Normally, matrix-nginx-proxy is enabled and nginx can reach Element over the container network.
  2042. # If matrix-nginx-proxy is not enabled, or you otherwise have a need for it, you can expose
  2043. # the Element HTTP port to the local host.
  2044. matrix_client_element_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:8765' }}"
  2045. matrix_client_element_default_hs_url: "{{ matrix_homeserver_url }}"
  2046. matrix_client_element_default_is_url: "{{ matrix_identity_server_url }}"
  2047. # Use Dimension if enabled, otherwise fall back to Scalar
  2048. matrix_client_element_integrations_ui_url: "{{ matrix_dimension_integrations_ui_url if matrix_dimension_enabled else 'https://scalar.vector.im/' }}"
  2049. matrix_client_element_integrations_rest_url: "{{ matrix_dimension_integrations_rest_url if matrix_dimension_enabled else 'https://scalar.vector.im/api' }}"
  2050. matrix_client_element_integrations_widgets_urls: "{{ matrix_dimension_integrations_widgets_urls if matrix_dimension_enabled else ['https://scalar.vector.im/api'] }}"
  2051. 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' }}"
  2052. matrix_client_element_self_check_validate_certificates: "{{ false if matrix_ssl_retrieval_method == 'self-signed' else true }}"
  2053. matrix_client_element_registration_enabled: "{{ matrix_synapse_enable_registration }}"
  2054. matrix_client_element_enable_presence_by_hs_url: |
  2055. {{
  2056. none
  2057. if matrix_synapse_presence_enabled
  2058. else {matrix_client_element_default_hs_url: false}
  2059. }}
  2060. matrix_client_element_welcome_user_id: ~
  2061. matrix_client_element_jitsi_preferredDomain: "{{ matrix_server_fqn_jitsi if matrix_jitsi_enabled else '' }}"
  2062. ######################################################################
  2063. #
  2064. # /matrix-client-element
  2065. #
  2066. ######################################################################
  2067. ######################################################################
  2068. #
  2069. # matrix-client-hydrogen
  2070. #
  2071. ######################################################################
  2072. matrix_client_hydrogen_enabled: false
  2073. # Normally, matrix-nginx-proxy is enabled and nginx can reach Hydrogen over the container network.
  2074. # If matrix-nginx-proxy is not enabled, or you otherwise have a need for it, you can expose
  2075. # the HTTP port to the local host.
  2076. matrix_client_hydrogen_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:8768' }}"
  2077. matrix_client_hydrogen_default_hs_url: "{{ matrix_homeserver_url }}"
  2078. matrix_client_hydrogen_self_check_validate_certificates: "{{ false if matrix_ssl_retrieval_method == 'self-signed' else true }}"
  2079. ######################################################################
  2080. #
  2081. # /matrix-client-hydrogen
  2082. #
  2083. ######################################################################
  2084. ######################################################################
  2085. #
  2086. # matrix-client-cinny
  2087. #
  2088. ######################################################################
  2089. matrix_client_cinny_enabled: false
  2090. matrix_client_cinny_container_image_self_build: "{{ matrix_architecture not in ['arm64', 'amd64'] }}"
  2091. # Normally, matrix-nginx-proxy is enabled and nginx can reach Cinny over the container network.
  2092. # If matrix-nginx-proxy is not enabled, or you otherwise have a need for it, you can expose
  2093. # the HTTP port to the local host.
  2094. matrix_client_cinny_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:8080' }}"
  2095. matrix_client_cinny_default_hs_url: "{{ matrix_homeserver_url }}"
  2096. matrix_client_cinny_self_check_validate_certificates: "{{ false if matrix_ssl_retrieval_method == 'self-signed' else true }}"
  2097. ######################################################################
  2098. #
  2099. # /matrix-client-cinny
  2100. #
  2101. ######################################################################
  2102. ######################################################################
  2103. #
  2104. # matrix-synapse
  2105. #
  2106. ######################################################################
  2107. matrix_synapse_enabled: "{{ matrix_homeserver_implementation == 'synapse' }}"
  2108. matrix_synapse_container_image_self_build: "{{ matrix_architecture not in ['arm64', 'amd64'] }}"
  2109. # When ma1sd is enabled, we can use it to validate phone numbers. It's something that the homeserver cannot do by itself.
  2110. matrix_synapse_account_threepid_delegates_msisdn: "{{ 'http://matrix-ma1sd:' + matrix_ma1sd_container_port | string if matrix_ma1sd_enabled else '' }}"
  2111. # For exposing the Matrix Federation API's TLS port (HTTPS) to the internet on all network interfaces.
  2112. 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 '' }}"
  2113. #
  2114. # For exposing the Synapse Metrics API's port (plain HTTP) to the local host.
  2115. matrix_synapse_container_metrics_api_host_bind_port: "{{ '127.0.0.1:9100' if (matrix_synapse_metrics_enabled and not matrix_nginx_proxy_enabled) else '' }}"
  2116. #
  2117. # For exposing the Synapse Manhole port (plain HTTP) to the local host.
  2118. matrix_synapse_container_manhole_api_host_bind_port: "{{ '127.0.0.1:9000' if matrix_synapse_manhole_enabled else '' }}"
  2119. #
  2120. # For exposing the Synapse worker (and metrics) ports to the local host.
  2121. matrix_synapse_workers_container_host_bind_address: "{{ '127.0.0.1' if (matrix_synapse_workers_enabled and not matrix_nginx_proxy_enabled) else '' }}"
  2122. matrix_synapse_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'synapse.db') | to_uuid }}"
  2123. matrix_synapse_macaroon_secret_key: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'synapse.mac') | to_uuid }}"
  2124. # We do not enable TLS in Synapse by default.
  2125. # TLS is handled by the matrix-nginx-proxy, which proxies the requests to Synapse.
  2126. matrix_synapse_tls_federation_listener_enabled: false
  2127. matrix_synapse_tls_certificate_path: ~
  2128. matrix_synapse_tls_private_key_path: ~
  2129. matrix_synapse_federation_port_openid_resource_required: "{{ not matrix_synapse_federation_enabled and (matrix_dimension_enabled or matrix_ma1sd_enabled) }}"
  2130. # If someone instals Prometheus via the playbook, they most likely wish to monitor Synapse.
  2131. matrix_synapse_metrics_enabled: "{{ matrix_prometheus_enabled }}"
  2132. matrix_synapse_email_enabled: "{{ matrix_mailer_enabled }}"
  2133. matrix_synapse_email_smtp_host: "matrix-mailer"
  2134. matrix_synapse_email_smtp_port: 8025
  2135. matrix_synapse_email_smtp_require_transport_security: false
  2136. matrix_synapse_email_notif_from: "Matrix <{{ matrix_mailer_sender_address }}>"
  2137. # Even if TURN doesn't support TLS (it does by default),
  2138. # it doesn't hurt to try a secure connection anyway.
  2139. #
  2140. # When Let's Encrypt certificates are used (the default case),
  2141. # we don't enable `turns` endpoints, because WebRTC in Element can't talk to them.
  2142. # Learn more here: https://github.com/spantaleev/matrix-docker-ansible-deploy/pull/1145
  2143. matrix_synapse_turn_uris: |
  2144. {{
  2145. []
  2146. +
  2147. [
  2148. 'turns:' + matrix_server_fqn_matrix + '?transport=udp',
  2149. 'turns:' + matrix_server_fqn_matrix + '?transport=tcp',
  2150. ] if matrix_coturn_enabled and matrix_coturn_tls_enabled and matrix_ssl_retrieval_method != 'lets-encrypt' else []
  2151. +
  2152. [
  2153. 'turn:' + matrix_server_fqn_matrix + '?transport=udp',
  2154. 'turn:' + matrix_server_fqn_matrix + '?transport=tcp',
  2155. ] if matrix_coturn_enabled else []
  2156. }}
  2157. matrix_synapse_turn_shared_secret: "{{ matrix_coturn_turn_static_auth_secret if matrix_coturn_enabled else '' }}"
  2158. matrix_synapse_self_check_validate_certificates: "{{ false if matrix_ssl_retrieval_method == 'self-signed' else true }}"
  2159. matrix_synapse_systemd_required_services_list: |
  2160. {{
  2161. (['docker.service'])
  2162. +
  2163. (['matrix-postgres.service'] if matrix_postgres_enabled else [])
  2164. +
  2165. (['matrix-goofys.service'] if matrix_s3_media_store_enabled else [])
  2166. }}
  2167. matrix_synapse_systemd_wanted_services_list: |
  2168. {{
  2169. (['matrix-coturn.service'] if matrix_coturn_enabled else [])
  2170. +
  2171. (['matrix-mailer.service'] if matrix_mailer_enabled else [])
  2172. }}
  2173. # Synapse workers (used for parallel load-scaling) need Redis for IPC.
  2174. matrix_synapse_redis_enabled: "{{ matrix_redis_enabled }}"
  2175. matrix_synapse_redis_host: "{{ 'matrix-redis' if matrix_redis_enabled else '' }}"
  2176. matrix_synapse_redis_password: "{{ matrix_redis_connection_password if matrix_redis_enabled else '' }}"
  2177. matrix_synapse_container_extra_arguments_auto: "{{ matrix_homeserver_container_extra_arguments_auto }}"
  2178. matrix_synapse_app_service_config_files_auto: "{{ matrix_homeserver_app_service_config_files_auto }}"
  2179. ######################################################################
  2180. #
  2181. # /matrix-synapse
  2182. #
  2183. ######################################################################
  2184. ######################################################################
  2185. #
  2186. # matrix-synapse-reverse-proxy-companion
  2187. #
  2188. ######################################################################
  2189. matrix_synapse_reverse_proxy_companion_enabled: "{{ matrix_synapse_enabled }}"
  2190. matrix_synapse_reverse_proxy_companion_client_api_client_max_body_size_mb: "{{ matrix_synapse_max_upload_size_mb }}"
  2191. matrix_synapse_reverse_proxy_companion_container_client_api_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:8008' }}"
  2192. matrix_synapse_reverse_proxy_companion_container_federation_api_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:8048' }}"
  2193. matrix_synapse_reverse_proxy_companion_synapse_workers_enabled: "{{ matrix_synapse_workers_enabled }}"
  2194. matrix_synapse_reverse_proxy_companion_synapse_workers_list: "{{ matrix_synapse_workers_enabled_list }}"
  2195. matrix_synapse_reverse_proxy_companion_synapse_generic_worker_client_server_locations: "{{ matrix_synapse_workers_generic_worker_client_server_endpoints }}"
  2196. matrix_synapse_reverse_proxy_companion_synapse_generic_worker_federation_locations: "{{ matrix_synapse_workers_generic_worker_federation_endpoints }}"
  2197. 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 }}"
  2198. 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 }}"
  2199. 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 }}"
  2200. 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 }}"
  2201. 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 }}"
  2202. matrix_synapse_reverse_proxy_companion_synapse_media_repository_locations: "{{matrix_synapse_workers_media_repository_endpoints|default([]) }}"
  2203. matrix_synapse_reverse_proxy_companion_synapse_user_dir_locations: "{{ matrix_synapse_workers_user_dir_worker_client_server_endpoints|default([]) }}"
  2204. ######################################################################
  2205. #
  2206. # /matrix-synapse-reverse-proxy-companion
  2207. #
  2208. ######################################################################
  2209. ######################################################################
  2210. #
  2211. # matrix-synapse-admin
  2212. #
  2213. ######################################################################
  2214. matrix_synapse_admin_enabled: false
  2215. # Normally, matrix-nginx-proxy is enabled and nginx can reach Synapse Admin over the container network.
  2216. # If matrix-nginx-proxy is not enabled, or you otherwise have a need for it, you can expose
  2217. # Synapse Admin's HTTP port to the local host.
  2218. matrix_synapse_admin_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:8766' }}"
  2219. matrix_synapse_admin_container_image_self_build: "{{ matrix_architecture not in ['arm64', 'amd64'] }}"
  2220. ######################################################################
  2221. #
  2222. # /matrix-synapse-admin
  2223. #
  2224. ######################################################################
  2225. ######################################################################
  2226. #
  2227. # matrix-prometheus-node-exporter
  2228. #
  2229. ######################################################################
  2230. matrix_prometheus_node_exporter_enabled: false
  2231. ######################################################################
  2232. #
  2233. # /matrix-prometheus-node-exporter
  2234. #
  2235. ######################################################################
  2236. ######################################################################
  2237. #
  2238. # matrix-prometheus
  2239. #
  2240. ######################################################################
  2241. matrix_prometheus_enabled: false
  2242. # Normally, matrix-nginx-proxy is enabled and nginx can reach Prometheus over the container network.
  2243. # If matrix-nginx-proxy is not enabled, or you otherwise have a need for it, you can expose
  2244. # Prometheus' HTTP port to the local host.
  2245. matrix_prometheus_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:9090' }}"
  2246. matrix_prometheus_scraper_synapse_enabled: "{{ matrix_synapse_enabled and matrix_synapse_metrics_enabled }}"
  2247. matrix_prometheus_scraper_synapse_targets: ['matrix-synapse:{{ matrix_synapse_metrics_port }}']
  2248. matrix_prometheus_scraper_synapse_workers_enabled_list: "{{ matrix_synapse_workers_enabled_list }}"
  2249. matrix_prometheus_scraper_synapse_rules_synapse_tag: "{{ matrix_synapse_docker_image_tag }}"
  2250. matrix_prometheus_scraper_node_enabled: "{{ matrix_prometheus_node_exporter_enabled }}"
  2251. matrix_prometheus_scraper_node_targets: "{{ ['matrix-prometheus-node-exporter:9100'] if matrix_prometheus_node_exporter_enabled else [] }}"
  2252. matrix_prometheus_scraper_postgres_enabled: "{{ matrix_prometheus_postgres_exporter_enabled }}"
  2253. matrix_prometheus_scraper_postgres_targets: "{{ ['matrix-prometheus-postgres-exporter:'+ matrix_prometheus_postgres_exporter_port | string] if matrix_prometheus_scraper_postgres_enabled else [] }}"
  2254. matrix_prometheus_scraper_hookshot_enabled: "{{ matrix_hookshot_metrics_enabled|default(false) }}"
  2255. matrix_prometheus_scraper_hookshot_targets: "{{ [matrix_hookshot_container_url | string +':'+ matrix_hookshot_metrics_port | string] if matrix_hookshot_metrics_enabled else [] }}"
  2256. ######################################################################
  2257. #
  2258. # /matrix-prometheus
  2259. #
  2260. ######################################################################
  2261. ######################################################################
  2262. #
  2263. # matrix-prometheus-postgres-exporter
  2264. #
  2265. ######################################################################
  2266. matrix_prometheus_postgres_exporter_enabled: false
  2267. matrix_prometheus_postgres_exporter_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'prometheus.pg.db') | to_uuid }}"
  2268. matrix_prometheus_postgres_exporter_systemd_required_services_list: |
  2269. {{
  2270. ['docker.service']
  2271. +
  2272. (['matrix-postgres.service'] if matrix_postgres_enabled else [])
  2273. }}
  2274. ######################################################################
  2275. #
  2276. # /matrix-prometheus-postgres-exporter
  2277. #
  2278. ######################################################################
  2279. ######################################################################
  2280. #
  2281. # matrix-grafana
  2282. #
  2283. ######################################################################
  2284. matrix_grafana_enabled: false
  2285. # Normally, matrix-nginx-proxy is enabled and nginx can reach Grafana over the container network.
  2286. # If matrix-nginx-proxy is not enabled, or you otherwise have a need for it, you can expose
  2287. # Grafana's HTTP port to the local host.
  2288. matrix_grafana_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:3000' }}"
  2289. matrix_grafana_dashboard_download_urls: |
  2290. {{
  2291. (matrix_synapse_grafana_dashboard_urls if matrix_homeserver_implementation == 'synapse' and matrix_synapse_metrics_enabled else [])
  2292. +
  2293. (matrix_prometheus_node_exporter_dashboard_urls if matrix_prometheus_node_exporter_enabled else [])
  2294. +
  2295. (matrix_prometheus_postgres_exporter_dashboard_urls if matrix_prometheus_postgres_exporter_enabled else [])
  2296. }}
  2297. matrix_grafana_default_home_dashboard_path: |-
  2298. {{
  2299. {
  2300. 'synapse': ('/etc/grafana/dashboards/synapse.json' if matrix_synapse_metrics_enabled else '/etc/grafana/dashboards/node-exporter-full.json'),
  2301. 'dendrite': '/etc/grafana/dashboards/node-exporter-full.json',
  2302. 'conduit': '/etc/grafana/dashboards/node-exporter-full.json',
  2303. }[matrix_homeserver_implementation]
  2304. }}
  2305. matrix_grafana_systemd_wanted_services_list: |
  2306. {{
  2307. []
  2308. +
  2309. (['matrix-prometheus-postgres-exporter.service'] if matrix_prometheus_postgres_exporter_enabled else [])
  2310. }}
  2311. ######################################################################
  2312. #
  2313. # /matrix-grafana
  2314. #
  2315. ######################################################################
  2316. ######################################################################
  2317. #
  2318. # matrix-registration
  2319. #
  2320. ######################################################################
  2321. matrix_registration_enabled: false
  2322. # Normally, matrix-nginx-proxy is enabled and nginx can reach matrix-registration over the container network.
  2323. # If matrix-nginx-proxy is not enabled, or you otherwise have a need for it, you can expose
  2324. # matrix-registration's HTTP port to the local host.
  2325. matrix_registration_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:8767' }}"
  2326. matrix_registration_riot_instance: "{{ ('https://' + matrix_server_fqn_element) if matrix_client_element_enabled else 'https://riot.im/app/' }}"
  2327. matrix_registration_shared_secret: |-
  2328. {{
  2329. {
  2330. 'synapse': matrix_synapse_registration_shared_secret,
  2331. 'dendrite': matrix_dendrite_registration_shared_secret,
  2332. 'conduit': '',
  2333. }[matrix_homeserver_implementation]
  2334. }}
  2335. matrix_registration_server_location: "{{ matrix_homeserver_container_url }}"
  2336. matrix_registration_api_validate_certs: "{{ false if matrix_ssl_retrieval_method == 'self-signed' else true }}"
  2337. matrix_registration_container_image_self_build: "{{ matrix_architecture != 'amd64' }}"
  2338. matrix_registration_systemd_required_services_list: |
  2339. {{
  2340. ['docker.service']
  2341. +
  2342. (['matrix-postgres.service'] if matrix_postgres_enabled else [])
  2343. }}
  2344. # Postgres is the default, except if not using `matrix_postgres` (internal postgres)
  2345. matrix_registration_database_engine: "{{ 'postgres' if matrix_postgres_enabled else 'sqlite' }}"
  2346. matrix_registration_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'mx.registr.db') | to_uuid }}"
  2347. ######################################################################
  2348. #
  2349. # /matrix-registration
  2350. #
  2351. ######################################################################
  2352. ######################################################################
  2353. #
  2354. # matrix-postgres-backup
  2355. #
  2356. ######################################################################
  2357. matrix_postgres_backup_connection_hostname: "{{ matrix_postgres_connection_hostname }}"
  2358. matrix_postgres_backup_connection_port: "{{ matrix_postgres_connection_port }}"
  2359. matrix_postgres_backup_connection_username: "{{ matrix_postgres_connection_username }}"
  2360. matrix_postgres_backup_connection_password: "{{ matrix_postgres_connection_password }}"
  2361. matrix_postgres_backup_postgres_data_path: "{{ matrix_postgres_data_path if matrix_postgres_enabled else '' }}"
  2362. # the default matrix synapse databse is not always part of the matrix_postgres_additional_databases variable thus we have to add it if the default database is used
  2363. matrix_postgres_backup_databases: |
  2364. {{
  2365. (([{
  2366. 'name': matrix_synapse_database_database
  2367. }] if (matrix_synapse_enabled and matrix_synapse_database_database == matrix_postgres_db_name and matrix_synapse_database_host == 'matrix-postgres') else [])
  2368. +
  2369. matrix_postgres_additional_databases)|map(attribute='name') | list
  2370. }}
  2371. ######################################################################
  2372. #
  2373. # /matrix-postgres-backup
  2374. #
  2375. ######################################################################
  2376. ######################################################################
  2377. #
  2378. # matrix-dendrite
  2379. #
  2380. ######################################################################
  2381. matrix_dendrite_enabled: "{{ matrix_homeserver_implementation == 'dendrite' }}"
  2382. # Normally, matrix-nginx-proxy is enabled and nginx can reach Dendrite over the container network.
  2383. # If matrix-nginx-proxy is not enabled, or you otherwise have a need for it,
  2384. # you can expose Dendrite's ports to the host.
  2385. #
  2386. # For exposing Dendrite's plain HTTP server to the local host.
  2387. matrix_dendrite_container_http_host_bind_address: "{{ '' if matrix_nginx_proxy_enabled else ('127.0.0.1:' + matrix_dendrite_http_bind_port | string) }}"
  2388. #
  2389. # For exposing Dendrite's HTTPS server to the local host.
  2390. matrix_dendrite_container_https_host_bind_address: "{{ '' if matrix_nginx_proxy_enabled or not matrix_dendrite_https_bind_port else ('127.0.0.1:' + matrix_dendrite_https_bind_port | string) }}"
  2391. matrix_dendrite_sync_api_real_ip_header: "{{ 'X-Forwarded-For' if matrix_nginx_proxy_enabled else '' }}"
  2392. matrix_dendrite_registration_shared_secret: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'dendrite.rss') | to_uuid }}"
  2393. matrix_dendrite_database_password: "{{ '%s' | format(matrix_homeserver_generic_secret_key) | password_hash('sha512', 'dendrite.db') | to_uuid }}"
  2394. # Even if TURN doesn't support TLS (it does by default),
  2395. # it doesn't hurt to try a secure connection anyway.
  2396. matrix_dendrite_turn_uris: |
  2397. {{
  2398. [
  2399. 'turns:' + matrix_server_fqn_matrix + '?transport=udp',
  2400. 'turns:' + matrix_server_fqn_matrix + '?transport=tcp',
  2401. 'turn:' + matrix_server_fqn_matrix + '?transport=udp',
  2402. 'turn:' + matrix_server_fqn_matrix + '?transport=tcp',
  2403. ]
  2404. if matrix_coturn_enabled
  2405. else []
  2406. }}
  2407. matrix_dendrite_turn_shared_secret: "{{ matrix_coturn_turn_static_auth_secret if matrix_coturn_enabled else '' }}"
  2408. matrix_dendrite_disable_tls_validation: "{{ true if matrix_ssl_retrieval_method == 'self-signed' else false }}"
  2409. matrix_dendrite_self_check_validate_certificates: "{{ false if matrix_ssl_retrieval_method == 'self-signed' else true }}"
  2410. matrix_dendrite_trusted_id_servers: "{{ [matrix_server_fqn_matrix] if matrix_ma1sd_enabled else ['matrix.org', 'vector.im'] }}"
  2411. matrix_dendrite_systemd_required_services_list: |
  2412. {{
  2413. (['docker.service'])
  2414. +
  2415. (['matrix-postgres.service'] if matrix_postgres_enabled else [])
  2416. +
  2417. (['matrix-goofys.service'] if matrix_s3_media_store_enabled else [])
  2418. }}
  2419. matrix_dendrite_systemd_wanted_services_list: |
  2420. {{
  2421. (['matrix-coturn.service'] if matrix_coturn_enabled else [])
  2422. }}
  2423. matrix_dendrite_container_extra_arguments_auto: "{{ matrix_homeserver_container_extra_arguments_auto }}"
  2424. matrix_dendrite_app_service_config_files_auto: "{{ matrix_homeserver_app_service_config_files_auto }}"
  2425. ######################################################################
  2426. #
  2427. # /matrix-dendrite
  2428. #
  2429. ######################################################################
  2430. ######################################################################
  2431. #
  2432. # matrix-conduit
  2433. #
  2434. ######################################################################
  2435. matrix_conduit_enabled: "{{ matrix_homeserver_implementation == 'conduit' }}"
  2436. matrix_conduit_systemd_required_services_list: |
  2437. {{
  2438. (['docker.service'])
  2439. }}
  2440. ######################################################################
  2441. #
  2442. # /matrix-conduit
  2443. #
  2444. ######################################################################
  2445. ######################################################################
  2446. #
  2447. # matrix-user-creator
  2448. #
  2449. ######################################################################
  2450. matrix_user_creator_users_auto: |
  2451. {{
  2452. ([{
  2453. 'username': matrix_bot_matrix_reminder_bot_matrix_user_id_localpart,
  2454. 'initial_password': matrix_bot_matrix_reminder_bot_matrix_user_password,
  2455. 'initial_type': 'bot',
  2456. }] if matrix_bot_matrix_reminder_bot_enabled else [])
  2457. +
  2458. ([{
  2459. 'username': matrix_bot_honoroit_login,
  2460. 'initial_password': matrix_bot_honoroit_password,
  2461. 'initial_type': 'bot',
  2462. }] if matrix_bot_honoroit_enabled else [])
  2463. +
  2464. ([{
  2465. 'username': matrix_bot_postmoogle_login,
  2466. 'initial_password': matrix_bot_postmoogle_password,
  2467. 'initial_type': 'bot',
  2468. }] if matrix_bot_postmoogle_enabled else [])
  2469. +
  2470. ([{
  2471. 'username': matrix_bot_buscarron_login,
  2472. 'initial_password': matrix_bot_buscarron_password,
  2473. 'initial_type': 'bot',
  2474. }] if matrix_bot_buscarron_enabled else [])
  2475. }}
  2476. ######################################################################
  2477. #
  2478. # /matrix-user-creator
  2479. #
  2480. ######################################################################