Matrix Docker Ansible eploy
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
 
 

2256 linhas
98 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. matrix_container_global_registry_prefix: "docker.io/"
  11. ######################################################################
  12. #
  13. # matrix-base
  14. #
  15. ######################################################################
  16. matrix_identity_server_url: "{{ ('https://' + matrix_server_fqn_matrix) if matrix_ma1sd_enabled else None }}"
  17. # If Synapse workers are enabled and matrix-nginx-proxy is disabled, certain APIs may not work over 'http://matrix-synapse:{{ matrix_synapse_container_client_api_port }}'.
  18. # This is because we explicitly disable them for the main Synapse process.
  19. matrix_homeserver_container_url: "{{ 'http://matrix-nginx-proxy:12080' if matrix_nginx_proxy_enabled else 'http://matrix-synapse:'+ matrix_synapse_container_client_api_port|string }}"
  20. ######################################################################
  21. #
  22. # /matrix-base
  23. #
  24. ######################################################################
  25. ######################################################################
  26. #
  27. # matrix-awx
  28. #
  29. ######################################################################
  30. # We don't enable AWX support by default.
  31. matrix_awx_enabled: false
  32. matrix_nginx_proxy_data_path: "{{ '/chroot/website' if (matrix_awx_enabled and not matrix_nginx_proxy_base_domain_homepage_enabled) else (matrix_nginx_proxy_base_path + '/data') }}"
  33. matrix_nginx_proxy_data_path_in_container: "{{ '/nginx-data/matrix-domain' if (matrix_awx_enabled and not matrix_nginx_proxy_base_domain_homepage_enabled) else '/nginx-data' }}"
  34. matrix_nginx_proxy_data_path_extension: "{{ '' if (matrix_awx_enabled and not matrix_nginx_proxy_base_domain_homepage_enabled) else '/matrix-domain' }}"
  35. matrix_nginx_proxy_base_domain_create_directory: "{{ not matrix_awx_enabled }}"
  36. ######################################################################
  37. #
  38. # /matrix-awx
  39. #
  40. ######################################################################
  41. ######################################################################
  42. #
  43. # matrix-bridge-appservice-discord
  44. #
  45. ######################################################################
  46. # We don't enable bridges by default.
  47. matrix_appservice_discord_enabled: false
  48. # Normally, matrix-nginx-proxy is enabled and nginx can reach matrix-appservice-discord over the container network.
  49. # If matrix-nginx-proxy is not enabled, or you otherwise have a need for it, you can expose
  50. # matrix-appservice-discord's client-server port to the local host.
  51. matrix_appservice_discord_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:9005' }}"
  52. # If the homeserver disables presence, it's likely better (less wasteful) to also disable presence on the bridge side.
  53. matrix_appservice_discord_bridge_disablePresence: "{{ not matrix_synapse_presence_enabled }}"
  54. matrix_appservice_discord_systemd_required_services_list: |
  55. {{
  56. ['docker.service']
  57. +
  58. (['matrix-synapse.service'] if matrix_synapse_enabled else [])
  59. +
  60. (['matrix-postgres.service'] if matrix_postgres_enabled else [])
  61. +
  62. (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
  63. }}
  64. matrix_appservice_discord_appservice_token: "{{ '%s' | format(matrix_synapse_macaroon_secret_key) | password_hash('sha512', 'discord.as.token') | to_uuid }}"
  65. matrix_appservice_discord_homeserver_token: "{{ '%s' | format(matrix_synapse_macaroon_secret_key) | password_hash('sha512', 'discord.hs.token') | to_uuid }}"
  66. # We only make this use Postgres if our own Postgres server is enabled.
  67. # It's only then (for now) that we can automatically create the necessary database and user for this service.
  68. matrix_appservice_discord_database_engine: "{{ 'postgres' if matrix_postgres_enabled else 'sqlite' }}"
  69. matrix_appservice_discord_database_password: "{{ '%s' | format(matrix_synapse_macaroon_secret_key) | password_hash('sha512', 'as.discord.db') | to_uuid }}"
  70. ######################################################################
  71. #
  72. # /matrix-bridge-appservice-discord
  73. #
  74. ######################################################################
  75. ######################################################################
  76. #
  77. # matrix-appservice-webhooks
  78. #
  79. ######################################################################
  80. # We don't enable bridges by default.
  81. matrix_appservice_webhooks_enabled: false
  82. matrix_appservice_webhooks_container_image_self_build: "{{ matrix_architecture != 'amd64' }}"
  83. # Normally, matrix-nginx-proxy is enabled and nginx can reach matrix-appservice-webhooks over the container network.
  84. # If matrix-nginx-proxy is not enabled, or you otherwise have a need for it, you can expose
  85. # matrix-appservice-webhooks' client-server port to the local host.
  86. matrix_appservice_webhooks_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else ('127.0.0.1:' ~ matrix_appservice_webhooks_matrix_port) }}"
  87. matrix_appservice_webhooks_appservice_token: "{{ '%s' | format(matrix_synapse_macaroon_secret_key) | password_hash('sha512', 'webhook.as.token') | to_uuid }}"
  88. matrix_appservice_webhooks_homeserver_url: "{{ matrix_homeserver_container_url }}"
  89. matrix_appservice_webhooks_homeserver_token: "{{ '%s' | format(matrix_synapse_macaroon_secret_key) | password_hash('sha512', 'webhook.hs.token') | to_uuid }}"
  90. matrix_appservice_webhooks_id_token: "{{ '%s' | format(matrix_synapse_macaroon_secret_key) | password_hash('sha512', 'webhook.id.token') | to_uuid }}"
  91. matrix_appservice_webhooks_systemd_required_services_list: |
  92. {{
  93. ['docker.service']
  94. +
  95. (['matrix-synapse.service'] if matrix_synapse_enabled else [])
  96. +
  97. (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
  98. }}
  99. ######################################################################
  100. #
  101. # /matrix-appservice-webhooks
  102. #
  103. ######################################################################
  104. ######################################################################
  105. #
  106. # matrix-appservice-slack
  107. #
  108. ######################################################################
  109. # We don't enable bridges by default.
  110. matrix_appservice_slack_enabled: false
  111. matrix_appservice_slack_container_image_self_build: "{{ matrix_architecture != 'amd64' }}"
  112. # Normally, matrix-nginx-proxy is enabled and nginx can reach matrix-appservice-slack over the container network.
  113. # If matrix-nginx-proxy is not enabled, or you otherwise have a need for it, you can expose
  114. # matrix-appservice-slack's client-server port to the local host.
  115. matrix_appservice_slack_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else ('127.0.0.1:' ~ matrix_appservice_slack_slack_port) }}"
  116. matrix_appservice_slack_appservice_token: "{{ '%s' | format(matrix_synapse_macaroon_secret_key) | password_hash('sha512', 'slack.as.token') | to_uuid }}"
  117. matrix_appservice_slack_homeserver_url: "{{ matrix_homeserver_container_url }}"
  118. matrix_appservice_slack_homeserver_token: "{{ '%s' | format(matrix_synapse_macaroon_secret_key) | password_hash('sha512', 'slack.hs.token') | to_uuid }}"
  119. matrix_appservice_slack_id_token: "{{ '%s' | format(matrix_synapse_macaroon_secret_key) | password_hash('sha512', 'slack.id.token') | to_uuid }}"
  120. matrix_appservice_slack_systemd_required_services_list: |
  121. {{
  122. ['docker.service']
  123. +
  124. (['matrix-synapse.service'] if matrix_synapse_enabled else [])
  125. +
  126. (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
  127. }}
  128. # Postgres is the default, except if not using `matrix_postgres` (internal postgres)
  129. matrix_appservice_slack_database_engine: "{{ 'postgres' if matrix_postgres_enabled else 'nedb' }}"
  130. matrix_appservice_slack_database_password: "{{ '%s' | format(matrix_synapse_macaroon_secret_key) | password_hash('sha512', 'as.slack.db') | to_uuid }}"
  131. ######################################################################
  132. #
  133. # /matrix-bridge-appservice-slack
  134. #
  135. ######################################################################
  136. ######################################################################
  137. #
  138. # matrix-bridge-appservice-irc
  139. #
  140. ######################################################################
  141. # We don't enable bridges by default.
  142. matrix_appservice_irc_enabled: false
  143. matrix_appservice_irc_container_image_self_build: "{{ matrix_architecture != 'amd64' }}"
  144. # Normally, matrix-nginx-proxy is enabled and nginx can reach matrix-appservice-irc over the container network.
  145. # If matrix-nginx-proxy is not enabled, or you otherwise have a need for it, you can expose
  146. # matrix-appservice-irc's client-server port to the local host.
  147. matrix_appservice_irc_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:9999' }}"
  148. # The IRC bridge docs say that if homeserver presence is disabled, it's better to also disable
  149. # IRC bridge presence, for performance reasons.
  150. matrix_appservice_irc_homeserver_enablePresence: "{{ matrix_synapse_presence_enabled }}"
  151. matrix_appservice_irc_systemd_required_services_list: |
  152. {{
  153. ['docker.service']
  154. +
  155. (['matrix-synapse.service'] if matrix_synapse_enabled else [])
  156. +
  157. (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
  158. }}
  159. matrix_appservice_irc_appservice_token: "{{ '%s' | format(matrix_synapse_macaroon_secret_key) | password_hash('sha512', 'irc.as.token') | to_uuid }}"
  160. matrix_appservice_irc_homeserver_token: "{{ '%s' | format(matrix_synapse_macaroon_secret_key) | password_hash('sha512', 'irc.hs.token') | to_uuid }}"
  161. matrix_appservice_irc_database_engine: "{{ 'postgres' if matrix_postgres_enabled else 'nedb' }}"
  162. matrix_appservice_irc_database_password: "{{ '%s' | format(matrix_synapse_macaroon_secret_key) | password_hash('sha512', 'as.irc.db') | to_uuid }}"
  163. ######################################################################
  164. #
  165. # /matrix-bridge-appservice-irc
  166. #
  167. ######################################################################
  168. ######################################################################
  169. #
  170. # matrix-bridge-beeper-linkedin
  171. #
  172. ######################################################################
  173. # We don't enable bridges by default.
  174. matrix_beeper_linkedin_enabled: false
  175. matrix_beeper_linkedin_container_image_self_build: "{{ matrix_architecture not in ['amd64'] }}"
  176. matrix_beeper_linkedin_systemd_required_services_list: |
  177. {{
  178. ['docker.service']
  179. +
  180. (['matrix-synapse.service'] if matrix_synapse_enabled else [])
  181. +
  182. (['matrix-postgres.service'] if matrix_postgres_enabled else [])
  183. +
  184. (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
  185. }}
  186. matrix_beeper_linkedin_appservice_token: "{{ '%s' | format(matrix_synapse_macaroon_secret_key) | password_hash('sha512', 'linked.as.token') | to_uuid }}"
  187. matrix_beeper_linkedin_homeserver_token: "{{ '%s' | format(matrix_synapse_macaroon_secret_key) | password_hash('sha512', 'linked.hs.token') | to_uuid }}"
  188. 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 '' }}"
  189. matrix_beeper_linkedin_bridge_presence: "{{ matrix_synapse_presence_enabled if matrix_synapse_enabled else true }}"
  190. matrix_beeper_linkedin_database_password: "{{ '%s' | format(matrix_synapse_macaroon_secret_key) | password_hash('sha512', 'maulinkedin.db') | to_uuid }}"
  191. ######################################################################
  192. #
  193. # /matrix-bridge-beeper-linkedin
  194. #
  195. ######################################################################
  196. ######################################################################
  197. #
  198. # matrix-bridge-mautrix-facebook
  199. #
  200. ######################################################################
  201. # We don't enable bridges by default.
  202. matrix_mautrix_facebook_enabled: false
  203. matrix_mautrix_facebook_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm64'] }}"
  204. matrix_mautrix_facebook_systemd_required_services_list: |
  205. {{
  206. ['docker.service']
  207. +
  208. (['matrix-synapse.service'] if matrix_synapse_enabled else [])
  209. +
  210. (['matrix-postgres.service'] if matrix_postgres_enabled else [])
  211. +
  212. (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
  213. }}
  214. matrix_mautrix_facebook_appservice_token: "{{ '%s' | format(matrix_synapse_macaroon_secret_key) | password_hash('sha512', 'fb.as.token') | to_uuid }}"
  215. matrix_mautrix_facebook_homeserver_token: "{{ '%s' | format(matrix_synapse_macaroon_secret_key) | password_hash('sha512', 'fb.hs.token') | to_uuid }}"
  216. 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 '' }}"
  217. matrix_mautrix_facebook_bridge_presence: "{{ matrix_synapse_presence_enabled if matrix_synapse_enabled else true }}"
  218. # We'd like to force-set people with external Postgres to SQLite, so the bridge role can complain
  219. # and point them to a migration path.
  220. matrix_mautrix_facebook_database_engine: "{{ 'postgres' if matrix_postgres_enabled else 'sqlite' }}"
  221. matrix_mautrix_facebook_database_password: "{{ '%s' | format(matrix_synapse_macaroon_secret_key) | password_hash('sha512', 'mau.fb.db') | to_uuid }}"
  222. ######################################################################
  223. #
  224. # /matrix-bridge-mautrix-facebook
  225. #
  226. ######################################################################
  227. ######################################################################
  228. #
  229. # matrix-bridge-mautrix-hangouts
  230. #
  231. ######################################################################
  232. # We don't enable bridges by default.
  233. matrix_mautrix_hangouts_enabled: false
  234. matrix_mautrix_hangouts_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm64'] }}"
  235. matrix_mautrix_hangouts_systemd_required_services_list: |
  236. {{
  237. ['docker.service']
  238. +
  239. (['matrix-synapse.service'] if matrix_synapse_enabled else [])
  240. +
  241. (['matrix-postgres.service'] if matrix_postgres_enabled else [])
  242. +
  243. (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
  244. }}
  245. matrix_mautrix_hangouts_appservice_token: "{{ '%s' | format(matrix_synapse_macaroon_secret_key) | password_hash('sha512', 'ho.as.token') | to_uuid }}"
  246. matrix_mautrix_hangouts_homeserver_token: "{{ '%s' | format(matrix_synapse_macaroon_secret_key) | password_hash('sha512', 'ho.hs.token') | to_uuid }}"
  247. matrix_mautrix_hangouts_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:9007' }}"
  248. 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 '' }}"
  249. # Postgres is the default, except if not using `matrix_postgres` (internal postgres)
  250. matrix_mautrix_hangouts_database_engine: "{{ 'postgres' if matrix_postgres_enabled else 'sqlite' }}"
  251. matrix_mautrix_hangouts_database_password: "{{ '%s' | format(matrix_synapse_macaroon_secret_key) | password_hash('sha512', 'mau.hangouts.db') | to_uuid }}"
  252. ######################################################################
  253. #
  254. # /matrix-bridge-mautrix-hangouts
  255. #
  256. ######################################################################
  257. ######################################################################
  258. #
  259. # matrix-bridge-mautrix-googlechat
  260. #
  261. ######################################################################
  262. # We don't enable bridges by default.
  263. matrix_mautrix_googlechat_enabled: false
  264. matrix_mautrix_googlechat_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm64'] }}"
  265. matrix_mautrix_googlechat_systemd_required_services_list: |
  266. {{
  267. ['docker.service']
  268. +
  269. (['matrix-synapse.service'] if matrix_synapse_enabled else [])
  270. +
  271. (['matrix-postgres.service'] if matrix_postgres_enabled else [])
  272. +
  273. (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
  274. }}
  275. matrix_mautrix_googlechat_appservice_token: "{{ '%s' | format(matrix_synapse_macaroon_secret_key) | password_hash('sha512', 'gc.as.token') | to_uuid }}"
  276. matrix_mautrix_googlechat_homeserver_token: "{{ '%s' | format(matrix_synapse_macaroon_secret_key) | password_hash('sha512', 'gc.hs.token') | to_uuid }}"
  277. matrix_mautrix_googlechat_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:9007' }}"
  278. 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 '' }}"
  279. # Postgres is the default, except if not using `matrix_postgres` (internal postgres)
  280. matrix_mautrix_googlechat_database_engine: "{{ 'postgres' if matrix_postgres_enabled else 'sqlite' }}"
  281. matrix_mautrix_googlechat_database_password: "{{ '%s' | format(matrix_synapse_macaroon_secret_key) | password_hash('sha512', 'mau.gc.db') | to_uuid }}"
  282. ######################################################################
  283. #
  284. # /matrix-bridge-mautrix-googlechat
  285. #
  286. ######################################################################
  287. ######################################################################
  288. #
  289. # matrix-bridge-mautrix-instagram
  290. #
  291. ######################################################################
  292. # We don't enable bridges by default.
  293. matrix_mautrix_instagram_enabled: false
  294. matrix_mautrix_instagram_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm64'] }}"
  295. matrix_mautrix_instagram_systemd_required_services_list: |
  296. {{
  297. ['docker.service']
  298. +
  299. (['matrix-synapse.service'] if matrix_synapse_enabled else [])
  300. +
  301. (['matrix-postgres.service'] if matrix_postgres_enabled else [])
  302. +
  303. (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
  304. }}
  305. matrix_mautrix_instagram_appservice_token: "{{ '%s' | format(matrix_synapse_macaroon_secret_key) | password_hash('sha512', 'ig.as.token') | to_uuid }}"
  306. matrix_mautrix_instagram_homeserver_token: "{{ '%s' | format(matrix_synapse_macaroon_secret_key) | password_hash('sha512', 'ig.hs.token') | to_uuid }}"
  307. 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 '' }}"
  308. matrix_mautrix_instagram_bridge_presence: "{{ matrix_synapse_presence_enabled if matrix_synapse_enabled else true }}"
  309. # We'd like to force-set people with external Postgres to SQLite, so the bridge role can complain
  310. # and point them to a migration path.
  311. matrix_mautrix_instagram_database_engine: "{{ 'postgres' if matrix_postgres_enabled else 'sqlite' }}"
  312. matrix_mautrix_instagram_database_password: "{{ '%s' | format(matrix_synapse_macaroon_secret_key) | password_hash('sha512', 'mau.ig.db') | to_uuid }}"
  313. ######################################################################
  314. #
  315. # /matrix-bridge-mautrix-instagram
  316. #
  317. ######################################################################
  318. ######################################################################
  319. #
  320. # matrix-bridge-mautrix-signal
  321. #
  322. ######################################################################
  323. # We don't enable bridges by default.
  324. matrix_mautrix_signal_enabled: false
  325. matrix_mautrix_signal_systemd_required_services_list: |
  326. {{
  327. ['docker.service']
  328. +
  329. (['matrix-synapse.service'] if matrix_synapse_enabled else [])
  330. +
  331. (['matrix-postgres.service'] if matrix_postgres_enabled else [])
  332. +
  333. (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
  334. +
  335. ['matrix-mautrix-signal-daemon.service']
  336. }}
  337. matrix_mautrix_signal_homeserver_domain: '{{ matrix_domain }}'
  338. matrix_mautrix_signal_homeserver_address: "{{ matrix_homeserver_container_url }}"
  339. matrix_mautrix_signal_homeserver_token: "{{ '%s' | format(matrix_synapse_macaroon_secret_key) | password_hash('sha512', 'si.hs.token') | to_uuid }}"
  340. matrix_mautrix_signal_appservice_token: "{{ '%s' | format(matrix_synapse_macaroon_secret_key) | password_hash('sha512', 'si.as.token') | to_uuid }}"
  341. 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 '' }}"
  342. matrix_mautrix_signal_database_engine: 'postgres'
  343. matrix_mautrix_signal_database_password: "{{ '%s' | format(matrix_synapse_macaroon_secret_key) | password_hash('sha512', 'mau.signal.db') | to_uuid }}"
  344. matrix_mautrix_signal_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm64'] }}"
  345. matrix_mautrix_signal_daemon_container_image_self_build: "{{ matrix_architecture != 'amd64' }}"
  346. ######################################################################
  347. #
  348. # /matrix-bridge-mautrix-signal
  349. #
  350. ######################################################################
  351. ######################################################################
  352. #
  353. # matrix-bridge-mautrix-telegram
  354. #
  355. ######################################################################
  356. # We don't enable bridges by default.
  357. matrix_mautrix_telegram_enabled: false
  358. # Images are multi-arch (amd64 and arm64, but not arm32).
  359. matrix_mautrix_telegram_container_image_self_build: "{{ matrix_architecture not in ['arm64', 'amd64'] }}"
  360. matrix_telegram_lottieconverter_container_image_self_build: "{{ matrix_architecture not in ['arm64', 'amd64'] }}"
  361. matrix_telegram_lottieconverter_container_image_self_build_mask_arch: "{{ matrix_architecture != 'amd64' }}"
  362. matrix_mautrix_telegram_systemd_required_services_list: |
  363. {{
  364. ['docker.service']
  365. +
  366. (['matrix-synapse.service'] if matrix_synapse_enabled else [])
  367. +
  368. (['matrix-postgres.service'] if matrix_postgres_enabled else [])
  369. +
  370. (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
  371. }}
  372. matrix_mautrix_telegram_appservice_token: "{{ '%s' | format(matrix_synapse_macaroon_secret_key) | password_hash('sha512', 'telegr.as.token') | to_uuid }}"
  373. matrix_mautrix_telegram_homeserver_token: "{{ '%s' | format(matrix_synapse_macaroon_secret_key) | password_hash('sha512', 'telegr.hs.token') | to_uuid }}"
  374. matrix_mautrix_telegram_public_endpoint: "/{{ '%s' | format(matrix_synapse_macaroon_secret_key) | password_hash('sha512', 'telegram') | to_uuid }}"
  375. matrix_mautrix_telegram_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:9006' }}"
  376. 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 '' }}"
  377. # Postgres is the default, except if not using `matrix_postgres` (internal postgres)
  378. matrix_mautrix_telegram_database_engine: "{{ 'postgres' if matrix_postgres_enabled else 'sqlite' }}"
  379. matrix_mautrix_telegram_database_password: "{{ '%s' | format(matrix_synapse_macaroon_secret_key) | password_hash('sha512', 'mau.telegram.db') | to_uuid }}"
  380. ######################################################################
  381. #
  382. # /matrix-bridge-mautrix-telegram
  383. #
  384. ######################################################################
  385. ######################################################################
  386. #
  387. # matrix-bridge-mautrix-twitter
  388. #
  389. ######################################################################
  390. # We don't enable bridges by default.
  391. matrix_mautrix_twitter_enabled: false
  392. matrix_mautrix_twitter_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm64'] }}"
  393. matrix_mautrix_twitter_systemd_required_services_list: |
  394. {{
  395. ['docker.service']
  396. +
  397. (['matrix-synapse.service'] if matrix_synapse_enabled else [])
  398. +
  399. (['matrix-postgres.service'] if matrix_postgres_enabled else [])
  400. +
  401. (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
  402. }}
  403. matrix_mautrix_twitter_appservice_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'twt.as.token') | to_uuid }}"
  404. matrix_mautrix_twitter_homeserver_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'twt.hs.token') | to_uuid }}"
  405. 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 '' }}"
  406. # We'd like to force-set people with external Postgres to SQLite, so the bridge role can complain
  407. # and point them to a migration path.
  408. matrix_mautrix_twitter_database_engine: "{{ 'postgres' if matrix_postgres_enabled else '' }}"
  409. matrix_mautrix_twitter_database_password: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'mau.twt.db') | to_uuid }}"
  410. ######################################################################
  411. #
  412. # /matrix-bridge-mautrix-twitter
  413. #
  414. ######################################################################
  415. ######################################################################
  416. #
  417. # matrix-bridge-mautrix-whatsapp
  418. #
  419. ######################################################################
  420. # We don't enable bridges by default.
  421. matrix_mautrix_whatsapp_enabled: false
  422. matrix_mautrix_whatsapp_container_image_self_build: "{{ matrix_architecture not in ['arm64', 'amd64'] }}"
  423. matrix_mautrix_whatsapp_systemd_required_services_list: |
  424. {{
  425. ['docker.service']
  426. +
  427. (['matrix-synapse.service'] if matrix_synapse_enabled else [])
  428. +
  429. (['matrix-postgres.service'] if matrix_postgres_enabled else [])
  430. +
  431. (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
  432. }}
  433. matrix_mautrix_whatsapp_appservice_token: "{{ '%s' | format(matrix_synapse_macaroon_secret_key) | password_hash('sha512', 'whats.as.token') | to_uuid }}"
  434. matrix_mautrix_whatsapp_homeserver_token: "{{ '%s' | format(matrix_synapse_macaroon_secret_key) | password_hash('sha512', 'whats.hs.token') | to_uuid }}"
  435. 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 '' }}"
  436. # Postgres is the default, except if not using `matrix_postgres` (internal postgres)
  437. matrix_mautrix_whatsapp_database_engine: "{{ 'postgres' if matrix_postgres_enabled else 'sqlite' }}"
  438. matrix_mautrix_whatsapp_database_password: "{{ '%s' | format(matrix_synapse_macaroon_secret_key) | password_hash('sha512', 'mauwhatsapp.db') | to_uuid }}"
  439. ######################################################################
  440. #
  441. # /matrix-bridge-mautrix-whatsapp
  442. #
  443. ######################################################################
  444. ######################################################################
  445. #
  446. # matrix-sms-bridge
  447. #
  448. ######################################################################
  449. # We don't enable bridges by default.
  450. matrix_sms_bridge_enabled: false
  451. matrix_sms_bridge_systemd_required_services_list: |
  452. {{
  453. ['docker.service']
  454. +
  455. (['matrix-synapse.service'] if matrix_synapse_enabled else [])
  456. +
  457. (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
  458. }}
  459. matrix_sms_bridge_appservice_token: "{{ '%s' | format(matrix_synapse_macaroon_secret_key) | password_hash('sha512', 'sms.as.token') | to_uuid }}"
  460. matrix_sms_bridge_homeserver_port: "{{ matrix_synapse_container_client_api_port }}"
  461. matrix_sms_bridge_homeserver_token: "{{ '%s' | format(matrix_synapse_macaroon_secret_key) | password_hash('sha512', 'sms.hs.token') | to_uuid }}"
  462. ######################################################################
  463. #
  464. # /matrix-sms-bridge
  465. #
  466. ######################################################################
  467. ######################################################################
  468. #
  469. # matrix-bridge-heisenbridge
  470. #
  471. ######################################################################
  472. # We don't enable bridges by default.
  473. matrix_heisenbridge_enabled: false
  474. matrix_heisenbridge_appservice_token: "{{ '%s' | format(matrix_synapse_macaroon_secret_key) | password_hash('sha512', 'heisen.as.tok') | to_uuid }}"
  475. matrix_heisenbridge_homeserver_token: "{{ '%s' | format(matrix_synapse_macaroon_secret_key) | password_hash('sha512', 'heisen.hs.tok') | to_uuid }}"
  476. matrix_heisenbridge_systemd_wanted_services_list: |
  477. {{
  478. (['matrix-synapse.service'] if matrix_synapse_enabled else [])
  479. +
  480. (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
  481. }}
  482. ######################################################################
  483. #
  484. # /matrix-bridge-heisenbridge
  485. #
  486. ######################################################################
  487. ######################################################################
  488. #
  489. # matrix-bridge-mx-puppet-skype
  490. #
  491. ######################################################################
  492. # We don't enable bridges by default.
  493. matrix_mx_puppet_skype_enabled: false
  494. matrix_mx_puppet_skype_container_image_self_build: "{{ matrix_architecture != 'amd64'}}"
  495. matrix_mx_puppet_skype_systemd_required_services_list: |
  496. {{
  497. ['docker.service']
  498. +
  499. (['matrix-synapse.service'] if matrix_synapse_enabled else [])
  500. +
  501. (['matrix-postgres.service'] if matrix_postgres_enabled else [])
  502. +
  503. (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
  504. }}
  505. matrix_mx_puppet_skype_appservice_token: "{{ '%s' | format(matrix_synapse_macaroon_secret_key) | password_hash('sha512', 'skype.as.tok') | to_uuid }}"
  506. matrix_mx_puppet_skype_homeserver_token: "{{ '%s' | format(matrix_synapse_macaroon_secret_key) | password_hash('sha512', 'skype.hs.tok') | to_uuid }}"
  507. matrix_mx_puppet_skype_login_shared_secret: "{{ matrix_synapse_ext_password_provider_shared_secret_auth_shared_secret if matrix_synapse_ext_password_provider_shared_secret_auth_enabled else '' }}"
  508. # Postgres is the default, except if not using `matrix_postgres` (internal postgres)
  509. matrix_mx_puppet_skype_database_engine: "{{ 'postgres' if matrix_postgres_enabled else 'sqlite' }}"
  510. matrix_mx_puppet_skype_database_password: "{{ '%s' | format(matrix_synapse_macaroon_secret_key) | password_hash('sha512', 'mxpup.skype.db') | to_uuid }}"
  511. ######################################################################
  512. #
  513. # /matrix-bridge-mx-puppet-skype
  514. #
  515. ######################################################################
  516. ######################################################################
  517. #
  518. # matrix-bridge-mx-puppet-slack
  519. #
  520. ######################################################################
  521. # We don't enable bridges by default.
  522. matrix_mx_puppet_slack_enabled: false
  523. matrix_mx_puppet_slack_container_image_self_build: "{{ matrix_architecture != 'amd64'}}"
  524. matrix_mx_puppet_slack_systemd_required_services_list: |
  525. {{
  526. ['docker.service']
  527. +
  528. (['matrix-synapse.service'] if matrix_synapse_enabled else [])
  529. +
  530. (['matrix-postgres.service'] if matrix_postgres_enabled else [])
  531. +
  532. (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
  533. }}
  534. matrix_mx_puppet_slack_appservice_token: "{{ '%s' | format(matrix_synapse_macaroon_secret_key) | password_hash('sha512', 'mxslk.as.tok') | to_uuid }}"
  535. matrix_mx_puppet_slack_homeserver_token: "{{ '%s' | format(matrix_synapse_macaroon_secret_key) | password_hash('sha512', 'mxslk.hs.tok') | to_uuid }}"
  536. 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 '' }}"
  537. # Postgres is the default, except if not using `matrix_postgres` (internal postgres)
  538. matrix_mx_puppet_slack_database_engine: "{{ 'postgres' if matrix_postgres_enabled else 'sqlite' }}"
  539. matrix_mx_puppet_slack_database_password: "{{ '%s' | format(matrix_synapse_macaroon_secret_key) | password_hash('sha512', 'mxpup.slack.db') | to_uuid }}"
  540. ######################################################################
  541. #
  542. # /matrix-bridge-mx-puppet-slack
  543. #
  544. ######################################################################
  545. ######################################################################
  546. #
  547. # matrix-bridge-mx-puppet-twitter
  548. #
  549. ######################################################################
  550. # We don't enable bridges by default.
  551. matrix_mx_puppet_twitter_enabled: false
  552. matrix_mx_puppet_twitter_container_image_self_build: "{{ matrix_architecture != 'amd64'}}"
  553. matrix_mx_puppet_twitter_systemd_required_services_list: |
  554. {{
  555. ['docker.service']
  556. +
  557. (['matrix-synapse.service'] if matrix_synapse_enabled else [])
  558. +
  559. (['matrix-postgres.service'] if matrix_postgres_enabled else [])
  560. +
  561. (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
  562. }}
  563. matrix_mx_puppet_twitter_appservice_token: "{{ '%s' | format(matrix_synapse_macaroon_secret_key) | password_hash('sha512', 'mxtwt.as.tok') | to_uuid }}"
  564. matrix_mx_puppet_twitter_homeserver_token: "{{ '%s' | format(matrix_synapse_macaroon_secret_key) | password_hash('sha512', 'mxtwt.hs.tok') | to_uuid }}"
  565. 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 '' }}"
  566. 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) }}"
  567. # Postgres is the default, except if not using `matrix_postgres` (internal postgres)
  568. matrix_mx_puppet_twitter_database_engine: "{{ 'postgres' if matrix_postgres_enabled else 'sqlite' }}"
  569. matrix_mx_puppet_twitter_database_password: "{{ '%s' | format(matrix_synapse_macaroon_secret_key) | password_hash('sha512', 'mxpup.twitter.db') | to_uuid }}"
  570. ######################################################################
  571. #
  572. # /matrix-bridge-mx-puppet-twitter
  573. #
  574. ######################################################################
  575. ######################################################################
  576. #
  577. # matrix-bridge-mx-puppet-instagram
  578. #
  579. ######################################################################
  580. # We don't enable bridges by default.
  581. matrix_mx_puppet_instagram_enabled: false
  582. matrix_mx_puppet_instagram_container_image_self_build: "{{ matrix_architecture != 'amd64'}}"
  583. matrix_mx_puppet_instagram_systemd_required_services_list: |
  584. {{
  585. ['docker.service']
  586. +
  587. (['matrix-synapse.service'] if matrix_synapse_enabled else [])
  588. +
  589. (['matrix-postgres.service'] if matrix_postgres_enabled else [])
  590. +
  591. (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
  592. }}
  593. matrix_mx_puppet_instagram_appservice_token: "{{ '%s' | format(matrix_synapse_macaroon_secret_key) | password_hash('sha512', 'mxig.as.tok') | to_uuid }}"
  594. matrix_mx_puppet_instagram_homeserver_token: "{{ '%s' | format(matrix_synapse_macaroon_secret_key) | password_hash('sha512', 'mxig.hs.tok') | to_uuid }}"
  595. 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 '' }}"
  596. # Postgres is the default, except if not using `matrix_postgres` (internal postgres)
  597. matrix_mx_puppet_instagram_database_engine: "{{ 'postgres' if matrix_postgres_enabled else 'sqlite' }}"
  598. matrix_mx_puppet_instagram_database_password: "{{ '%s' | format(matrix_synapse_macaroon_secret_key) | password_hash('sha512', 'mxpup.ig.db') | to_uuid }}"
  599. ######################################################################
  600. #
  601. # /matrix-bridge-mx-puppet-instagram
  602. #
  603. ######################################################################
  604. ######################################################################
  605. #
  606. # matrix-bridge-mx-puppet-discord
  607. #
  608. ######################################################################
  609. # We don't enable bridges by default.
  610. matrix_mx_puppet_discord_enabled: false
  611. matrix_mx_puppet_discord_container_image_self_build: "{{ matrix_architecture != 'amd64'}}"
  612. matrix_mx_puppet_discord_systemd_required_services_list: |
  613. {{
  614. ['docker.service']
  615. +
  616. (['matrix-synapse.service'] if matrix_synapse_enabled else [])
  617. +
  618. (['matrix-postgres.service'] if matrix_postgres_enabled else [])
  619. +
  620. (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
  621. }}
  622. matrix_mx_puppet_discord_appservice_token: "{{ '%s' | format(matrix_synapse_macaroon_secret_key) | password_hash('sha512', 'mxdsc.as.tok') | to_uuid }}"
  623. matrix_mx_puppet_discord_homeserver_token: "{{ '%s' | format(matrix_synapse_macaroon_secret_key) | password_hash('sha512', 'mxdsc.hs.tok') | to_uuid }}"
  624. 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 '' }}"
  625. # Postgres is the default, except if not using `matrix_postgres` (internal postgres)
  626. matrix_mx_puppet_discord_database_engine: "{{ 'postgres' if matrix_postgres_enabled else 'sqlite' }}"
  627. matrix_mx_puppet_discord_database_password: "{{ '%s' | format(matrix_synapse_macaroon_secret_key) | password_hash('sha512', 'mxpup.dsc.db') | to_uuid }}"
  628. ######################################################################
  629. #
  630. # /matrix-bridge-mx-puppet-discord
  631. #
  632. ######################################################################
  633. ######################################################################
  634. #
  635. # matrix-bridge-mx-puppet-steam
  636. #
  637. ######################################################################
  638. # We don't enable bridges by default.
  639. matrix_mx_puppet_steam_enabled: false
  640. matrix_mx_puppet_steam_container_image_self_build: "{{ matrix_architecture != 'amd64'}}"
  641. matrix_mx_puppet_steam_systemd_required_services_list: |
  642. {{
  643. ['docker.service']
  644. +
  645. (['matrix-synapse.service'] if matrix_synapse_enabled else [])
  646. +
  647. (['matrix-postgres.service'] if matrix_postgres_enabled else [])
  648. +
  649. (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
  650. }}
  651. matrix_mx_puppet_steam_appservice_token: "{{ '%s' | format(matrix_synapse_macaroon_secret_key) | password_hash('sha512', 'mxste.as.tok') | to_uuid }}"
  652. matrix_mx_puppet_steam_homeserver_token: "{{ '%s' | format(matrix_synapse_macaroon_secret_key) | password_hash('sha512', 'mxste.hs.tok') | to_uuid }}"
  653. 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 '' }}"
  654. # Postgres is the default, except if not using `matrix_postgres` (internal postgres)
  655. matrix_mx_puppet_steam_database_engine: "{{ 'postgres' if matrix_postgres_enabled else 'sqlite' }}"
  656. matrix_mx_puppet_steam_database_password: "{{ '%s' | format(matrix_synapse_macaroon_secret_key) | password_hash('sha512', 'mxpup.steam.db') | to_uuid }}"
  657. ######################################################################
  658. #
  659. # /matrix-bridge-mx-puppet-steam
  660. #
  661. ######################################################################
  662. ######################################################################
  663. #
  664. # matrix-bridge-mx-puppet-groupme
  665. #
  666. ######################################################################
  667. # We don't enable bridges by default.
  668. matrix_mx_puppet_groupme_enabled: false
  669. matrix_mx_puppet_groupme_container_image_self_build: "{{ matrix_architecture != 'amd64'}}"
  670. matrix_mx_puppet_groupme_systemd_required_services_list: |
  671. {{
  672. ['docker.service']
  673. +
  674. (['matrix-synapse.service'] if matrix_synapse_enabled else [])
  675. +
  676. (['matrix-postgres.service'] if matrix_postgres_enabled else [])
  677. +
  678. (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
  679. }}
  680. matrix_mx_puppet_groupme_appservice_token: "{{ '%s' | format(matrix_synapse_macaroon_secret_key) | password_hash('sha512', 'mxgro.as.tok') | to_uuid }}"
  681. matrix_mx_puppet_groupme_homeserver_token: "{{ '%s' | format(matrix_synapse_macaroon_secret_key) | password_hash('sha512', 'mxgro.hs.tok') | to_uuid }}"
  682. 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 '' }}"
  683. # Postgres is the default, except if not using `matrix_postgres` (internal postgres)
  684. matrix_mx_puppet_groupme_database_engine: "{{ 'postgres' if matrix_postgres_enabled else 'sqlite' }}"
  685. matrix_mx_puppet_groupme_database_password: "{{ '%s' | format(matrix_synapse_macaroon_secret_key) | password_hash('sha512', 'mxpup.groupme.db') | to_uuid }}"
  686. ######################################################################
  687. #
  688. # /matrix-bridge-mx-puppet-groupme
  689. #
  690. ######################################################################
  691. ######################################################################
  692. #
  693. # matrix-bot-matrix-reminder-bot
  694. #
  695. ######################################################################
  696. # We don't enable bots by default.
  697. matrix_bot_matrix_reminder_bot_enabled: false
  698. matrix_bot_matrix_reminder_bot_systemd_required_services_list: |
  699. {{
  700. ['docker.service']
  701. +
  702. (['matrix-postgres.service'] if matrix_postgres_enabled else [])
  703. +
  704. (['matrix-synapse.service'] if matrix_synapse_enabled else [])
  705. +
  706. (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
  707. }}
  708. # Postgres is the default, except if not using `matrix_postgres` (internal postgres)
  709. matrix_bot_matrix_reminder_bot_database_engine: "{{ 'postgres' if matrix_postgres_enabled else 'sqlite' }}"
  710. matrix_bot_matrix_reminder_bot_database_password: "{{ '%s' | format(matrix_synapse_macaroon_secret_key) | password_hash('sha512', 'reminder.bot.db') | to_uuid }}"
  711. matrix_bot_matrix_reminder_bot_container_image_self_build: "{{ matrix_architecture != 'amd64' }}"
  712. ######################################################################
  713. #
  714. # /matrix-bot-matrix-reminder-bot
  715. #
  716. ######################################################################
  717. ######################################################################
  718. #
  719. # matrix-bot-honoroit
  720. #
  721. ######################################################################
  722. # We don't enable bots by default.
  723. matrix_bot_honoroit_enabled: false
  724. matrix_bot_honoroit_systemd_required_services_list: |
  725. {{
  726. ['docker.service']
  727. +
  728. (['matrix-postgres.service'] if matrix_postgres_enabled else [])
  729. +
  730. (['matrix-synapse.service'] if matrix_synapse_enabled else [])
  731. +
  732. (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
  733. }}
  734. # Postgres is the default, except if not using `matrix_postgres` (internal postgres)
  735. matrix_bot_honoroit_database_engine: "{{ 'postgres' if matrix_postgres_enabled else 'sqlite' }}"
  736. matrix_bot_honoroit_database_password: "{{ '%s' | format(matrix_synapse_macaroon_secret_key) | password_hash('sha512', 'honoroit.bot.db') | to_uuid }}"
  737. matrix_bot_honoroit_container_image_self_build: "{{ matrix_architecture != 'amd64' }}"
  738. ######################################################################
  739. #
  740. # /matrix-bot-honoroit
  741. #
  742. ######################################################################
  743. ######################################################################
  744. #
  745. # matrix-bot-go-neb
  746. #
  747. ######################################################################
  748. # We don't enable bots by default.
  749. matrix_bot_go_neb_enabled: false
  750. matrix_bot_go_neb_systemd_required_services_list: |
  751. {{
  752. ['docker.service']
  753. +
  754. (['matrix-synapse.service'] if matrix_synapse_enabled else [])
  755. +
  756. (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
  757. }}
  758. matrix_bot_go_neb_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:4050' }}"
  759. ######################################################################
  760. #
  761. # /matrix-bot-go-neb
  762. #
  763. ######################################################################
  764. ######################################################################
  765. #
  766. # matrix-bot-mjolnir
  767. #
  768. ######################################################################
  769. # We don't enable bots by default.
  770. matrix_bot_mjolnir_enabled: false
  771. matrix_bot_mjolnir_container_image_self_build: "{{ matrix_architecture != 'amd64'}}"
  772. matrix_bot_mjolnir_systemd_required_services_list: |
  773. {{
  774. ['docker.service']
  775. +
  776. (['matrix-synapse.service'] if matrix_synapse_enabled else [])
  777. +
  778. (['matrix-postgres.service'] if matrix_postgres_enabled else [])
  779. +
  780. (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
  781. }}
  782. ######################################################################
  783. #
  784. # /matrix-bot-mjolnir
  785. #
  786. ######################################################################
  787. ######################################################################
  788. #
  789. # matrix-corporal
  790. #
  791. ######################################################################
  792. matrix_corporal_enabled: false
  793. matrix_corporal_container_image_self_build: "{{ matrix_architecture != 'amd64' }}"
  794. # Normally, matrix-nginx-proxy is enabled and nginx can reach matrix-corporal over the container network.
  795. # If matrix-nginx-proxy is not enabled, or you otherwise have a need for it, you can expose
  796. # matrix-corporal's web-server ports to the local host.
  797. matrix_corporal_container_http_gateway_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:41080' }}"
  798. matrix_corporal_container_http_api_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:41081' }}"
  799. matrix_corporal_systemd_required_services_list: |
  800. {{
  801. (['docker.service'])
  802. +
  803. (['matrix-synapse.service'])
  804. }}
  805. # This goes to Synapse's vhost
  806. matrix_corporal_matrix_homeserver_api_endpoint: "{{ matrix_homeserver_container_url }}"
  807. matrix_corporal_matrix_auth_shared_secret: "{{ matrix_synapse_ext_password_provider_shared_secret_auth_shared_secret }}"
  808. # This is only useful if there's REST auth provider to make use of it.
  809. matrix_corporal_http_gateway_internal_rest_auth_enabled: "{{ matrix_synapse_ext_password_provider_rest_auth_enabled }}"
  810. matrix_corporal_matrix_registration_shared_secret: "{{ matrix_synapse_registration_shared_secret }}"
  811. ######################################################################
  812. #
  813. # /matrix-corporal
  814. #
  815. ######################################################################
  816. ######################################################################
  817. #
  818. # matrix-coturn
  819. #
  820. ######################################################################
  821. matrix_coturn_enabled: true
  822. matrix_coturn_container_image_self_build: "{{ matrix_architecture != 'amd64'}}"
  823. matrix_coturn_turn_external_ip_address: "{{ ansible_host }}"
  824. matrix_coturn_tls_enabled: "{{ matrix_ssl_retrieval_method != 'none' }}"
  825. matrix_coturn_tls_cert_path: "{{ matrix_ssl_config_dir_path }}/live/{{ matrix_server_fqn_matrix }}/fullchain.pem"
  826. matrix_coturn_tls_key_path: "{{ matrix_ssl_config_dir_path }}/live/{{ matrix_server_fqn_matrix }}/privkey.pem"
  827. matrix_coturn_container_additional_volumes: |
  828. {{
  829. ([] if matrix_ssl_retrieval_method == 'none' else [
  830. {
  831. 'src': matrix_ssl_config_dir_path,
  832. 'dst': matrix_ssl_config_dir_path,
  833. 'options': 'ro',
  834. }
  835. ])
  836. }}
  837. ######################################################################
  838. #
  839. # /matrix-coturn
  840. #
  841. ######################################################################
  842. ######################################################################
  843. #
  844. # matrix-dimension
  845. #
  846. ######################################################################
  847. matrix_dimension_enabled: false
  848. matrix_dimension_container_image_self_build: "{{ matrix_architecture != 'amd64' }}"
  849. # Normally, matrix-nginx-proxy is enabled and nginx can reach Dimension over the container network.
  850. # If matrix-nginx-proxy is not enabled, or you otherwise have a need for it, you can expose
  851. # the Dimension HTTP port to the local host.
  852. matrix_dimension_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:8184' }}"
  853. matrix_dimension_homeserver_federationUrl: "http://matrix-synapse:{{matrix_synapse_container_federation_api_plain_port|string}}"
  854. matrix_integration_manager_rest_url: "{{ matrix_dimension_integrations_rest_url if matrix_dimension_enabled else None }}"
  855. matrix_integration_manager_ui_url: "{{ matrix_dimension_integrations_ui_url if matrix_dimension_enabled else None }}"
  856. matrix_dimension_systemd_required_services_list: |
  857. {{
  858. ['docker.service']
  859. +
  860. (['matrix-postgres.service'] if matrix_postgres_enabled else [])
  861. +
  862. (['matrix-synapse.service'] if matrix_synapse_enabled else [])
  863. +
  864. (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
  865. }}
  866. # Postgres is the default, except if not using `matrix_postgres` (internal postgres)
  867. matrix_dimension_database_engine: "{{ 'postgres' if matrix_postgres_enabled else 'sqlite' }}"
  868. matrix_dimension_database_password: "{{ '%s' | format(matrix_synapse_macaroon_secret_key) | password_hash('sha512', 'dimension.db') | to_uuid }}"
  869. ######################################################################
  870. #
  871. # /matrix-dimension
  872. #
  873. ######################################################################
  874. ######################################################################
  875. #
  876. # matrix-etherpad
  877. #
  878. ######################################################################
  879. matrix_etherpad_enabled: false
  880. matrix_etherpad_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:9001' }}"
  881. matrix_etherpad_systemd_required_services_list: |
  882. {{
  883. ['docker.service']
  884. +
  885. (['matrix-postgres.service'] if matrix_postgres_enabled else [])
  886. }}
  887. matrix_etherpad_database_password: "{{ '%s' | format(matrix_synapse_macaroon_secret_key) | password_hash('sha512', 'etherpad.db') | to_uuid }}"
  888. ######################################################################
  889. #
  890. # /matrix-etherpad
  891. #
  892. ######################################################################
  893. ######################################################################
  894. #
  895. # matrix-dynamic-dns
  896. #
  897. ######################################################################
  898. matrix_dynamic_dns_enabled: false
  899. ######################################################################
  900. #
  901. # /matrix-dynamic-dns
  902. #
  903. ######################################################################
  904. ######################################################################
  905. #
  906. # matrix-email2matrix
  907. #
  908. ######################################################################
  909. matrix_email2matrix_enabled: false
  910. matrix_email2matrix_container_image_self_build: "{{ matrix_architecture != 'amd64' }}"
  911. ######################################################################
  912. #
  913. # /matrix-email2matrix
  914. #
  915. ######################################################################
  916. ######################################################################
  917. #
  918. # matrix-jitsi
  919. #
  920. ######################################################################
  921. matrix_jitsi_enabled: false
  922. # Normally, matrix-nginx-proxy is enabled and nginx can reach jitsi/web over the container network.
  923. # If matrix-nginx-proxy is not enabled, or you otherwise have a need for it, you can expose
  924. # the Jitsi HTTP port to the local host.
  925. matrix_jitsi_web_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:13080' }}"
  926. matrix_jitsi_jvb_container_colibri_ws_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:13090' }}"
  927. matrix_jitsi_prosody_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:5280' }}"
  928. matrix_jitsi_jibri_xmpp_password: "{{ '%s' | format(matrix_synapse_macaroon_secret_key) | password_hash('sha512', 'jibri') | to_uuid }}"
  929. matrix_jitsi_jicofo_auth_password: "{{ '%s' | format(matrix_synapse_macaroon_secret_key) | password_hash('sha512', 'jicofo') | to_uuid }}"
  930. matrix_jitsi_jvb_auth_password: "{{ '%s' | format(matrix_synapse_macaroon_secret_key) | password_hash('sha512', 'jvb') | to_uuid }}"
  931. matrix_jitsi_web_stun_servers: |
  932. {{
  933. [
  934. 'stun:' + matrix_server_fqn_matrix + ':5349',
  935. 'stun:' + matrix_server_fqn_matrix + ':3478',
  936. ]
  937. if matrix_coturn_enabled
  938. else [ 'stun:meet-jit-si-turnrelay.jitsi.net:443']
  939. }}
  940. # If the self-hosted Etherpad instance is available, it will also show up in Jitsi conferences,
  941. # unless explicitly disabled by setting `matrix_jitsi_etherpad_enabled` to false.
  942. # Falls back to the scalar.vector.im etherpad in case someone sets `matrix_jitsi_etherpad_enabled` to true,
  943. # while also setting `matrix_etherpad_enabled` to false.
  944. matrix_jitsi_etherpad_enabled: "{{ matrix_etherpad_enabled }}"
  945. matrix_jitsi_etherpad_base: "{{ matrix_etherpad_base_url if matrix_etherpad_enabled else 'https://scalar.vector.im/etherpad' }}"
  946. ######################################################################
  947. #
  948. # /matrix-jitsi
  949. #
  950. ######################################################################
  951. ######################################################################
  952. #
  953. # matrix-mailer
  954. #
  955. ######################################################################
  956. # By default, this playbook sets up an exim mailer server (running in a container).
  957. # This is so that Synapse can send email reminders for unread messages.
  958. # Other services (like ma1sd), also use the mailer.
  959. matrix_mailer_enabled: true
  960. matrix_mailer_container_image_self_build: "{{ matrix_architecture != 'amd64'}}"
  961. ######################################################################
  962. #
  963. # /matrix-mailer
  964. #
  965. ######################################################################
  966. ######################################################################
  967. #
  968. # matrix-ma1sd
  969. #
  970. ######################################################################
  971. # By default, this playbook installs the ma1sd identity server on the same domain as Synapse (`matrix_server_fqn_matrix`).
  972. # If you wish to use the public identity servers (matrix.org, vector.im) instead of your own you may wish to disable this.
  973. matrix_ma1sd_enabled: true
  974. matrix_ma1sd_container_image_self_build: "{{ matrix_architecture != 'amd64' }}"
  975. # Normally, matrix-nginx-proxy is enabled and nginx can reach ma1sd over the container network.
  976. # If matrix-nginx-proxy is not enabled, or you otherwise have a need for it, you can expose
  977. # ma1sd's web-server port.
  978. matrix_ma1sd_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:' + matrix_ma1sd_container_port|string }}"
  979. # We enable Synapse integration via its Postgres database by default.
  980. # When using another Identity store, you might wish to disable this and define
  981. # your own configuration in `matrix_ma1sd_configuration_extension_yaml`.
  982. matrix_ma1sd_synapsesql_enabled: true
  983. matrix_ma1sd_synapsesql_type: postgresql
  984. matrix_ma1sd_synapsesql_connection: //{{ matrix_synapse_database_host }}/{{ matrix_synapse_database_database }}?user={{ matrix_synapse_database_user | urlencode() }}&password={{ matrix_synapse_database_password | urlencode() }}
  985. matrix_ma1sd_dns_overwrite_enabled: true
  986. matrix_ma1sd_dns_overwrite_homeserver_client_name: "{{ matrix_server_fqn_matrix }}"
  987. # The `matrix_ma1sd_dns_overwrite_homeserver_client_value` value when matrix_nginx_proxy_enabled is false covers the general case,
  988. # but may be inaccurate if matrix-corporal is enabled.
  989. 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 }}"
  990. # By default, we send mail through the `matrix-mailer` service.
  991. matrix_ma1sd_threepid_medium_email_identity_from: "{{ matrix_mailer_sender_address }}"
  992. matrix_ma1sd_threepid_medium_email_connectors_smtp_host: "matrix-mailer"
  993. matrix_ma1sd_threepid_medium_email_connectors_smtp_port: 8025
  994. matrix_ma1sd_threepid_medium_email_connectors_smtp_tls: 0
  995. matrix_ma1sd_self_check_validate_certificates: "{{ false if matrix_ssl_retrieval_method == 'self-signed' else true }}"
  996. matrix_ma1sd_systemd_required_services_list: |
  997. {{
  998. (['matrix-postgres.service'] if matrix_postgres_enabled else [])
  999. }}
  1000. matrix_ma1sd_systemd_wanted_services_list: |
  1001. {{
  1002. (['matrix-corporal.service'] if matrix_corporal_enabled else ['matrix-synapse.service'])
  1003. +
  1004. (['matrix-postgres.service'] if matrix_postgres_enabled else [])
  1005. +
  1006. (['matrix-mailer.service'] if matrix_mailer_enabled else [])
  1007. }}
  1008. # Postgres is the default, except if not using `matrix_postgres` (internal postgres)
  1009. matrix_ma1sd_database_engine: "{{ 'postgres' if matrix_postgres_enabled else 'sqlite' }}"
  1010. matrix_ma1sd_database_password: "{{ '%s' | format(matrix_synapse_macaroon_secret_key) | password_hash('sha512', 'ma1sd.db') | to_uuid }}"
  1011. ######################################################################
  1012. #
  1013. # /matrix-ma1sd
  1014. #
  1015. ######################################################################
  1016. ######################################################################
  1017. #
  1018. # matrix-nginx-proxy
  1019. #
  1020. ######################################################################
  1021. # By default, this playbook sets up a reverse-proxy nginx proxy server on TCP ports 80, 443 and 8448.
  1022. # This is fine if you're dedicating the whole server to Matrix.
  1023. # If that's not the case, you may wish to disable this and take care of proxying yourself.
  1024. matrix_nginx_proxy_enabled: true
  1025. matrix_nginx_proxy_proxy_matrix_client_api_addr_with_container: "{{ 'matrix-corporal:41080' if matrix_corporal_enabled else 'matrix-nginx-proxy:12080' }}"
  1026. 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' }}"
  1027. matrix_nginx_proxy_proxy_matrix_client_api_client_max_body_size_mb: |-
  1028. {{
  1029. {
  1030. 'synapse': matrix_synapse_max_upload_size_mb,
  1031. 'dendrite': (matrix_dendrite_max_file_size_bytes / 1024 / 1024) | round,
  1032. }[matrix_homeserver_implementation]|int
  1033. }}
  1034. matrix_nginx_proxy_proxy_matrix_client_api_forwarded_location_synapse_admin_api_enabled: "{{ matrix_synapse_admin_enabled }}"
  1035. matrix_nginx_proxy_proxy_matrix_client_redirect_root_uri_to_domain: "{{ matrix_server_fqn_element if matrix_client_element_enabled else '' }}"
  1036. matrix_nginx_proxy_proxy_matrix_enabled: true
  1037. matrix_nginx_proxy_proxy_element_enabled: "{{ matrix_client_element_enabled }}"
  1038. matrix_nginx_proxy_proxy_hydrogen_enabled: "{{ matrix_client_hydrogen_enabled }}"
  1039. matrix_nginx_proxy_proxy_cinny_enabled: "{{ matrix_client_cinny_enabled }}"
  1040. matrix_nginx_proxy_proxy_dimension_enabled: "{{ matrix_dimension_enabled }}"
  1041. matrix_nginx_proxy_proxy_bot_go_neb_enabled: "{{ matrix_bot_go_neb_enabled }}"
  1042. matrix_nginx_proxy_proxy_jitsi_enabled: "{{ matrix_jitsi_enabled }}"
  1043. matrix_nginx_proxy_proxy_grafana_enabled: "{{ matrix_grafana_enabled }}"
  1044. matrix_nginx_proxy_proxy_sygnal_enabled: "{{ matrix_sygnal_enabled }}"
  1045. matrix_nginx_proxy_proxy_matrix_corporal_api_enabled: "{{ matrix_corporal_enabled and matrix_corporal_http_api_enabled }}"
  1046. matrix_nginx_proxy_proxy_matrix_corporal_api_addr_with_container: "matrix-corporal:41081"
  1047. matrix_nginx_proxy_proxy_matrix_corporal_api_addr_sans_container: "127.0.0.1:41081"
  1048. matrix_nginx_proxy_proxy_matrix_identity_api_enabled: "{{ matrix_ma1sd_enabled }}"
  1049. matrix_nginx_proxy_proxy_matrix_identity_api_addr_with_container: "matrix-ma1sd:{{ matrix_ma1sd_container_port }}"
  1050. matrix_nginx_proxy_proxy_matrix_identity_api_addr_sans_container: "127.0.0.1:{{ matrix_ma1sd_container_port }}"
  1051. # By default, we do TLS termination for the Matrix Federation API (port 8448) at matrix-nginx-proxy.
  1052. # Unless this is handled there OR Synapse's federation listener port is disabled, we'll reverse-proxy.
  1053. matrix_nginx_proxy_proxy_matrix_federation_api_enabled: |-
  1054. {{
  1055. {
  1056. 'synapse': (matrix_synapse_federation_port_enabled and not matrix_synapse_tls_federation_listener_enabled),
  1057. 'dendrite': matrix_dendrite_federation_enabled,
  1058. }[matrix_homeserver_implementation]|bool
  1059. }}
  1060. matrix_nginx_proxy_proxy_matrix_federation_api_addr_with_container: "matrix-nginx-proxy:12088"
  1061. matrix_nginx_proxy_proxy_matrix_federation_api_addr_sans_container: "127.0.0.1:12088"
  1062. matrix_nginx_proxy_proxy_synapse_enabled: "{{ matrix_synapse_enabled }}"
  1063. matrix_nginx_proxy_proxy_synapse_client_api_addr_with_container: "matrix-synapse:{{ matrix_synapse_container_client_api_port }}"
  1064. matrix_nginx_proxy_proxy_synapse_client_api_addr_sans_container: "127.0.0.1:{{ matrix_synapse_container_client_api_port }}"
  1065. matrix_nginx_proxy_proxy_synapse_federation_api_addr_with_container: "matrix-synapse:{{matrix_synapse_container_federation_api_plain_port|string}}"
  1066. matrix_nginx_proxy_proxy_synapse_federation_api_addr_sans_container: "localhost:{{matrix_synapse_container_federation_api_plain_port|string}}"
  1067. matrix_nginx_proxy_proxy_dendrite_enabled: "{{ matrix_dendrite_enabled }}"
  1068. matrix_nginx_proxy_proxy_dendrite_client_api_addr_with_container: "matrix-dendrite:{{ matrix_dendrite_http_bind_port|string }}"
  1069. matrix_nginx_proxy_proxy_dendrite_client_api_addr_sans_container: "127.0.0.1:{{ matrix_dendrite_http_bind_port|string }}"
  1070. matrix_nginx_proxy_proxy_dendrite_federation_api_addr_with_container: "matrix-dendrite:{{ matrix_dendrite_http_bind_port|string }}"
  1071. matrix_nginx_proxy_proxy_dendrite_federation_api_addr_sans_container: "127.0.0.1:{{ matrix_dendrite_http_bind_port|string }}"
  1072. # When matrix-nginx-proxy is disabled, the actual port number that the vhost uses may begin to matter.
  1073. matrix_nginx_proxy_proxy_matrix_federation_port: "{{ matrix_federation_public_port }}"
  1074. matrix_nginx_proxy_container_federation_host_bind_port: "{{ matrix_federation_public_port }}"
  1075. # This used to be hooked to `matrix_synapse_metrics_enabled`, but we don't do it anymore.
  1076. # The fact that someone wishes to enable Synapse metrics does not necessarily mean they want to make them public.
  1077. # A local Prometheus can consume them over the container network.
  1078. matrix_nginx_proxy_proxy_synapse_metrics: false
  1079. matrix_nginx_proxy_proxy_synapse_metrics_addr_with_container: "matrix-synapse:{{ matrix_synapse_metrics_port }}"
  1080. matrix_nginx_proxy_proxy_synapse_metrics_addr_sans_container: "127.0.0.1:{{ matrix_synapse_metrics_port }}"
  1081. matrix_nginx_proxy_proxy_matrix_user_directory_search_enabled: "{{ matrix_ma1sd_enabled }}"
  1082. matrix_nginx_proxy_proxy_matrix_user_directory_search_addr_with_container: "{{ matrix_nginx_proxy_proxy_matrix_identity_api_addr_with_container }}"
  1083. matrix_nginx_proxy_proxy_matrix_user_directory_search_addr_sans_container: "{{ matrix_nginx_proxy_proxy_matrix_identity_api_addr_sans_container }}"
  1084. matrix_nginx_proxy_self_check_validate_certificates: "{{ false if matrix_ssl_retrieval_method == 'self-signed' else true }}"
  1085. # OCSP stapling does not make sense when self-signed certificates are used.
  1086. # See https://github.com/spantaleev/matrix-docker-ansible-deploy/issues/1073
  1087. # and https://github.com/spantaleev/matrix-docker-ansible-deploy/pull/1074
  1088. matrix_nginx_proxy_ocsp_stapling_enabled: "{{ matrix_ssl_retrieval_method != 'self-signed' }}"
  1089. matrix_nginx_proxy_synapse_presence_disabled: "{{ not matrix_synapse_presence_enabled }}"
  1090. matrix_nginx_proxy_synapse_workers_enabled: "{{ matrix_synapse_workers_enabled }}"
  1091. matrix_nginx_proxy_synapse_workers_list: "{{ matrix_synapse_workers_enabled_list }}"
  1092. matrix_nginx_proxy_synapse_generic_worker_client_server_locations: "{{ matrix_synapse_workers_generic_worker_client_server_endpoints }}"
  1093. matrix_nginx_proxy_synapse_generic_worker_federation_locations: "{{ matrix_synapse_workers_generic_worker_federation_endpoints }}"
  1094. matrix_nginx_proxy_synapse_media_repository_locations: "{{matrix_synapse_workers_media_repository_endpoints|default([]) }}"
  1095. matrix_nginx_proxy_synapse_user_dir_locations: "{{ matrix_synapse_workers_user_dir_endpoints|default([]) }}"
  1096. matrix_nginx_proxy_synapse_frontend_proxy_locations: "{{ matrix_synapse_workers_frontend_proxy_endpoints|default([]) }}"
  1097. matrix_nginx_proxy_proxy_synapse_workers_enabled_list: "{{ matrix_synapse_workers_enabled_list }}"
  1098. matrix_nginx_proxy_systemd_wanted_services_list: |
  1099. {{
  1100. (['matrix-synapse.service'] if matrix_synapse_enabled else [])
  1101. +
  1102. (['matrix-corporal.service'] if matrix_corporal_enabled else [])
  1103. +
  1104. (['matrix-ma1sd.service'] if matrix_ma1sd_enabled else [])
  1105. +
  1106. (['matrix-client-element.service'] if matrix_client_element_enabled else [])
  1107. }}
  1108. matrix_ssl_domains_to_obtain_certificates_for: |
  1109. {{
  1110. ([matrix_server_fqn_matrix])
  1111. +
  1112. ([matrix_server_fqn_element] if matrix_client_element_enabled else [])
  1113. +
  1114. ([matrix_nginx_proxy_proxy_riot_compat_redirect_hostname] if matrix_nginx_proxy_proxy_riot_compat_redirect_enabled else [])
  1115. +
  1116. ([matrix_server_fqn_hydrogen] if matrix_client_hydrogen_enabled else [])
  1117. +
  1118. ([matrix_server_fqn_cinny] if matrix_client_cinny_enabled else [])
  1119. +
  1120. ([matrix_server_fqn_dimension] if matrix_dimension_enabled else [])
  1121. +
  1122. ([matrix_server_fqn_bot_go_neb] if matrix_bot_go_neb_enabled else [])
  1123. +
  1124. ([matrix_server_fqn_jitsi] if matrix_jitsi_enabled else [])
  1125. +
  1126. ([matrix_server_fqn_grafana] if matrix_grafana_enabled else [])
  1127. +
  1128. ([matrix_server_fqn_sygnal] if matrix_sygnal_enabled else [])
  1129. +
  1130. ([matrix_domain] if matrix_nginx_proxy_base_domain_serving_enabled else [])
  1131. +
  1132. matrix_ssl_additional_domains_to_obtain_certificates_for
  1133. }}
  1134. matrix_ssl_architecture: "{{
  1135. {
  1136. 'amd64': 'amd64',
  1137. 'arm32': 'arm32v6',
  1138. 'arm64': 'arm64v8',
  1139. }[matrix_architecture]
  1140. }}"
  1141. matrix_ssl_pre_obtaining_required_service_name: "{{ 'matrix-dynamic-dns' if matrix_dynamic_dns_enabled else '' }}"
  1142. ######################################################################
  1143. #
  1144. # /matrix-nginx-proxy
  1145. #
  1146. ######################################################################
  1147. ######################################################################
  1148. #
  1149. # matrix-postgres
  1150. #
  1151. ######################################################################
  1152. matrix_postgres_enabled: true
  1153. matrix_postgres_architecture: "{{ matrix_architecture }}"
  1154. # We unset this if internal Postgres disabled, which will cascade to some other variables
  1155. # and tell users they need to set it (either here or in those variables).
  1156. matrix_postgres_connection_hostname: "{{ 'matrix-postgres' if matrix_postgres_enabled else '' }}"
  1157. matrix_postgres_pgloader_container_image_self_build: "{{ matrix_architecture != 'amd64' }}"
  1158. matrix_postgres_additional_databases: |
  1159. {{
  1160. ([{
  1161. 'name': matrix_synapse_database_database,
  1162. 'username': matrix_synapse_database_user,
  1163. 'password': matrix_synapse_database_password,
  1164. }] if (matrix_synapse_enabled and matrix_synapse_database_database != matrix_postgres_db_name and matrix_synapse_database_host == 'matrix-postgres') else [])
  1165. +
  1166. ([{
  1167. 'name': matrix_dendrite_naffka_database,
  1168. 'username': matrix_dendrite_database_user,
  1169. 'password': matrix_dendrite_database_password,
  1170. },{
  1171. 'name': matrix_dendrite_appservice_database,
  1172. 'username': matrix_dendrite_database_user,
  1173. 'password': matrix_dendrite_database_password,
  1174. },{
  1175. 'name': matrix_dendrite_federationsender_database,
  1176. 'username': matrix_dendrite_database_user,
  1177. 'password': matrix_dendrite_database_password,
  1178. },{
  1179. 'name': matrix_dendrite_keyserver_database,
  1180. 'username': matrix_dendrite_database_user,
  1181. 'password': matrix_dendrite_database_password,
  1182. },{
  1183. 'name': matrix_dendrite_mediaapi_database,
  1184. 'username': matrix_dendrite_database_user,
  1185. 'password': matrix_dendrite_database_password,
  1186. },{
  1187. 'name': matrix_dendrite_room_database,
  1188. 'username': matrix_dendrite_database_user,
  1189. 'password': matrix_dendrite_database_password,
  1190. },{
  1191. 'name': matrix_dendrite_singingkeyserver_database,
  1192. 'username': matrix_dendrite_database_user,
  1193. 'password': matrix_dendrite_database_password,
  1194. },{
  1195. 'name': matrix_dendrite_syncapi_database,
  1196. 'username': matrix_dendrite_database_user,
  1197. 'password': matrix_dendrite_database_password,
  1198. },{
  1199. 'name': matrix_dendrite_account_database,
  1200. 'username': matrix_dendrite_database_user,
  1201. 'password': matrix_dendrite_database_password,
  1202. },{
  1203. 'name': matrix_dendrite_device_database,
  1204. 'username': matrix_dendrite_database_user,
  1205. 'password': matrix_dendrite_database_password,
  1206. },{
  1207. 'name': matrix_dendrite_mscs_database,
  1208. 'username': matrix_dendrite_database_user,
  1209. 'password': matrix_dendrite_database_password,
  1210. }] if (matrix_dendrite_enabled and matrix_dendrite_database_hostname == 'matrix-postgres') else [])
  1211. +
  1212. ([{
  1213. 'name': matrix_ma1sd_database_name,
  1214. 'username': matrix_ma1sd_database_username,
  1215. 'password': matrix_ma1sd_database_password,
  1216. }] if (matrix_ma1sd_enabled and matrix_ma1sd_database_engine == 'postgres' and matrix_ma1sd_database_hostname == 'matrix-postgres') else [])
  1217. +
  1218. ([{
  1219. 'name': matrix_bot_matrix_reminder_bot_database_name,
  1220. 'username': matrix_bot_matrix_reminder_bot_database_username,
  1221. 'password': matrix_bot_matrix_reminder_bot_database_password,
  1222. }] 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 [])
  1223. +
  1224. ([{
  1225. 'name': matrix_bot_honoroit_database_name,
  1226. 'username': matrix_bot_honoroit_database_username,
  1227. 'password': matrix_bot_honoroit_database_password,
  1228. }] if (matrix_bot_honoroit_enabled and matrix_bot_honoroit_database_engine == 'postgres' and matrix_bot_honoroit_database_hostname == 'matrix-postgres') else [])
  1229. +
  1230. ([{
  1231. 'name': matrix_registration_database_name,
  1232. 'username': matrix_registration_database_username,
  1233. 'password': matrix_registration_database_password,
  1234. }] if (matrix_registration_enabled and matrix_registration_database_engine == 'postgres' and matrix_registration_database_hostname == 'matrix-postgres') else [])
  1235. +
  1236. ([{
  1237. 'name': matrix_appservice_discord_database_name,
  1238. 'username': matrix_appservice_discord_database_username,
  1239. 'password': matrix_appservice_discord_database_password,
  1240. }] if (matrix_appservice_discord_enabled and matrix_appservice_discord_database_engine == 'postgres' and matrix_appservice_discord_database_hostname == 'matrix-postgres') else [])
  1241. +
  1242. ([{
  1243. 'name': matrix_appservice_slack_database_name,
  1244. 'username': matrix_appservice_slack_database_username,
  1245. 'password': matrix_appservice_slack_database_password,
  1246. }] if (matrix_appservice_slack_enabled and matrix_appservice_slack_database_engine == 'postgres' and matrix_appservice_slack_database_hostname == 'matrix-postgres') else [])
  1247. +
  1248. ([{
  1249. 'name': matrix_appservice_irc_database_name,
  1250. 'username': matrix_appservice_irc_database_username,
  1251. 'password': matrix_appservice_irc_database_password,
  1252. }] if (matrix_appservice_irc_enabled and matrix_appservice_irc_database_engine == 'postgres' and matrix_appservice_irc_database_hostname == 'matrix-postgres') else [])
  1253. +
  1254. ([{
  1255. 'name': matrix_beeper_linkedin_database_name,
  1256. 'username': matrix_beeper_linkedin_database_username,
  1257. 'password': matrix_beeper_linkedin_database_password,
  1258. }] if (matrix_beeper_linkedin_enabled and matrix_beeper_linkedin_database_engine == 'postgres' and matrix_beeper_linkedin_database_hostname == 'matrix-postgres') else [])
  1259. +
  1260. ([{
  1261. 'name': matrix_mautrix_facebook_database_name,
  1262. 'username': matrix_mautrix_facebook_database_username,
  1263. 'password': matrix_mautrix_facebook_database_password,
  1264. }] if (matrix_mautrix_facebook_enabled and matrix_mautrix_facebook_database_engine == 'postgres' and matrix_mautrix_facebook_database_hostname == 'matrix-postgres') else [])
  1265. +
  1266. ([{
  1267. 'name': matrix_mautrix_hangouts_database_name,
  1268. 'username': matrix_mautrix_hangouts_database_username,
  1269. 'password': matrix_mautrix_hangouts_database_password,
  1270. }] if (matrix_mautrix_hangouts_enabled and matrix_mautrix_hangouts_database_engine == 'postgres' and matrix_mautrix_hangouts_database_hostname == 'matrix-postgres') else [])
  1271. +
  1272. ([{
  1273. 'name': matrix_mautrix_googlechat_database_name,
  1274. 'username': matrix_mautrix_googlechat_database_username,
  1275. 'password': matrix_mautrix_googlechat_database_password,
  1276. }] if (matrix_mautrix_googlechat_enabled and matrix_mautrix_googlechat_database_engine == 'postgres' and matrix_mautrix_googlechat_database_hostname == 'matrix-postgres') else [])
  1277. +
  1278. ([{
  1279. 'name': matrix_mautrix_instagram_database_name,
  1280. 'username': matrix_mautrix_instagram_database_username,
  1281. 'password': matrix_mautrix_instagram_database_password,
  1282. }] if (matrix_mautrix_instagram_enabled and matrix_mautrix_instagram_database_engine == 'postgres' and matrix_mautrix_instagram_database_hostname == 'matrix-postgres') else [])
  1283. +
  1284. ([{
  1285. 'name': matrix_mautrix_signal_database_name,
  1286. 'username': matrix_mautrix_signal_database_username,
  1287. 'password': matrix_mautrix_signal_database_password,
  1288. }] if (matrix_mautrix_signal_enabled and matrix_mautrix_signal_database_engine == 'postgres' and matrix_mautrix_signal_database_hostname == 'matrix-postgres') else [])
  1289. +
  1290. ([{
  1291. 'name': matrix_mautrix_telegram_database_name,
  1292. 'username': matrix_mautrix_telegram_database_username,
  1293. 'password': matrix_mautrix_telegram_database_password,
  1294. }] if (matrix_mautrix_telegram_enabled and matrix_mautrix_telegram_database_engine == 'postgres' and matrix_mautrix_telegram_database_hostname == 'matrix-postgres') else [])
  1295. +
  1296. ([{
  1297. 'name': matrix_mautrix_twitter_database_name,
  1298. 'username': matrix_mautrix_twitter_database_username,
  1299. 'password': matrix_mautrix_twitter_database_password,
  1300. }] if (matrix_mautrix_twitter_enabled and matrix_mautrix_twitter_database_engine == 'postgres' and matrix_mautrix_twitter_database_hostname == 'matrix-postgres') else [])
  1301. +
  1302. ([{
  1303. 'name': matrix_mautrix_whatsapp_database_name,
  1304. 'username': matrix_mautrix_whatsapp_database_username,
  1305. 'password': matrix_mautrix_whatsapp_database_password,
  1306. }] if (matrix_mautrix_whatsapp_enabled and matrix_mautrix_whatsapp_database_engine == 'postgres' and matrix_mautrix_whatsapp_database_hostname == 'matrix-postgres') else [])
  1307. +
  1308. ([{
  1309. 'name': matrix_mx_puppet_skype_database_name,
  1310. 'username': matrix_mx_puppet_skype_database_username,
  1311. 'password': matrix_mx_puppet_skype_database_password,
  1312. }] if (matrix_mx_puppet_skype_enabled and matrix_mx_puppet_skype_database_engine == 'postgres' and matrix_mx_puppet_skype_database_hostname == 'matrix-postgres') else [])
  1313. +
  1314. ([{
  1315. 'name': matrix_mx_puppet_slack_database_name,
  1316. 'username': matrix_mx_puppet_slack_database_username,
  1317. 'password': matrix_mx_puppet_slack_database_password,
  1318. }] if (matrix_mx_puppet_slack_enabled and matrix_mx_puppet_slack_database_engine == 'postgres' and matrix_mx_puppet_slack_database_hostname == 'matrix-postgres') else [])
  1319. +
  1320. ([{
  1321. 'name': matrix_mx_puppet_twitter_database_name,
  1322. 'username': matrix_mx_puppet_twitter_database_username,
  1323. 'password': matrix_mx_puppet_twitter_database_password,
  1324. }] if (matrix_mx_puppet_twitter_enabled and matrix_mx_puppet_twitter_database_engine == 'postgres' and matrix_mx_puppet_twitter_database_hostname == 'matrix-postgres') else [])
  1325. +
  1326. ([{
  1327. 'name': matrix_mx_puppet_instagram_database_name,
  1328. 'username': matrix_mx_puppet_instagram_database_username,
  1329. 'password': matrix_mx_puppet_instagram_database_password,
  1330. }] if (matrix_mx_puppet_instagram_enabled and matrix_mx_puppet_instagram_database_engine == 'postgres' and matrix_mx_puppet_instagram_database_hostname == 'matrix-postgres') else [])
  1331. +
  1332. ([{
  1333. 'name': matrix_mx_puppet_discord_database_name,
  1334. 'username': matrix_mx_puppet_discord_database_username,
  1335. 'password': matrix_mx_puppet_discord_database_password,
  1336. }] if (matrix_mx_puppet_discord_enabled and matrix_mx_puppet_discord_database_engine == 'postgres' and matrix_mx_puppet_discord_database_hostname == 'matrix-postgres') else [])
  1337. +
  1338. ([{
  1339. 'name': matrix_mx_puppet_steam_database_name,
  1340. 'username': matrix_mx_puppet_steam_database_username,
  1341. 'password': matrix_mx_puppet_steam_database_password,
  1342. }] if (matrix_mx_puppet_steam_enabled and matrix_mx_puppet_steam_database_engine == 'postgres' and matrix_mx_puppet_steam_database_hostname == 'matrix-postgres') else [])
  1343. +
  1344. ([{
  1345. 'name': matrix_mx_puppet_groupme_database_name,
  1346. 'username': matrix_mx_puppet_groupme_database_username,
  1347. 'password': matrix_mx_puppet_groupme_database_password,
  1348. }] if (matrix_mx_puppet_groupme_enabled and matrix_mx_puppet_groupme_database_engine == 'postgres' and matrix_mx_puppet_groupme_database_hostname == 'matrix-postgres') else [])
  1349. +
  1350. ([{
  1351. 'name': matrix_dimension_database_name,
  1352. 'username': matrix_dimension_database_username,
  1353. 'password': matrix_dimension_database_password,
  1354. }] if (matrix_dimension_enabled and matrix_dimension_database_engine == 'postgres' and matrix_dimension_database_hostname == 'matrix-postgres') else [])
  1355. +
  1356. ([{
  1357. 'name': matrix_etherpad_database_name,
  1358. 'username': matrix_etherpad_database_username,
  1359. 'password': matrix_etherpad_database_password,
  1360. }] if (matrix_etherpad_enabled and matrix_etherpad_database_engine == 'postgres' and matrix_etherpad_database_hostname == 'matrix-postgres') else [])
  1361. +
  1362. ([{
  1363. 'name': matrix_prometheus_postgres_exporter_database_name,
  1364. 'username': matrix_prometheus_postgres_exporter_database_username,
  1365. 'password': matrix_prometheus_postgres_exporter_database_password,
  1366. }] if (matrix_prometheus_postgres_exporter_enabled and matrix_prometheus_postgres_exporter_database_hostname == 'matrix-postgres') else [])
  1367. }}
  1368. matrix_postgres_import_roles_to_ignore: |
  1369. {{
  1370. [matrix_postgres_connection_username]
  1371. +
  1372. matrix_postgres_additional_databases|map(attribute='username')|list
  1373. }}
  1374. matrix_postgres_import_databases_to_ignore: |
  1375. {{
  1376. [matrix_postgres_db_name]
  1377. +
  1378. matrix_postgres_additional_databases|map(attribute='name')|list
  1379. }}
  1380. ######################################################################
  1381. #
  1382. # /matrix-postgres
  1383. #
  1384. ######################################################################
  1385. ######################################################################
  1386. #
  1387. # matrix-sygnal
  1388. #
  1389. ######################################################################
  1390. # Most people don't need their own push-server, because they also need their own app to utilize it from.
  1391. matrix_sygnal_enabled: false
  1392. # If someone instals Prometheus via the playbook, they most likely wish to monitor Sygnal.
  1393. matrix_sygnal_metrics_prometheus_enabled: "{{ matrix_prometheus_enabled }}"
  1394. matrix_sygnal_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:6000' }}"
  1395. ######################################################################
  1396. #
  1397. # /matrix-sygnal
  1398. #
  1399. ######################################################################
  1400. ######################################################################
  1401. #
  1402. # matrix-redis
  1403. #
  1404. ######################################################################
  1405. matrix_redis_enabled: "{{ matrix_synapse_workers_enabled }}"
  1406. ######################################################################
  1407. #
  1408. # /matrix-redis
  1409. #
  1410. ######################################################################
  1411. ######################################################################
  1412. #
  1413. # matrix-client-element
  1414. #
  1415. ######################################################################
  1416. # By default, this playbook installs the Element web UI on the `matrix_server_fqn_element` domain.
  1417. # If you wish to connect to your Matrix server by other means, you may wish to disable this.
  1418. matrix_client_element_enabled: true
  1419. matrix_client_element_container_image_self_build: "{{ matrix_architecture != 'amd64' }}"
  1420. # Normally, matrix-nginx-proxy is enabled and nginx can reach Element over the container network.
  1421. # If matrix-nginx-proxy is not enabled, or you otherwise have a need for it, you can expose
  1422. # the Element HTTP port to the local host.
  1423. matrix_client_element_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:8765' }}"
  1424. matrix_client_element_default_hs_url: "{{ matrix_homeserver_url }}"
  1425. matrix_client_element_default_is_url: "{{ matrix_identity_server_url }}"
  1426. # Use Dimension if enabled, otherwise fall back to Scalar
  1427. matrix_client_element_integrations_ui_url: "{{ matrix_dimension_integrations_ui_url if matrix_dimension_enabled else 'https://scalar.vector.im/' }}"
  1428. matrix_client_element_integrations_rest_url: "{{ matrix_dimension_integrations_rest_url if matrix_dimension_enabled else 'https://scalar.vector.im/api' }}"
  1429. matrix_client_element_integrations_widgets_urls: "{{ matrix_dimension_integrations_widgets_urls if matrix_dimension_enabled else ['https://scalar.vector.im/api'] }}"
  1430. 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' }}"
  1431. matrix_client_element_self_check_validate_certificates: "{{ false if matrix_ssl_retrieval_method == 'self-signed' else true }}"
  1432. matrix_client_element_registration_enabled: "{{ matrix_synapse_enable_registration }}"
  1433. matrix_client_element_enable_presence_by_hs_url: |
  1434. {{
  1435. none
  1436. if matrix_synapse_presence_enabled
  1437. else {matrix_client_element_default_hs_url: false}
  1438. }}
  1439. matrix_client_element_welcome_user_id: ~
  1440. matrix_client_element_jitsi_preferredDomain: "{{ matrix_server_fqn_jitsi if matrix_jitsi_enabled else '' }}"
  1441. ######################################################################
  1442. #
  1443. # /matrix-client-element
  1444. #
  1445. ######################################################################
  1446. ######################################################################
  1447. #
  1448. # matrix-client-hydrogen
  1449. #
  1450. ######################################################################
  1451. matrix_client_hydrogen_enabled: false
  1452. # Normally, matrix-nginx-proxy is enabled and nginx can reach Hydrogen over the container network.
  1453. # If matrix-nginx-proxy is not enabled, or you otherwise have a need for it, you can expose
  1454. # the HTTP port to the local host.
  1455. matrix_client_hydrogen_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:8768' }}"
  1456. matrix_client_hydrogen_default_hs_url: "{{ matrix_homeserver_url }}"
  1457. matrix_client_hydrogen_self_check_validate_certificates: "{{ false if matrix_ssl_retrieval_method == 'self-signed' else true }}"
  1458. ######################################################################
  1459. #
  1460. # /matrix-client-hydrogen
  1461. #
  1462. ######################################################################
  1463. ######################################################################
  1464. #
  1465. # matrix-client-cinny
  1466. #
  1467. ######################################################################
  1468. matrix_client_cinny_enabled: false
  1469. matrix_client_cinny_container_image_self_build: "{{ matrix_architecture != 'amd64' }}"
  1470. # Normally, matrix-nginx-proxy is enabled and nginx can reach Cinny over the container network.
  1471. # If matrix-nginx-proxy is not enabled, or you otherwise have a need for it, you can expose
  1472. # the HTTP port to the local host.
  1473. matrix_client_cinny_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:8080' }}"
  1474. matrix_client_cinny_default_hs_url: "{{ matrix_homeserver_url }}"
  1475. matrix_client_cinny_self_check_validate_certificates: "{{ false if matrix_ssl_retrieval_method == 'self-signed' else true }}"
  1476. ######################################################################
  1477. #
  1478. # /matrix-client-cinny
  1479. #
  1480. ######################################################################
  1481. ######################################################################
  1482. #
  1483. # matrix-synapse
  1484. #
  1485. ######################################################################
  1486. matrix_synapse_enabled: "{{ matrix_homeserver_implementation == 'synapse' }}"
  1487. matrix_synapse_container_image_self_build: "{{ matrix_architecture not in ['arm64', 'amd64'] }}"
  1488. # When ma1sd is enabled, we can use it to validate email addresses and phone numbers.
  1489. # Synapse can validate email addresses by itself as well, but it's probably not what we want by default when we have an identity server.
  1490. matrix_synapse_account_threepid_delegates_email: "{{ 'http://matrix-ma1sd:' + matrix_ma1sd_container_port|string if matrix_ma1sd_enabled else '' }}"
  1491. matrix_synapse_account_threepid_delegates_msisdn: "{{ 'http://matrix-ma1sd:' + matrix_ma1sd_container_port|string if matrix_ma1sd_enabled else '' }}"
  1492. # Normally, matrix-nginx-proxy is enabled and nginx can reach Synapse over the container network.
  1493. # If matrix-nginx-proxy is not enabled, or you otherwise have a need for it,
  1494. # you can expose Synapse's ports to the host.
  1495. #
  1496. # For exposing the Matrix Client API's port (plain HTTP) to the local host.
  1497. matrix_synapse_container_client_api_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:' + matrix_synapse_container_client_api_port|string }}"
  1498. #
  1499. # For exposing the Matrix Federation API's plain port (plain HTTP) to the local host.
  1500. matrix_synapse_container_federation_api_plain_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:' + matrix_synapse_container_federation_api_plain_port|string }}"
  1501. #
  1502. # For exposing the Matrix Federation API's TLS port (HTTPS) to the internet on all network interfaces.
  1503. 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 '' }}"
  1504. #
  1505. # For exposing the Synapse Metrics API's port (plain HTTP) to the local host.
  1506. 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 '' }}"
  1507. #
  1508. # For exposing the Synapse Manhole port (plain HTTP) to the local host.
  1509. matrix_synapse_container_manhole_api_host_bind_port: "{{ '127.0.0.1:9000' if matrix_synapse_manhole_enabled else '' }}"
  1510. #
  1511. # For exposing the Synapse worker (and metrics) ports to the local host.
  1512. matrix_synapse_workers_container_host_bind_address: "{{ '127.0.0.1' if (matrix_synapse_workers_enabled and not matrix_nginx_proxy_enabled) else '' }}"
  1513. matrix_synapse_database_password: "{{ '%s' | format(matrix_synapse_macaroon_secret_key) | password_hash('sha512', 'synapse.db') | to_uuid }}"
  1514. # We do not enable TLS in Synapse by default.
  1515. # TLS is handled by the matrix-nginx-proxy, which proxies the requests to Synapse.
  1516. matrix_synapse_tls_federation_listener_enabled: false
  1517. matrix_synapse_tls_certificate_path: ~
  1518. matrix_synapse_tls_private_key_path: ~
  1519. matrix_synapse_federation_port_openid_resource_required: "{{ not matrix_synapse_federation_enabled and (matrix_dimension_enabled or matrix_ma1sd_enabled) }}"
  1520. # If someone instals Prometheus via the playbook, they most likely wish to monitor Synapse.
  1521. matrix_synapse_metrics_enabled: "{{ matrix_prometheus_enabled }}"
  1522. matrix_synapse_email_enabled: "{{ matrix_mailer_enabled }}"
  1523. matrix_synapse_email_smtp_host: "matrix-mailer"
  1524. matrix_synapse_email_smtp_port: 8025
  1525. matrix_synapse_email_smtp_require_transport_security: false
  1526. matrix_synapse_email_notif_from: "Matrix <{{ matrix_mailer_sender_address }}>"
  1527. # Even if TURN doesn't support TLS (it does by default),
  1528. # it doesn't hurt to try a secure connection anyway.
  1529. #
  1530. # When Let's Encrypt certificates are used (the default case),
  1531. # we don't enable `turns` endpoints, because WebRTC in Element can't talk to them.
  1532. # Learn more here: https://github.com/spantaleev/matrix-docker-ansible-deploy/pull/1145
  1533. matrix_synapse_turn_uris: |
  1534. {{
  1535. []
  1536. +
  1537. [
  1538. 'turns:' + matrix_server_fqn_matrix + '?transport=udp',
  1539. 'turns:' + matrix_server_fqn_matrix + '?transport=tcp',
  1540. ] if matrix_coturn_enabled and matrix_coturn_tls_enabled and matrix_ssl_retrieval_method != 'lets-encrypt' else []
  1541. +
  1542. [
  1543. 'turn:' + matrix_server_fqn_matrix + '?transport=udp',
  1544. 'turn:' + matrix_server_fqn_matrix + '?transport=tcp',
  1545. ] if matrix_coturn_enabled else []
  1546. }}
  1547. matrix_synapse_turn_shared_secret: "{{ matrix_coturn_turn_static_auth_secret if matrix_coturn_enabled else '' }}"
  1548. matrix_synapse_self_check_validate_certificates: "{{ false if matrix_ssl_retrieval_method == 'self-signed' else true }}"
  1549. matrix_synapse_systemd_required_services_list: |
  1550. {{
  1551. (['docker.service'])
  1552. +
  1553. (['matrix-postgres.service'] if matrix_postgres_enabled else [])
  1554. +
  1555. (['matrix-goofys'] if matrix_s3_media_store_enabled else [])
  1556. }}
  1557. matrix_synapse_systemd_wanted_services_list: |
  1558. {{
  1559. (['matrix-coturn.service'] if matrix_coturn_enabled else [])
  1560. +
  1561. (['matrix-mailer.service'] if matrix_mailer_enabled else [])
  1562. }}
  1563. # Synapse workers (used for parallel load-scaling) need Redis for IPC.
  1564. matrix_synapse_redis_enabled: "{{ matrix_redis_enabled }}"
  1565. matrix_synapse_redis_host: "{{ 'matrix-redis' if matrix_redis_enabled else '' }}"
  1566. matrix_synapse_redis_password: "{{ matrix_redis_connection_password if matrix_redis_enabled else '' }}"
  1567. ######################################################################
  1568. #
  1569. # /matrix-synapse
  1570. #
  1571. ######################################################################
  1572. ######################################################################
  1573. #
  1574. # matrix-synapse-admin
  1575. #
  1576. ######################################################################
  1577. matrix_synapse_admin_enabled: false
  1578. # Normally, matrix-nginx-proxy is enabled and nginx can reach Synapse Admin over the container network.
  1579. # If matrix-nginx-proxy is not enabled, or you otherwise have a need for it, you can expose
  1580. # Synapse Admin's HTTP port to the local host.
  1581. matrix_synapse_admin_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:8766' }}"
  1582. matrix_synapse_admin_container_image_self_build: "{{ matrix_architecture != 'amd64' }}"
  1583. ######################################################################
  1584. #
  1585. # /matrix-synapse-admin
  1586. #
  1587. ######################################################################
  1588. ######################################################################
  1589. #
  1590. # matrix-prometheus-node-exporter
  1591. #
  1592. ######################################################################
  1593. matrix_prometheus_node_exporter_enabled: false
  1594. ######################################################################
  1595. #
  1596. # /matrix-prometheus-node-exporter
  1597. #
  1598. ######################################################################
  1599. ######################################################################
  1600. #
  1601. # matrix-prometheus
  1602. #
  1603. ######################################################################
  1604. matrix_prometheus_enabled: false
  1605. # Normally, matrix-nginx-proxy is enabled and nginx can reach Prometheus over the container network.
  1606. # If matrix-nginx-proxy is not enabled, or you otherwise have a need for it, you can expose
  1607. # Prometheus' HTTP port to the local host.
  1608. matrix_prometheus_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:9090' }}"
  1609. matrix_prometheus_scraper_synapse_enabled: "{{ matrix_synapse_enabled and matrix_synapse_metrics_enabled }}"
  1610. matrix_prometheus_scraper_synapse_targets: ['matrix-synapse:{{ matrix_synapse_metrics_port }}']
  1611. matrix_prometheus_scraper_synapse_workers_enabled_list: "{{ matrix_synapse_workers_enabled_list }}"
  1612. matrix_prometheus_scraper_synapse_rules_synapse_tag: "{{ matrix_synapse_docker_image_tag }}"
  1613. matrix_prometheus_scraper_node_enabled: "{{ matrix_prometheus_node_exporter_enabled }}"
  1614. matrix_prometheus_scraper_node_targets: "{{ ['matrix-prometheus-node-exporter:9100'] if matrix_prometheus_node_exporter_enabled else [] }}"
  1615. matrix_prometheus_scraper_postgres_enabled: "{{ matrix_prometheus_postgres_exporter_enabled }}"
  1616. matrix_prometheus_scraper_postgres_targets: "{{ ['matrix-prometheus-postgres-exporter:'+ matrix_prometheus_postgres_exporter_port|string] if matrix_prometheus_scraper_postgres_enabled else [] }}"
  1617. ######################################################################
  1618. #
  1619. # /matrix-prometheus
  1620. #
  1621. ######################################################################
  1622. ######################################################################
  1623. #
  1624. # matrix-prometheus-postgres-exporter
  1625. #
  1626. ######################################################################
  1627. matrix_prometheus_postgres_exporter_enabled: false
  1628. matrix_prometheus_postgres_exporter_database_password: "{{ '%s' | format(matrix_synapse_macaroon_secret_key) | password_hash('sha512', 'prometheus.pg.db') | to_uuid }}"
  1629. matrix_prometheus_postgres_exporter_systemd_required_services_list: |
  1630. {{
  1631. ['docker.service']
  1632. +
  1633. (['matrix-postgres.service'] if matrix_postgres_enabled else [])
  1634. }}
  1635. ######################################################################
  1636. #
  1637. # /matrix-prometheus-postgres-exporter
  1638. #
  1639. ######################################################################
  1640. ######################################################################
  1641. #
  1642. # matrix-grafana
  1643. #
  1644. ######################################################################
  1645. matrix_grafana_enabled: false
  1646. # Normally, matrix-nginx-proxy is enabled and nginx can reach Grafana over the container network.
  1647. # If matrix-nginx-proxy is not enabled, or you otherwise have a need for it, you can expose
  1648. # Grafana's HTTP port to the local host.
  1649. matrix_grafana_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:3000' }}"
  1650. matrix_grafana_dashboard_download_urls_all: |
  1651. {{
  1652. matrix_grafana_dashboard_download_urls
  1653. +
  1654. (matrix_prometheus_postgres_exporter_dashboard_urls if matrix_prometheus_postgres_exporter_enabled else [])
  1655. }}
  1656. ######################################################################
  1657. #
  1658. # /matrix-grafana
  1659. #
  1660. ######################################################################
  1661. ######################################################################
  1662. #
  1663. # matrix-registration
  1664. #
  1665. ######################################################################
  1666. matrix_registration_enabled: false
  1667. # Normally, matrix-nginx-proxy is enabled and nginx can reach matrix-registration over the container network.
  1668. # If matrix-nginx-proxy is not enabled, or you otherwise have a need for it, you can expose
  1669. # matrix-registration's HTTP port to the local host.
  1670. matrix_registration_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:8767' }}"
  1671. matrix_registration_riot_instance: "{{ ('https://' + matrix_server_fqn_element) if matrix_client_element_enabled else 'https://riot.im/app/' }}"
  1672. matrix_registration_shared_secret: "{{ matrix_synapse_registration_shared_secret if matrix_synapse_enabled else '' }}"
  1673. matrix_registration_server_location: "{{ matrix_homeserver_container_url }}"
  1674. matrix_registration_api_validate_certs: "{{ false if matrix_ssl_retrieval_method == 'self-signed' else true }}"
  1675. matrix_registration_container_image_self_build: "{{ matrix_architecture != 'amd64' }}"
  1676. matrix_registration_systemd_required_services_list: |
  1677. {{
  1678. ['docker.service']
  1679. +
  1680. (['matrix-postgres.service'] if matrix_postgres_enabled else [])
  1681. }}
  1682. # Postgres is the default, except if not using `matrix_postgres` (internal postgres)
  1683. matrix_registration_database_engine: "{{ 'postgres' if matrix_postgres_enabled else 'sqlite' }}"
  1684. matrix_registration_database_password: "{{ '%s' | format(matrix_synapse_macaroon_secret_key) | password_hash('sha512', 'mx.registr.db') | to_uuid }}"
  1685. ######################################################################
  1686. #
  1687. # /matrix-registration
  1688. #
  1689. ######################################################################
  1690. ######################################################################
  1691. #
  1692. # matrix-postgres-backup
  1693. #
  1694. ######################################################################
  1695. matrix_postgres_backup_connection_hostname: "{{ matrix_postgres_connection_hostname }}"
  1696. matrix_postgres_backup_connection_port: "{{ matrix_postgres_connection_port }}"
  1697. matrix_postgres_backup_connection_username: "{{ matrix_postgres_connection_username }}"
  1698. matrix_postgres_backup_connection_password: "{{ matrix_postgres_connection_password }}"
  1699. matrix_postgres_backup_postgres_data_path: "{{ matrix_postgres_data_path if matrix_postgres_enabled else '' }}"
  1700. # 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
  1701. matrix_postgres_backup_databases: |
  1702. {{
  1703. (([{
  1704. 'name': matrix_synapse_database_database
  1705. }] if (matrix_synapse_enabled and matrix_synapse_database_database == matrix_postgres_db_name and matrix_synapse_database_host == 'matrix-postgres') else [])
  1706. +
  1707. matrix_postgres_additional_databases)|map(attribute='name')|list
  1708. }}
  1709. ######################################################################
  1710. #
  1711. # /matrix-postgres-backup
  1712. #
  1713. ######################################################################
  1714. ######################################################################
  1715. #
  1716. # matrix-dendrite
  1717. #
  1718. ######################################################################
  1719. matrix_dendrite_enabled: "{{ matrix_homeserver_implementation == 'dendrite' }}"
  1720. # Normally, matrix-nginx-proxy is enabled and nginx can reach Dendrite over the container network.
  1721. # If matrix-nginx-proxy is not enabled, or you otherwise have a need for it,
  1722. # you can expose Dendrite's ports to the host.
  1723. #
  1724. # For exposing Dendrite's plain HTTP server to the local host.
  1725. matrix_dendrite_container_http_host_bind_address: "{{ '' if matrix_nginx_proxy_enabled else ('127.0.0.1:' + matrix_dendrite_http_bind_port|string) }}"
  1726. #
  1727. # For exposing Dendrite's HTTPS server to the local host.
  1728. 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) }}"
  1729. matrix_dendrite_registration_shared_secret: "{{ matrix_dendrite_generic_secret_key | password_hash('sha512', 'dendrite.rss') | to_uuid }}"
  1730. matrix_dendrite_database_password: "{{ matrix_dendrite_generic_secret_key | password_hash('sha512', 'dendrite.db') | to_uuid }}"
  1731. # Even if TURN doesn't support TLS (it does by default),
  1732. # it doesn't hurt to try a secure connection anyway.
  1733. matrix_dendrite_turn_uris: |
  1734. {{
  1735. [
  1736. 'turns:' + matrix_server_fqn_matrix + '?transport=udp',
  1737. 'turns:' + matrix_server_fqn_matrix + '?transport=tcp',
  1738. 'turn:' + matrix_server_fqn_matrix + '?transport=udp',
  1739. 'turn:' + matrix_server_fqn_matrix + '?transport=tcp',
  1740. ]
  1741. if matrix_coturn_enabled
  1742. else []
  1743. }}
  1744. matrix_dendrite_turn_shared_secret: "{{ matrix_coturn_turn_static_auth_secret if matrix_coturn_enabled else '' }}"
  1745. matrix_dendrite_disable_tls_validation: "{{ true if matrix_ssl_retrieval_method == 'self-signed' else false }}"
  1746. matrix_dendrite_self_check_validate_certificates: "{{ false if matrix_ssl_retrieval_method == 'self-signed' else true }}"
  1747. matrix_dendrite_trusted_id_servers: "{{ [matrix_server_fqn_matrix] if matrix_ma1sd_enabled else ['matrix.org', 'vector.im'] }}"
  1748. matrix_dendrite_systemd_required_services_list: |
  1749. {{
  1750. (['docker.service'])
  1751. +
  1752. (['matrix-postgres.service'] if matrix_postgres_enabled else [])
  1753. +
  1754. (['matrix-goofys'] if matrix_s3_media_store_enabled else [])
  1755. }}
  1756. matrix_dendrite_systemd_wanted_services_list: |
  1757. {{
  1758. (['matrix-coturn.service'] if matrix_coturn_enabled else [])
  1759. }}
  1760. ######################################################################
  1761. #
  1762. # /matrix-dendrite
  1763. #
  1764. ######################################################################