Matrix Docker Ansible eploy
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.
 
 

2555 řádky
112 KiB

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