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

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