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

2147 строки
93 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: |-
  980. {{
  981. {
  982. 'synapse': matrix_synapse_max_upload_size_mb,
  983. 'dendrite': (matrix_dendrite_max_file_size_bytes / 1024 / 1024) | round,
  984. }[matrix_homeserver_implementation]|int
  985. }}
  986. matrix_nginx_proxy_proxy_matrix_client_api_forwarded_location_synapse_admin_api_enabled: "{{ matrix_synapse_admin_enabled }}"
  987. matrix_nginx_proxy_proxy_matrix_client_redirect_root_uri_to_domain: "{{ matrix_server_fqn_element if matrix_client_element_enabled else '' }}"
  988. matrix_nginx_proxy_proxy_matrix_enabled: true
  989. matrix_nginx_proxy_proxy_element_enabled: "{{ matrix_client_element_enabled }}"
  990. matrix_nginx_proxy_proxy_hydrogen_enabled: "{{ matrix_client_hydrogen_enabled }}"
  991. matrix_nginx_proxy_proxy_dimension_enabled: "{{ matrix_dimension_enabled }}"
  992. matrix_nginx_proxy_proxy_bot_go_neb_enabled: "{{ matrix_bot_go_neb_enabled }}"
  993. matrix_nginx_proxy_proxy_jitsi_enabled: "{{ matrix_jitsi_enabled }}"
  994. matrix_nginx_proxy_proxy_grafana_enabled: "{{ matrix_grafana_enabled }}"
  995. matrix_nginx_proxy_proxy_sygnal_enabled: "{{ matrix_sygnal_enabled }}"
  996. matrix_nginx_proxy_proxy_matrix_corporal_api_enabled: "{{ matrix_corporal_enabled and matrix_corporal_http_api_enabled }}"
  997. matrix_nginx_proxy_proxy_matrix_corporal_api_addr_with_container: "matrix-corporal:41081"
  998. matrix_nginx_proxy_proxy_matrix_corporal_api_addr_sans_container: "127.0.0.1:41081"
  999. matrix_nginx_proxy_proxy_matrix_identity_api_enabled: "{{ matrix_ma1sd_enabled }}"
  1000. matrix_nginx_proxy_proxy_matrix_identity_api_addr_with_container: "matrix-ma1sd:{{ matrix_ma1sd_container_port }}"
  1001. matrix_nginx_proxy_proxy_matrix_identity_api_addr_sans_container: "127.0.0.1:{{ matrix_ma1sd_container_port }}"
  1002. # By default, we do TLS termination for the Matrix Federation API (port 8448) at matrix-nginx-proxy.
  1003. # Unless this is handled there OR Synapse's federation listener port is disabled, we'll reverse-proxy.
  1004. matrix_nginx_proxy_proxy_matrix_federation_api_enabled: |-
  1005. {{
  1006. {
  1007. 'synapse': (matrix_synapse_federation_port_enabled and not matrix_synapse_tls_federation_listener_enabled),
  1008. 'dendrite': matrix_dendrite_federation_enabled,
  1009. }[matrix_homeserver_implementation]|bool
  1010. }}
  1011. matrix_nginx_proxy_proxy_matrix_federation_api_addr_with_container: "matrix-nginx-proxy:12088"
  1012. matrix_nginx_proxy_proxy_matrix_federation_api_addr_sans_container: "127.0.0.1:12088"
  1013. matrix_nginx_proxy_proxy_synapse_enabled: "{{ matrix_synapse_enabled }}"
  1014. matrix_nginx_proxy_proxy_synapse_client_api_addr_with_container: "matrix-synapse:{{ matrix_synapse_container_client_api_port }}"
  1015. matrix_nginx_proxy_proxy_synapse_client_api_addr_sans_container: "127.0.0.1:{{ matrix_dendrite_container_client_api_port }}"
  1016. matrix_nginx_proxy_proxy_synapse_federation_api_addr_with_container: "matrix-synapse:{{matrix_synapse_container_federation_api_plain_port|string}}"
  1017. matrix_nginx_proxy_proxy_synapse_federation_api_addr_sans_container: "localhost:{{matrix_synapse_container_federation_api_plain_port|string}}"
  1018. matrix_nginx_proxy_proxy_dendrite_enabled: "{{ matrix_dendrite_enabled }}"
  1019. matrix_nginx_proxy_proxy_dendrite_client_api_addr_with_container: "matrix-dendrite:{{ matrix_dendrite_container_client_api_port }}"
  1020. matrix_nginx_proxy_proxy_dendrite_client_api_addr_sans_container: "127.0.0.1:{{ matrix_synapse_container_client_api_port }}"
  1021. matrix_nginx_proxy_proxy_dendrite_federation_api_addr_with_container: "matrix-dendrite:{{ matrix_dendrite_container_federation_api_plain_port|string }}"
  1022. matrix_nginx_proxy_proxy_dendrite_federation_api_addr_sans_container: "127.0.0.1:{{ matrix_dendrite_container_federation_api_plain_port|string }}"
  1023. # When matrix-nginx-proxy is disabled, the actual port number that the vhost uses may begin to matter.
  1024. matrix_nginx_proxy_proxy_matrix_federation_port: "{{ matrix_federation_public_port }}"
  1025. matrix_nginx_proxy_container_federation_host_bind_port: "{{ matrix_federation_public_port }}"
  1026. # This used to be hooked to `matrix_synapse_metrics_enabled`, but we don't do it anymore.
  1027. # The fact that someone wishes to enable Synapse metrics does not necessarily mean they want to make them public.
  1028. # A local Prometheus can consume them over the container network.
  1029. matrix_nginx_proxy_proxy_synapse_metrics: false
  1030. matrix_nginx_proxy_proxy_synapse_metrics_addr_with_container: "matrix-synapse:{{ matrix_synapse_metrics_port }}"
  1031. matrix_nginx_proxy_proxy_synapse_metrics_addr_sans_container: "127.0.0.1:{{ matrix_synapse_metrics_port }}"
  1032. matrix_nginx_proxy_proxy_matrix_user_directory_search_enabled: "{{ matrix_ma1sd_enabled }}"
  1033. matrix_nginx_proxy_proxy_matrix_user_directory_search_addr_with_container: "{{ matrix_nginx_proxy_proxy_matrix_identity_api_addr_with_container }}"
  1034. matrix_nginx_proxy_proxy_matrix_user_directory_search_addr_sans_container: "{{ matrix_nginx_proxy_proxy_matrix_identity_api_addr_sans_container }}"
  1035. matrix_nginx_proxy_self_check_validate_certificates: "{{ false if matrix_ssl_retrieval_method == 'self-signed' else true }}"
  1036. # OCSP stapling does not make sense when self-signed certificates are used.
  1037. # See https://github.com/spantaleev/matrix-docker-ansible-deploy/issues/1073
  1038. # and https://github.com/spantaleev/matrix-docker-ansible-deploy/pull/1074
  1039. matrix_nginx_proxy_ocsp_stapling_enabled: "{{ matrix_ssl_retrieval_method != 'self-signed' }}"
  1040. matrix_nginx_proxy_synapse_presence_disabled: "{{ not matrix_synapse_presence_enabled }}"
  1041. matrix_nginx_proxy_synapse_workers_enabled: "{{ matrix_synapse_workers_enabled }}"
  1042. matrix_nginx_proxy_synapse_workers_list: "{{ matrix_synapse_workers_enabled_list }}"
  1043. matrix_nginx_proxy_synapse_generic_worker_client_server_locations: "{{ matrix_synapse_workers_generic_worker_client_server_endpoints }}"
  1044. matrix_nginx_proxy_synapse_generic_worker_federation_locations: "{{ matrix_synapse_workers_generic_worker_federation_endpoints }}"
  1045. matrix_nginx_proxy_synapse_media_repository_locations: "{{matrix_synapse_workers_media_repository_endpoints|default([]) }}"
  1046. matrix_nginx_proxy_synapse_user_dir_locations: "{{ matrix_synapse_workers_user_dir_endpoints|default([]) }}"
  1047. matrix_nginx_proxy_synapse_frontend_proxy_locations: "{{ matrix_synapse_workers_frontend_proxy_endpoints|default([]) }}"
  1048. matrix_nginx_proxy_proxy_synapse_workers_enabled_list: "{{ matrix_synapse_workers_enabled_list }}"
  1049. matrix_nginx_proxy_systemd_wanted_services_list: |
  1050. {{
  1051. (['matrix-synapse.service'] if matrix_synapse_enabled else [])
  1052. +
  1053. (['matrix-corporal.service'] if matrix_corporal_enabled else [])
  1054. +
  1055. (['matrix-ma1sd.service'] if matrix_ma1sd_enabled else [])
  1056. +
  1057. (['matrix-client-element.service'] if matrix_client_element_enabled else [])
  1058. }}
  1059. matrix_ssl_domains_to_obtain_certificates_for: |
  1060. {{
  1061. ([matrix_server_fqn_matrix])
  1062. +
  1063. ([matrix_server_fqn_element] if matrix_client_element_enabled else [])
  1064. +
  1065. ([matrix_nginx_proxy_proxy_riot_compat_redirect_hostname] if matrix_nginx_proxy_proxy_riot_compat_redirect_enabled else [])
  1066. +
  1067. ([matrix_server_fqn_hydrogen] if matrix_client_hydrogen_enabled else [])
  1068. +
  1069. ([matrix_server_fqn_dimension] if matrix_dimension_enabled else [])
  1070. +
  1071. ([matrix_server_fqn_bot_go_neb] if matrix_bot_go_neb_enabled else [])
  1072. +
  1073. ([matrix_server_fqn_jitsi] if matrix_jitsi_enabled else [])
  1074. +
  1075. ([matrix_server_fqn_grafana] if matrix_grafana_enabled else [])
  1076. +
  1077. ([matrix_server_fqn_sygnal] if matrix_sygnal_enabled else [])
  1078. +
  1079. ([matrix_domain] if matrix_nginx_proxy_base_domain_serving_enabled else [])
  1080. +
  1081. matrix_ssl_additional_domains_to_obtain_certificates_for
  1082. }}
  1083. matrix_ssl_architecture: "{{
  1084. {
  1085. 'amd64': 'amd64',
  1086. 'arm32': 'arm32v6',
  1087. 'arm64': 'arm64v8',
  1088. }[matrix_architecture]
  1089. }}"
  1090. matrix_ssl_pre_obtaining_required_service_name: "{{ 'matrix-dynamic-dns' if matrix_dynamic_dns_enabled else '' }}"
  1091. ######################################################################
  1092. #
  1093. # /matrix-nginx-proxy
  1094. #
  1095. ######################################################################
  1096. ######################################################################
  1097. #
  1098. # matrix-postgres
  1099. #
  1100. ######################################################################
  1101. matrix_postgres_enabled: true
  1102. matrix_postgres_architecture: "{{ matrix_architecture }}"
  1103. # We unset this if internal Postgres disabled, which will cascade to some other variables
  1104. # and tell users they need to set it (either here or in those variables).
  1105. matrix_postgres_connection_hostname: "{{ 'matrix-postgres' if matrix_postgres_enabled else '' }}"
  1106. matrix_postgres_pgloader_container_image_self_build: "{{ matrix_architecture != 'amd64' }}"
  1107. matrix_postgres_additional_databases: |
  1108. {{
  1109. ([{
  1110. 'name': matrix_synapse_database_database,
  1111. 'username': matrix_synapse_database_user,
  1112. 'password': matrix_synapse_database_password,
  1113. }] if (matrix_synapse_enabled and matrix_synapse_database_database != matrix_postgres_db_name and matrix_synapse_database_host == 'matrix-postgres') else [])
  1114. +
  1115. ([{
  1116. 'name': matrix_dendrite_naffka_database,
  1117. 'username': matrix_dendrite_database_user,
  1118. 'password': matrix_dendrite_database_password,
  1119. },{
  1120. 'name': matrix_dendrite_appservice_database,
  1121. 'username': matrix_dendrite_database_user,
  1122. 'password': matrix_dendrite_database_password,
  1123. },{
  1124. 'name': matrix_dendrite_federationsender_database,
  1125. 'username': matrix_dendrite_database_user,
  1126. 'password': matrix_dendrite_database_password,
  1127. },{
  1128. 'name': matrix_dendrite_keyserver_database,
  1129. 'username': matrix_dendrite_database_user,
  1130. 'password': matrix_dendrite_database_password,
  1131. },{
  1132. 'name': matrix_dendrite_mediaapi_database,
  1133. 'username': matrix_dendrite_database_user,
  1134. 'password': matrix_dendrite_database_password,
  1135. },{
  1136. 'name': matrix_dendrite_room_database,
  1137. 'username': matrix_dendrite_database_user,
  1138. 'password': matrix_dendrite_database_password,
  1139. },{
  1140. 'name': matrix_dendrite_singingkeyserver_database,
  1141. 'username': matrix_dendrite_database_user,
  1142. 'password': matrix_dendrite_database_password,
  1143. },{
  1144. 'name': matrix_dendrite_syncapi_database,
  1145. 'username': matrix_dendrite_database_user,
  1146. 'password': matrix_dendrite_database_password,
  1147. },{
  1148. 'name': matrix_dendrite_account_database,
  1149. 'username': matrix_dendrite_database_user,
  1150. 'password': matrix_dendrite_database_password,
  1151. },{
  1152. 'name': matrix_dendrite_device_database,
  1153. 'username': matrix_dendrite_database_user,
  1154. 'password': matrix_dendrite_database_password,
  1155. },{
  1156. 'name': matrix_dendrite_mscs_database,
  1157. 'username': matrix_dendrite_database_user,
  1158. 'password': matrix_dendrite_database_password,
  1159. }] if (matrix_dendrite_enabled and matrix_dendrite_database_hostname == 'matrix-postgres') else [])
  1160. +
  1161. ([{
  1162. 'name': matrix_ma1sd_database_name,
  1163. 'username': matrix_ma1sd_database_username,
  1164. 'password': matrix_ma1sd_database_password,
  1165. }] if (matrix_ma1sd_enabled and matrix_ma1sd_database_engine == 'postgres' and matrix_ma1sd_database_hostname == 'matrix-postgres') else [])
  1166. +
  1167. ([{
  1168. 'name': matrix_bot_matrix_reminder_bot_database_name,
  1169. 'username': matrix_bot_matrix_reminder_bot_database_username,
  1170. 'password': matrix_bot_matrix_reminder_bot_database_password,
  1171. }] 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 [])
  1172. +
  1173. ([{
  1174. 'name': matrix_registration_database_name,
  1175. 'username': matrix_registration_database_username,
  1176. 'password': matrix_registration_database_password,
  1177. }] if (matrix_registration_enabled and matrix_registration_database_engine == 'postgres' and matrix_registration_database_hostname == 'matrix-postgres') else [])
  1178. +
  1179. ([{
  1180. 'name': matrix_appservice_discord_database_name,
  1181. 'username': matrix_appservice_discord_database_username,
  1182. 'password': matrix_appservice_discord_database_password,
  1183. }] if (matrix_appservice_discord_enabled and matrix_appservice_discord_database_engine == 'postgres' and matrix_appservice_discord_database_hostname == 'matrix-postgres') else [])
  1184. +
  1185. ([{
  1186. 'name': matrix_appservice_slack_database_name,
  1187. 'username': matrix_appservice_slack_database_username,
  1188. 'password': matrix_appservice_slack_database_password,
  1189. }] if (matrix_appservice_slack_enabled and matrix_appservice_slack_database_engine == 'postgres' and matrix_appservice_slack_database_hostname == 'matrix-postgres') else [])
  1190. +
  1191. ([{
  1192. 'name': matrix_appservice_irc_database_name,
  1193. 'username': matrix_appservice_irc_database_username,
  1194. 'password': matrix_appservice_irc_database_password,
  1195. }] if (matrix_appservice_irc_enabled and matrix_appservice_irc_database_engine == 'postgres' and matrix_appservice_irc_database_hostname == 'matrix-postgres') else [])
  1196. +
  1197. ([{
  1198. 'name': matrix_beeper_linkedin_database_name,
  1199. 'username': matrix_beeper_linkedin_database_username,
  1200. 'password': matrix_beeper_linkedin_database_password,
  1201. }] if (matrix_beeper_linkedin_enabled and matrix_beeper_linkedin_database_engine == 'postgres' and matrix_beeper_linkedin_database_hostname == 'matrix-postgres') else [])
  1202. +
  1203. ([{
  1204. 'name': matrix_mautrix_facebook_database_name,
  1205. 'username': matrix_mautrix_facebook_database_username,
  1206. 'password': matrix_mautrix_facebook_database_password,
  1207. }] if (matrix_mautrix_facebook_enabled and matrix_mautrix_facebook_database_engine == 'postgres' and matrix_mautrix_facebook_database_hostname == 'matrix-postgres') else [])
  1208. +
  1209. ([{
  1210. 'name': matrix_mautrix_hangouts_database_name,
  1211. 'username': matrix_mautrix_hangouts_database_username,
  1212. 'password': matrix_mautrix_hangouts_database_password,
  1213. }] if (matrix_mautrix_hangouts_enabled and matrix_mautrix_hangouts_database_engine == 'postgres' and matrix_mautrix_hangouts_database_hostname == 'matrix-postgres') else [])
  1214. +
  1215. ([{
  1216. 'name': matrix_mautrix_googlechat_database_name,
  1217. 'username': matrix_mautrix_googlechat_database_username,
  1218. 'password': matrix_mautrix_googlechat_database_password,
  1219. }] if (matrix_mautrix_googlechat_enabled and matrix_mautrix_googlechat_database_engine == 'postgres' and matrix_mautrix_googlechat_database_hostname == 'matrix-postgres') else [])
  1220. +
  1221. ([{
  1222. 'name': matrix_mautrix_instagram_database_name,
  1223. 'username': matrix_mautrix_instagram_database_username,
  1224. 'password': matrix_mautrix_instagram_database_password,
  1225. }] if (matrix_mautrix_instagram_enabled and matrix_mautrix_instagram_database_engine == 'postgres' and matrix_mautrix_instagram_database_hostname == 'matrix-postgres') else [])
  1226. +
  1227. ([{
  1228. 'name': matrix_mautrix_signal_database_name,
  1229. 'username': matrix_mautrix_signal_database_username,
  1230. 'password': matrix_mautrix_signal_database_password,
  1231. }] if (matrix_mautrix_signal_enabled and matrix_mautrix_signal_database_engine == 'postgres' and matrix_mautrix_signal_database_hostname == 'matrix-postgres') else [])
  1232. +
  1233. ([{
  1234. 'name': matrix_mautrix_telegram_database_name,
  1235. 'username': matrix_mautrix_telegram_database_username,
  1236. 'password': matrix_mautrix_telegram_database_password,
  1237. }] if (matrix_mautrix_telegram_enabled and matrix_mautrix_telegram_database_engine == 'postgres' and matrix_mautrix_telegram_database_hostname == 'matrix-postgres') else [])
  1238. +
  1239. ([{
  1240. 'name': matrix_mautrix_whatsapp_database_name,
  1241. 'username': matrix_mautrix_whatsapp_database_username,
  1242. 'password': matrix_mautrix_whatsapp_database_password,
  1243. }] if (matrix_mautrix_whatsapp_enabled and matrix_mautrix_whatsapp_database_engine == 'postgres' and matrix_mautrix_whatsapp_database_hostname == 'matrix-postgres') else [])
  1244. +
  1245. ([{
  1246. 'name': matrix_mx_puppet_skype_database_name,
  1247. 'username': matrix_mx_puppet_skype_database_username,
  1248. 'password': matrix_mx_puppet_skype_database_password,
  1249. }] if (matrix_mx_puppet_skype_enabled and matrix_mx_puppet_skype_database_engine == 'postgres' and matrix_mx_puppet_skype_database_hostname == 'matrix-postgres') else [])
  1250. +
  1251. ([{
  1252. 'name': matrix_mx_puppet_slack_database_name,
  1253. 'username': matrix_mx_puppet_slack_database_username,
  1254. 'password': matrix_mx_puppet_slack_database_password,
  1255. }] if (matrix_mx_puppet_slack_enabled and matrix_mx_puppet_slack_database_engine == 'postgres' and matrix_mx_puppet_slack_database_hostname == 'matrix-postgres') else [])
  1256. +
  1257. ([{
  1258. 'name': matrix_mx_puppet_twitter_database_name,
  1259. 'username': matrix_mx_puppet_twitter_database_username,
  1260. 'password': matrix_mx_puppet_twitter_database_password,
  1261. }] if (matrix_mx_puppet_twitter_enabled and matrix_mx_puppet_twitter_database_engine == 'postgres' and matrix_mx_puppet_twitter_database_hostname == 'matrix-postgres') else [])
  1262. +
  1263. ([{
  1264. 'name': matrix_mx_puppet_instagram_database_name,
  1265. 'username': matrix_mx_puppet_instagram_database_username,
  1266. 'password': matrix_mx_puppet_instagram_database_password,
  1267. }] if (matrix_mx_puppet_instagram_enabled and matrix_mx_puppet_instagram_database_engine == 'postgres' and matrix_mx_puppet_instagram_database_hostname == 'matrix-postgres') else [])
  1268. +
  1269. ([{
  1270. 'name': matrix_mx_puppet_discord_database_name,
  1271. 'username': matrix_mx_puppet_discord_database_username,
  1272. 'password': matrix_mx_puppet_discord_database_password,
  1273. }] if (matrix_mx_puppet_discord_enabled and matrix_mx_puppet_discord_database_engine == 'postgres' and matrix_mx_puppet_discord_database_hostname == 'matrix-postgres') else [])
  1274. +
  1275. ([{
  1276. 'name': matrix_mx_puppet_steam_database_name,
  1277. 'username': matrix_mx_puppet_steam_database_username,
  1278. 'password': matrix_mx_puppet_steam_database_password,
  1279. }] if (matrix_mx_puppet_steam_enabled and matrix_mx_puppet_steam_database_engine == 'postgres' and matrix_mx_puppet_steam_database_hostname == 'matrix-postgres') else [])
  1280. +
  1281. ([{
  1282. 'name': matrix_mx_puppet_groupme_database_name,
  1283. 'username': matrix_mx_puppet_groupme_database_username,
  1284. 'password': matrix_mx_puppet_groupme_database_password,
  1285. }] if (matrix_mx_puppet_groupme_enabled and matrix_mx_puppet_groupme_database_engine == 'postgres' and matrix_mx_puppet_groupme_database_hostname == 'matrix-postgres') else [])
  1286. +
  1287. ([{
  1288. 'name': matrix_dimension_database_name,
  1289. 'username': matrix_dimension_database_username,
  1290. 'password': matrix_dimension_database_password,
  1291. }] if (matrix_dimension_enabled and matrix_dimension_database_engine == 'postgres' and matrix_dimension_database_hostname == 'matrix-postgres') else [])
  1292. +
  1293. ([{
  1294. 'name': matrix_etherpad_database_name,
  1295. 'username': matrix_etherpad_database_username,
  1296. 'password': matrix_etherpad_database_password,
  1297. }] if (matrix_etherpad_enabled and matrix_etherpad_database_engine == 'postgres' and matrix_etherpad_database_hostname == 'matrix-postgres') else [])
  1298. +
  1299. ([{
  1300. 'name': matrix_prometheus_postgres_exporter_database_name,
  1301. 'username': matrix_prometheus_postgres_exporter_database_username,
  1302. 'password': matrix_prometheus_postgres_exporter_database_password,
  1303. }] if (matrix_prometheus_postgres_exporter_enabled and matrix_prometheus_postgres_exporter_database_hostname == 'matrix-postgres') else [])
  1304. }}
  1305. matrix_postgres_import_roles_to_ignore: |
  1306. {{
  1307. [matrix_postgres_connection_username]
  1308. +
  1309. matrix_postgres_additional_databases|map(attribute='username')|list
  1310. }}
  1311. matrix_postgres_import_databases_to_ignore: |
  1312. {{
  1313. [matrix_postgres_db_name]
  1314. +
  1315. matrix_postgres_additional_databases|map(attribute='name')|list
  1316. }}
  1317. ######################################################################
  1318. #
  1319. # /matrix-postgres
  1320. #
  1321. ######################################################################
  1322. ######################################################################
  1323. #
  1324. # matrix-sygnal
  1325. #
  1326. ######################################################################
  1327. # Most people don't need their own push-server, because they also need their own app to utilize it from.
  1328. matrix_sygnal_enabled: false
  1329. # If someone instals Prometheus via the playbook, they most likely wish to monitor Sygnal.
  1330. matrix_sygnal_metrics_prometheus_enabled: "{{ matrix_prometheus_enabled }}"
  1331. matrix_sygnal_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:6000' }}"
  1332. ######################################################################
  1333. #
  1334. # /matrix-sygnal
  1335. #
  1336. ######################################################################
  1337. ######################################################################
  1338. #
  1339. # matrix-redis
  1340. #
  1341. ######################################################################
  1342. matrix_redis_enabled: "{{ matrix_synapse_workers_enabled }}"
  1343. ######################################################################
  1344. #
  1345. # /matrix-redis
  1346. #
  1347. ######################################################################
  1348. ######################################################################
  1349. #
  1350. # matrix-client-element
  1351. #
  1352. ######################################################################
  1353. # By default, this playbook installs the Element web UI on the `matrix_server_fqn_element` domain.
  1354. # If you wish to connect to your Matrix server by other means, you may wish to disable this.
  1355. matrix_client_element_enabled: true
  1356. matrix_client_element_container_image_self_build: "{{ matrix_architecture != 'amd64' }}"
  1357. # Normally, matrix-nginx-proxy is enabled and nginx can reach Element over the container network.
  1358. # If matrix-nginx-proxy is not enabled, or you otherwise have a need for it, you can expose
  1359. # the Element HTTP port to the local host.
  1360. matrix_client_element_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:8765' }}"
  1361. matrix_client_element_default_hs_url: "{{ matrix_homeserver_url }}"
  1362. matrix_client_element_default_is_url: "{{ matrix_identity_server_url }}"
  1363. # Use Dimension if enabled, otherwise fall back to Scalar
  1364. matrix_client_element_integrations_ui_url: "{{ matrix_dimension_integrations_ui_url if matrix_dimension_enabled else 'https://scalar.vector.im/' }}"
  1365. matrix_client_element_integrations_rest_url: "{{ matrix_dimension_integrations_rest_url if matrix_dimension_enabled else 'https://scalar.vector.im/api' }}"
  1366. matrix_client_element_integrations_widgets_urls: "{{ matrix_dimension_integrations_widgets_urls if matrix_dimension_enabled else ['https://scalar.vector.im/api'] }}"
  1367. 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' }}"
  1368. matrix_client_element_self_check_validate_certificates: "{{ false if matrix_ssl_retrieval_method == 'self-signed' else true }}"
  1369. matrix_client_element_registration_enabled: "{{ matrix_synapse_enable_registration }}"
  1370. matrix_client_element_enable_presence_by_hs_url: |
  1371. {{
  1372. none
  1373. if matrix_synapse_presence_enabled
  1374. else {matrix_client_element_default_hs_url: false}
  1375. }}
  1376. matrix_client_element_welcome_user_id: ~
  1377. matrix_client_element_jitsi_preferredDomain: "{{ matrix_server_fqn_jitsi if matrix_jitsi_enabled else '' }}"
  1378. ######################################################################
  1379. #
  1380. # /matrix-client-element
  1381. #
  1382. ######################################################################
  1383. ######################################################################
  1384. #
  1385. # matrix-client-hydrogen
  1386. #
  1387. ######################################################################
  1388. matrix_client_hydrogen_enabled: false
  1389. # Normally, matrix-nginx-proxy is enabled and nginx can reach Hydrogen over the container network.
  1390. # If matrix-nginx-proxy is not enabled, or you otherwise have a need for it, you can expose
  1391. # the HTTP port to the local host.
  1392. matrix_client_hydrogen_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:8768' }}"
  1393. matrix_client_hydrogen_default_hs_url: "{{ matrix_homeserver_url }}"
  1394. matrix_client_hydrogen_self_check_validate_certificates: "{{ false if matrix_ssl_retrieval_method == 'self-signed' else true }}"
  1395. ######################################################################
  1396. #
  1397. # /matrix-client-hydrogen
  1398. #
  1399. ######################################################################
  1400. ######################################################################
  1401. #
  1402. # matrix-synapse
  1403. #
  1404. ######################################################################
  1405. matrix_synapse_container_image_self_build: "{{ matrix_architecture not in ['arm64', 'amd64'] }}"
  1406. # When ma1sd is enabled, we can use it to validate email addresses and phone numbers.
  1407. # 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.
  1408. matrix_synapse_account_threepid_delegates_email: "{{ 'http://matrix-ma1sd:' + matrix_ma1sd_container_port|string if matrix_ma1sd_enabled else '' }}"
  1409. matrix_synapse_account_threepid_delegates_msisdn: "{{ 'http://matrix-ma1sd:' + matrix_ma1sd_container_port|string if matrix_ma1sd_enabled else '' }}"
  1410. # Normally, matrix-nginx-proxy is enabled and nginx can reach Synapse over the container network.
  1411. # If matrix-nginx-proxy is not enabled, or you otherwise have a need for it,
  1412. # you can expose Synapse's ports to the host.
  1413. #
  1414. # For exposing the Matrix Client API's port (plain HTTP) to the local host.
  1415. 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 }}"
  1416. #
  1417. # For exposing the Matrix Federation API's plain port (plain HTTP) to the local host.
  1418. 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 }}"
  1419. #
  1420. # For exposing the Matrix Federation API's TLS port (HTTPS) to the internet on all network interfaces.
  1421. 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 '' }}"
  1422. #
  1423. # For exposing the Synapse Metrics API's port (plain HTTP) to the local host.
  1424. 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 '' }}"
  1425. #
  1426. # For exposing the Synapse Manhole port (plain HTTP) to the local host.
  1427. matrix_synapse_container_manhole_api_host_bind_port: "{{ '127.0.0.1:9000' if matrix_synapse_manhole_enabled else '' }}"
  1428. #
  1429. # For exposing the Synapse worker (and metrics) ports to the local host.
  1430. matrix_synapse_workers_container_host_bind_address: "{{ '127.0.0.1' if (matrix_synapse_workers_enabled and not matrix_nginx_proxy_enabled) else '' }}"
  1431. matrix_synapse_database_password: "{{ '%s' | format(matrix_synapse_macaroon_secret_key) | password_hash('sha512', 'synapse.db') | to_uuid }}"
  1432. # We do not enable TLS in Synapse by default.
  1433. # TLS is handled by the matrix-nginx-proxy, which proxies the requests to Synapse.
  1434. matrix_synapse_tls_federation_listener_enabled: false
  1435. matrix_synapse_tls_certificate_path: ~
  1436. matrix_synapse_tls_private_key_path: ~
  1437. matrix_synapse_federation_port_openid_resource_required: "{{ not matrix_synapse_federation_enabled and (matrix_dimension_enabled or matrix_ma1sd_enabled) }}"
  1438. # If someone instals Prometheus via the playbook, they most likely wish to monitor Synapse.
  1439. matrix_synapse_metrics_enabled: "{{ matrix_prometheus_enabled }}"
  1440. matrix_synapse_email_enabled: "{{ matrix_mailer_enabled }}"
  1441. matrix_synapse_email_smtp_host: "matrix-mailer"
  1442. matrix_synapse_email_smtp_port: 8025
  1443. matrix_synapse_email_smtp_require_transport_security: false
  1444. matrix_synapse_email_notif_from: "Matrix <{{ matrix_mailer_sender_address }}>"
  1445. # Even if TURN doesn't support TLS (it does by default),
  1446. # it doesn't hurt to try a secure connection anyway.
  1447. #
  1448. # When Let's Encrypt certificates are used (the default case),
  1449. # we don't enable `turns` endpoints, because WebRTC in Element can't talk to them.
  1450. # Learn more here: https://github.com/spantaleev/matrix-docker-ansible-deploy/pull/1145
  1451. matrix_synapse_turn_uris: |
  1452. {{
  1453. []
  1454. +
  1455. [
  1456. 'turns:' + matrix_server_fqn_matrix + '?transport=udp',
  1457. 'turns:' + matrix_server_fqn_matrix + '?transport=tcp',
  1458. ] if matrix_coturn_enabled and matrix_coturn_tls_enabled and matrix_ssl_retrieval_method != 'lets-encrypt' else []
  1459. +
  1460. [
  1461. 'turn:' + matrix_server_fqn_matrix + '?transport=udp',
  1462. 'turn:' + matrix_server_fqn_matrix + '?transport=tcp',
  1463. ] if matrix_coturn_enabled else []
  1464. }}
  1465. matrix_synapse_turn_shared_secret: "{{ matrix_coturn_turn_static_auth_secret if matrix_coturn_enabled else '' }}"
  1466. matrix_synapse_self_check_validate_certificates: "{{ false if matrix_ssl_retrieval_method == 'self-signed' else true }}"
  1467. matrix_synapse_systemd_required_services_list: |
  1468. {{
  1469. (['docker.service'])
  1470. +
  1471. (['matrix-postgres.service'] if matrix_postgres_enabled else [])
  1472. +
  1473. (['matrix-goofys'] if matrix_s3_media_store_enabled else [])
  1474. }}
  1475. matrix_synapse_systemd_wanted_services_list: |
  1476. {{
  1477. (['matrix-coturn.service'] if matrix_coturn_enabled else [])
  1478. +
  1479. (['matrix-mailer.service'] if matrix_mailer_enabled else [])
  1480. }}
  1481. # Synapse workers (used for parallel load-scaling) need Redis for IPC.
  1482. matrix_synapse_redis_enabled: "{{ matrix_redis_enabled }}"
  1483. matrix_synapse_redis_host: "{{ 'matrix-redis' if matrix_redis_enabled else '' }}"
  1484. matrix_synapse_redis_password: "{{ matrix_redis_connection_password if matrix_redis_enabled else '' }}"
  1485. ######################################################################
  1486. #
  1487. # /matrix-synapse
  1488. #
  1489. ######################################################################
  1490. ######################################################################
  1491. #
  1492. # matrix-synapse-admin
  1493. #
  1494. ######################################################################
  1495. matrix_synapse_admin_enabled: false
  1496. # Normally, matrix-nginx-proxy is enabled and nginx can reach Synapse Admin over the container network.
  1497. # If matrix-nginx-proxy is not enabled, or you otherwise have a need for it, you can expose
  1498. # Synapse Admin's HTTP port to the local host.
  1499. matrix_synapse_admin_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:8766' }}"
  1500. matrix_synapse_admin_container_self_build: "{{ matrix_architecture != 'amd64' }}"
  1501. ######################################################################
  1502. #
  1503. # /matrix-synapse-admin
  1504. #
  1505. ######################################################################
  1506. ######################################################################
  1507. #
  1508. # matrix-prometheus-node-exporter
  1509. #
  1510. ######################################################################
  1511. matrix_prometheus_node_exporter_enabled: false
  1512. ######################################################################
  1513. #
  1514. # /matrix-prometheus-node-exporter
  1515. #
  1516. ######################################################################
  1517. ######################################################################
  1518. #
  1519. # matrix-prometheus
  1520. #
  1521. ######################################################################
  1522. matrix_prometheus_enabled: false
  1523. # Normally, matrix-nginx-proxy is enabled and nginx can reach Prometheus over the container network.
  1524. # If matrix-nginx-proxy is not enabled, or you otherwise have a need for it, you can expose
  1525. # Prometheus' HTTP port to the local host.
  1526. matrix_prometheus_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:9090' }}"
  1527. matrix_prometheus_scraper_synapse_enabled: "{{ matrix_synapse_enabled and matrix_synapse_metrics_enabled }}"
  1528. matrix_prometheus_scraper_synapse_targets: ['matrix-synapse:{{ matrix_synapse_metrics_port }}']
  1529. matrix_prometheus_scraper_synapse_workers_enabled_list: "{{ matrix_synapse_workers_enabled_list }}"
  1530. matrix_prometheus_scraper_synapse_rules_synapse_tag: "{{ matrix_synapse_docker_image_tag }}"
  1531. matrix_prometheus_scraper_node_enabled: "{{ matrix_prometheus_node_exporter_enabled }}"
  1532. matrix_prometheus_scraper_node_targets: "{{ ['matrix-prometheus-node-exporter:9100'] if matrix_prometheus_node_exporter_enabled else [] }}"
  1533. matrix_prometheus_scraper_postgres_enabled: "{{ matrix_prometheus_postgres_exporter_enabled }}"
  1534. matrix_prometheus_scraper_postgres_targets: "{{ ['matrix-prometheus-postgres-exporter:'+ matrix_prometheus_postgres_exporter_port|string] if matrix_prometheus_scraper_postgres_enabled else [] }}"
  1535. ######################################################################
  1536. #
  1537. # /matrix-prometheus
  1538. #
  1539. ######################################################################
  1540. ######################################################################
  1541. #
  1542. # matrix-prometheus-postgres-exporter
  1543. #
  1544. ######################################################################
  1545. matrix_prometheus_postgres_exporter_enabled: false
  1546. matrix_prometheus_postgres_exporter_database_password: "{{ '%s' | format(matrix_synapse_macaroon_secret_key) | password_hash('sha512', 'prometheus.pg.db') | to_uuid }}"
  1547. matrix_prometheus_postgres_exporter_systemd_required_services_list: |
  1548. {{
  1549. ['docker.service']
  1550. +
  1551. (['matrix-postgres.service'] if matrix_postgres_enabled else [])
  1552. }}
  1553. ######################################################################
  1554. #
  1555. # /matrix-prometheus-postgres-exporter
  1556. #
  1557. ######################################################################
  1558. ######################################################################
  1559. #
  1560. # matrix-grafana
  1561. #
  1562. ######################################################################
  1563. matrix_grafana_enabled: false
  1564. # Normally, matrix-nginx-proxy is enabled and nginx can reach Grafana over the container network.
  1565. # If matrix-nginx-proxy is not enabled, or you otherwise have a need for it, you can expose
  1566. # Grafana's HTTP port to the local host.
  1567. matrix_grafana_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:3000' }}"
  1568. matrix_grafana_dashboard_download_urls_all: |
  1569. {{
  1570. matrix_grafana_dashboard_download_urls
  1571. +
  1572. (matrix_prometheus_postgres_exporter_dashboard_urls if matrix_prometheus_postgres_exporter_enabled else [])
  1573. }}
  1574. ######################################################################
  1575. #
  1576. # /matrix-grafana
  1577. #
  1578. ######################################################################
  1579. ######################################################################
  1580. #
  1581. # matrix-registration
  1582. #
  1583. ######################################################################
  1584. matrix_registration_enabled: false
  1585. # Normally, matrix-nginx-proxy is enabled and nginx can reach matrix-registration over the container network.
  1586. # If matrix-nginx-proxy is not enabled, or you otherwise have a need for it, you can expose
  1587. # matrix-registration's HTTP port to the local host.
  1588. matrix_registration_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:8767' }}"
  1589. matrix_registration_riot_instance: "{{ ('https://' + matrix_server_fqn_element) if matrix_client_element_enabled else 'https://riot.im/app/' }}"
  1590. matrix_registration_shared_secret: "{{ matrix_synapse_registration_shared_secret if matrix_synapse_enabled else '' }}"
  1591. matrix_registration_server_location: "{{ matrix_homeserver_container_url }}"
  1592. matrix_registration_api_validate_certs: "{{ false if matrix_ssl_retrieval_method == 'self-signed' else true }}"
  1593. matrix_registration_container_image_self_build: "{{ matrix_architecture != 'amd64' }}"
  1594. matrix_registration_systemd_required_services_list: |
  1595. {{
  1596. ['docker.service']
  1597. +
  1598. (['matrix-postgres.service'] if matrix_postgres_enabled else [])
  1599. }}
  1600. # Postgres is the default, except if not using `matrix_postgres` (internal postgres)
  1601. matrix_registration_database_engine: "{{ 'postgres' if matrix_postgres_enabled else 'sqlite' }}"
  1602. matrix_registration_database_password: "{{ '%s' | format(matrix_synapse_macaroon_secret_key) | password_hash('sha512', 'mx.registr.db') | to_uuid }}"
  1603. ######################################################################
  1604. #
  1605. # /matrix-registration
  1606. #
  1607. ######################################################################
  1608. ######################################################################
  1609. #
  1610. # matrix-postgres-backup
  1611. #
  1612. ######################################################################
  1613. matrix_postgres_backup_connection_hostname: "{{ matrix_postgres_connection_hostname }}"
  1614. matrix_postgres_backup_connection_port: "{{ matrix_postgres_connection_port }}"
  1615. matrix_postgres_backup_connection_username: "{{ matrix_postgres_connection_username }}"
  1616. matrix_postgres_backup_connection_password: "{{ matrix_postgres_connection_password }}"
  1617. matrix_postgres_backup_postgres_data_path: "{{ matrix_postgres_data_path if matrix_postgres_enabled else '' }}"
  1618. # 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
  1619. matrix_postgres_backup_databases: |
  1620. {{
  1621. (([{
  1622. 'name': matrix_synapse_database_database
  1623. }] if (matrix_synapse_enabled and matrix_synapse_database_database == matrix_postgres_db_name and matrix_synapse_database_host == 'matrix-postgres') else [])
  1624. +
  1625. matrix_postgres_additional_databases)|map(attribute='name')|list
  1626. }}
  1627. ######################################################################
  1628. #
  1629. # /matrix-postgres-backup
  1630. #
  1631. ######################################################################
  1632. ######################################################################
  1633. #
  1634. # matrix-dendrite
  1635. #
  1636. ######################################################################
  1637. # Normally, matrix-nginx-proxy is enabled and nginx can reach Dendrite over the container network.
  1638. # If matrix-nginx-proxy is not enabled, or you otherwise have a need for it,
  1639. # you can expose Dendrite's ports to the host.
  1640. #
  1641. # For exposing the Matrix Client API's port (plain HTTP) to the local host.
  1642. matrix_dendrite_container_client_api_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:8008' }}"
  1643. #
  1644. # For exposing the Matrix Federation API's TLS port (HTTPS) to the internet on all network interfaces.
  1645. matrix_dendrite_container_federation_api_tls_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else matrix_federation_public_port }}"
  1646. matrix_dendrite_registration_shared_secret: "{{ matrix_dendrite_generic_secret_key | password_hash('sha512', 'dendrite.rss') | to_uuid }}"
  1647. matrix_dendrite_database_password: "{{ matrix_dendrite_generic_secret_key | password_hash('sha512', 'dendrite.db') | to_uuid }}"
  1648. # Even if TURN doesn't support TLS (it does by default),
  1649. # it doesn't hurt to try a secure connection anyway.
  1650. matrix_dendrite_turn_uris: |
  1651. {{
  1652. [
  1653. 'turns:' + matrix_server_fqn_matrix + '?transport=udp',
  1654. 'turns:' + matrix_server_fqn_matrix + '?transport=tcp',
  1655. 'turn:' + matrix_server_fqn_matrix + '?transport=udp',
  1656. 'turn:' + matrix_server_fqn_matrix + '?transport=tcp',
  1657. ]
  1658. if matrix_coturn_enabled
  1659. else []
  1660. }}
  1661. matrix_dendrite_turn_shared_secret: "{{ matrix_coturn_turn_static_auth_secret if matrix_coturn_enabled else '' }}"
  1662. matrix_dendrite_disable_tls_validation: "{{ true if matrix_ssl_retrieval_method == 'self-signed' else false }}"
  1663. matrix_dendrite_self_check_validate_certificates: "{{ false if matrix_ssl_retrieval_method == 'self-signed' else true }}"
  1664. matrix_dendrite_systemd_required_services_list: |
  1665. {{
  1666. (['docker.service'])
  1667. +
  1668. (['matrix-postgres.service'] if matrix_postgres_enabled else [])
  1669. +
  1670. (['matrix-goofys'] if matrix_s3_media_store_enabled else [])
  1671. }}
  1672. matrix_dendrite_systemd_wanted_services_list: |
  1673. {{
  1674. (['matrix-coturn.service'] if matrix_coturn_enabled else [])
  1675. }}
  1676. ######################################################################
  1677. #
  1678. # /matrix-dendrite
  1679. #
  1680. ######################################################################