Matrix Docker Ansible eploy
25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.
 
 

1248 satır
54 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. ######################################################################
  17. #
  18. # /matrix-base
  19. #
  20. ######################################################################
  21. ######################################################################
  22. #
  23. # matrix-architecture
  24. #
  25. ######################################################################
  26. matrix_architecture: "amd64"
  27. ######################################################################
  28. #
  29. # /matrix-architecture
  30. #
  31. ######################################################################
  32. ######################################################################
  33. #
  34. # matrix-bridge-appservice-discord
  35. #
  36. ######################################################################
  37. # We don't enable bridges by default.
  38. matrix_appservice_discord_enabled: false
  39. # Normally, matrix-nginx-proxy is enabled and nginx can reach matrix-appservice-discord over the container network.
  40. # If matrix-nginx-proxy is not enabled, or you otherwise have a need for it, you can expose
  41. # matrix-appservice-discord's client-server port to the local host.
  42. matrix_appservice_discord_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:9005' }}"
  43. # If the homeserver disables presence, it's likely better (less wasteful) to also disable presence on the bridge side.
  44. matrix_appservice_discord_bridge_disablePresence: "{{ matrix_synapse_use_presence }}"
  45. matrix_appservice_discord_systemd_required_services_list: |
  46. {{
  47. ['docker.service']
  48. +
  49. (['matrix-synapse.service'] if matrix_synapse_enabled else [])
  50. }}
  51. matrix_appservice_discord_appservice_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'discord.as.token') | to_uuid }}"
  52. matrix_appservice_discord_homeserver_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'discord.hs.token') | to_uuid }}"
  53. # We only make this use Postgres if our own Postgres server is enabled.
  54. # It's only then (for now) that we can automatically create the necessary database and user for this service.
  55. matrix_appservice_discord_database_engine: "{{ 'postgres' if matrix_postgres_enabled else 'sqlite' }}"
  56. matrix_appservice_discord_database_password: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'as.discord.db') | to_uuid }}"
  57. ######################################################################
  58. #
  59. # /matrix-bridge-appservice-discord
  60. #
  61. ######################################################################
  62. ######################################################################
  63. #
  64. # matrix-appservice-webhooks
  65. #
  66. ######################################################################
  67. # We don't enable bridges by default.
  68. matrix_appservice_webhooks_enabled: false
  69. # Normally, matrix-nginx-proxy is enabled and nginx can reach matrix-appservice-webhooks over the container network.
  70. # If matrix-nginx-proxy is not enabled, or you otherwise have a need for it, you can expose
  71. # matrix-appservice-webhooks' client-server port to the local host.
  72. matrix_appservice_webhooks_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else ('127.0.0.1:' ~ matrix_appservice_webhooks_matrix_port) }}"
  73. matrix_appservice_webhooks_appservice_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'webhook.as.token') | to_uuid }}"
  74. matrix_appservice_webhooks_homeserver_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'webhook.hs.token') | to_uuid }}"
  75. matrix_appservice_webhooks_id_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'webhook.id.token') | to_uuid }}"
  76. matrix_appservice_webhooks_systemd_required_services_list: |
  77. {{
  78. ['docker.service']
  79. +
  80. (['matrix-synapse.service'] if matrix_synapse_enabled else [])
  81. }}
  82. ######################################################################
  83. #
  84. # /matrix-appservice-webhooks
  85. #
  86. ######################################################################
  87. ######################################################################
  88. #
  89. # matrix-appservice-slack
  90. #
  91. ######################################################################
  92. # We don't enable bridges by default.
  93. matrix_appservice_slack_enabled: false
  94. # Normally, matrix-nginx-proxy is enabled and nginx can reach matrix-appservice-slack over the container network.
  95. # If matrix-nginx-proxy is not enabled, or you otherwise have a need for it, you can expose
  96. # matrix-appservice-slack's client-server port to the local host.
  97. matrix_appservice_slack_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else ('127.0.0.1:' ~ matrix_appservice_slack_slack_port) }}"
  98. matrix_appservice_slack_appservice_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'slack.as.token') | to_uuid }}"
  99. matrix_appservice_slack_homeserver_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'slack.hs.token') | to_uuid }}"
  100. matrix_appservice_slack_id_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'slack.id.token') | to_uuid }}"
  101. matrix_appservice_slack_systemd_required_services_list: |
  102. {{
  103. ['docker.service']
  104. +
  105. (['matrix-synapse.service'] if matrix_synapse_enabled else [])
  106. }}
  107. # Postgres is the default, except if not using `matrix_postgres` (internal postgres)
  108. matrix_appservice_slack_database_engine: "{{ 'postgres' if matrix_postgres_enabled else 'sqlite' }}"
  109. matrix_appservice_slack_database_password: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'as.slack.db') | to_uuid }}"
  110. ######################################################################
  111. #
  112. # /matrix-bridge-appservice-slack
  113. #
  114. ######################################################################
  115. ######################################################################
  116. #
  117. # matrix-bridge-appservice-irc
  118. #
  119. ######################################################################
  120. # We don't enable bridges by default.
  121. matrix_appservice_irc_enabled: false
  122. # Normally, matrix-nginx-proxy is enabled and nginx can reach matrix-appservice-irc over the container network.
  123. # If matrix-nginx-proxy is not enabled, or you otherwise have a need for it, you can expose
  124. # matrix-appservice-irc's client-server port to the local host.
  125. matrix_appservice_irc_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:9999' }}"
  126. # The IRC bridge docs say that if homeserver presence is disabled, it's better to also disable
  127. # IRC bridge presence, for performance reasons.
  128. matrix_appservice_irc_homeserver_enablePresence: "{{ matrix_synapse_use_presence }}"
  129. matrix_appservice_irc_systemd_required_services_list: |
  130. {{
  131. ['docker.service']
  132. +
  133. (['matrix-synapse.service'] if matrix_synapse_enabled else [])
  134. }}
  135. matrix_appservice_irc_appservice_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'irc.as.token') | to_uuid }}"
  136. matrix_appservice_irc_homeserver_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'irc.hs.token') | to_uuid }}"
  137. # Postgres is the default, except if not using `matrix_postgres` (internal postgres)
  138. matrix_appservice_irc_database_engine: "{{ 'postgres' if matrix_postgres_enabled else 'sqlite' }}"
  139. matrix_appservice_irc_database_password: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'as.irc.db') | to_uuid }}"
  140. ######################################################################
  141. #
  142. # /matrix-bridge-appservice-irc
  143. #
  144. ######################################################################
  145. ######################################################################
  146. #
  147. # matrix-bridge-mautrix-facebook
  148. #
  149. ######################################################################
  150. # We don't enable bridges by default.
  151. matrix_mautrix_facebook_enabled: false
  152. matrix_mautrix_facebook_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm64'] }}"
  153. matrix_mautrix_facebook_systemd_required_services_list: |
  154. {{
  155. ['docker.service']
  156. +
  157. (['matrix-synapse.service'] if matrix_synapse_enabled else [])
  158. }}
  159. matrix_mautrix_facebook_appservice_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'fb.as.token') | to_uuid }}"
  160. matrix_mautrix_facebook_homeserver_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'fb.hs.token') | to_uuid }}"
  161. 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 '' }}"
  162. matrix_mautrix_facebook_bridge_presence: "{{ matrix_synapse_use_presence if matrix_synapse_enabled else true }}"
  163. # Postgres is the default, except if not using `matrix_postgres` (internal postgres)
  164. matrix_mautrix_facebook_database_engine: "{{ 'postgres' if matrix_postgres_enabled else 'sqlite' }}"
  165. matrix_mautrix_facebook_database_password: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'as.mautrix_facebook.db') | to_uuid }}"
  166. ######################################################################
  167. #
  168. # /matrix-bridge-mautrix-facebook
  169. #
  170. ######################################################################
  171. ######################################################################
  172. #
  173. # matrix-bridge-mautrix-hangouts
  174. #
  175. ######################################################################
  176. # We don't enable bridges by default.
  177. matrix_mautrix_hangouts_enabled: false
  178. matrix_mautrix_hangouts_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm64'] }}"
  179. matrix_mautrix_hangouts_systemd_required_services_list: |
  180. {{
  181. ['docker.service']
  182. +
  183. (['matrix-synapse.service'] if matrix_synapse_enabled else [])
  184. }}
  185. matrix_mautrix_hangouts_appservice_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'ho.as.token') | to_uuid }}"
  186. matrix_mautrix_hangouts_homeserver_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'ho.hs.token') | to_uuid }}"
  187. matrix_mautrix_hangouts_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:9007' }}"
  188. 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 '' }}"
  189. # Postgres is the default, except if not using `matrix_postgres` (internal postgres)
  190. matrix_mautrix_hangouts_database_engine: "{{ 'postgres' if matrix_postgres_enabled else 'sqlite' }}"
  191. matrix_mautrix_hangouts_database_password: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'as.mautrix_hangouts.db') | to_uuid }}"
  192. ######################################################################
  193. #
  194. # /matrix-bridge-mautrix-hangouts
  195. #
  196. ######################################################################
  197. ######################################################################
  198. #
  199. # matrix-bridge-mautrix-telegram
  200. #
  201. ######################################################################
  202. # We don't enable bridges by default.
  203. matrix_mautrix_telegram_enabled: false
  204. matrix_mautrix_telegram_systemd_required_services_list: |
  205. {{
  206. ['docker.service']
  207. +
  208. (['matrix-synapse.service'] if matrix_synapse_enabled else [])
  209. }}
  210. matrix_mautrix_telegram_appservice_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'telegr.as.token') | to_uuid }}"
  211. matrix_mautrix_telegram_homeserver_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'telegr.hs.token') | to_uuid }}"
  212. matrix_mautrix_telegram_public_endpoint: "/{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'telegram') | to_uuid }}"
  213. matrix_mautrix_telegram_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:9006' }}"
  214. 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 '' }}"
  215. # Postgres is the default, except if not using `matrix_postgres` (internal postgres)
  216. matrix_mautrix_telegram_database_engine: "{{ 'postgres' if matrix_postgres_enabled else 'sqlite' }}"
  217. matrix_mautrix_telegram_database_password: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'as.mautrix_telegram.db') | to_uuid }}"
  218. ######################################################################
  219. #
  220. # /matrix-bridge-mautrix-telegram
  221. #
  222. ######################################################################
  223. ######################################################################
  224. #
  225. # matrix-bridge-mautrix-whatsapp
  226. #
  227. ######################################################################
  228. # We don't enable bridges by default.
  229. matrix_mautrix_whatsapp_enabled: false
  230. matrix_mautrix_whatsapp_systemd_required_services_list: |
  231. {{
  232. ['docker.service']
  233. +
  234. (['matrix-synapse.service'] if matrix_synapse_enabled else [])
  235. }}
  236. matrix_mautrix_whatsapp_appservice_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'whats.as.token') | to_uuid }}"
  237. matrix_mautrix_whatsapp_homeserver_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'whats.hs.token') | to_uuid }}"
  238. 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 '' }}"
  239. # Postgres is the default, except if not using `matrix_postgres` (internal postgres)
  240. matrix_mautrix_whatsapp_database_engine: "{{ 'postgres' if matrix_postgres_enabled else 'sqlite' }}"
  241. matrix_mautrix_whatsapp_database_password: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'as.mautrix_whatsapp.db') | to_uuid }}"
  242. ######################################################################
  243. #
  244. # /matrix-bridge-mautrix-whatsapp
  245. #
  246. ######################################################################
  247. ######################################################################
  248. #
  249. # matrix-sms-bridge
  250. #
  251. ######################################################################
  252. # We don't enable bridges by default.
  253. matrix_sms_bridge_enabled: false
  254. matrix_sms_bridge_systemd_required_services_list: |
  255. {{
  256. ['docker.service']
  257. +
  258. (['matrix-synapse.service'] if matrix_synapse_enabled else [])
  259. }}
  260. matrix_sms_bridge_appservice_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'sms.as.token') | to_uuid }}"
  261. matrix_sms_bridge_homeserver_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'sms.hs.token') | to_uuid }}"
  262. ######################################################################
  263. #
  264. # /matrix-sms-bridge
  265. #
  266. ######################################################################
  267. ######################################################################
  268. #
  269. # matrix-bridge-mx-puppet-skype
  270. #
  271. ######################################################################
  272. # We don't enable bridges by default.
  273. matrix_mx_puppet_skype_enabled: false
  274. matrix_mx_puppet_skype_container_image_self_build: "{{ matrix_architecture != 'amd64'}}"
  275. matrix_mx_puppet_skype_systemd_required_services_list: |
  276. {{
  277. ['docker.service']
  278. +
  279. (['matrix-synapse.service'] if matrix_synapse_enabled else [])
  280. }}
  281. matrix_mx_puppet_skype_appservice_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'skype.as.tok') | to_uuid }}"
  282. matrix_mx_puppet_skype_homeserver_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'skype.hs.tok') | to_uuid }}"
  283. matrix_mx_puppet_skype_login_shared_secret: "{{ matrix_synapse_ext_password_provider_shared_secret_auth_shared_secret if matrix_synapse_ext_password_provider_shared_secret_auth_enabled else '' }}"
  284. # Postgres is the default, except if not using `matrix_postgres` (internal postgres)
  285. matrix_mx_puppet_skype_database_engine: "{{ 'postgres' if matrix_postgres_enabled else 'sqlite' }}"
  286. matrix_mx_puppet_skype_database_password: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'as.mx_puppet_skype.db') | to_uuid }}"
  287. ######################################################################
  288. #
  289. # /matrix-bridge-mx-puppet-skype
  290. #
  291. ######################################################################
  292. ######################################################################
  293. #
  294. # matrix-bridge-mx-puppet-slack
  295. #
  296. ######################################################################
  297. # We don't enable bridges by default.
  298. matrix_mx_puppet_slack_enabled: false
  299. matrix_mx_puppet_slack_container_image_self_build: "{{ matrix_architecture != 'amd64'}}"
  300. matrix_mx_puppet_slack_systemd_required_services_list: |
  301. {{
  302. ['docker.service']
  303. +
  304. (['matrix-synapse.service'] if matrix_synapse_enabled else [])
  305. }}
  306. matrix_mx_puppet_slack_appservice_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'mxslk.as.tok') | to_uuid }}"
  307. matrix_mx_puppet_slack_homeserver_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'mxslk.hs.tok') | to_uuid }}"
  308. 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 '' }}"
  309. # Postgres is the default, except if not using `matrix_postgres` (internal postgres)
  310. matrix_mx_puppet_slack_database_engine: "{{ 'postgres' if matrix_postgres_enabled else 'sqlite' }}"
  311. matrix_mx_puppet_slack_database_password: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'as.mx_puppet_slack.db') | to_uuid }}"
  312. ######################################################################
  313. #
  314. # /matrix-bridge-mx-puppet-slack
  315. #
  316. ######################################################################
  317. ######################################################################
  318. #
  319. # matrix-bridge-mx-puppet-twitter
  320. #
  321. ######################################################################
  322. # We don't enable bridges by default.
  323. matrix_mx_puppet_twitter_enabled: false
  324. matrix_mx_puppet_twitter_container_image_self_build: "{{ matrix_architecture != 'amd64'}}"
  325. matrix_mx_puppet_twitter_systemd_required_services_list: |
  326. {{
  327. ['docker.service']
  328. +
  329. (['matrix-synapse.service'] if matrix_synapse_enabled else [])
  330. }}
  331. matrix_mx_puppet_twitter_appservice_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'mxtwt.as.tok') | to_uuid }}"
  332. matrix_mx_puppet_twitter_homeserver_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'mxtwt.hs.tok') | to_uuid }}"
  333. 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 '' }}"
  334. 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) }}"
  335. # Postgres is the default, except if not using `matrix_postgres` (internal postgres)
  336. matrix_mx_puppet_twitter_database_engine: "{{ 'postgres' if matrix_postgres_enabled else 'sqlite' }}"
  337. matrix_mx_puppet_twitter_database_password: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'as.mx_puppet_twitter.db') | to_uuid }}"
  338. ######################################################################
  339. #
  340. # /matrix-bridge-mx-puppet-twitter
  341. #
  342. ######################################################################
  343. ######################################################################
  344. #
  345. # matrix-bridge-mx-puppet-instagram
  346. #
  347. ######################################################################
  348. # We don't enable bridges by default.
  349. matrix_mx_puppet_instagram_enabled: false
  350. matrix_mx_puppet_instagram_container_image_self_build: "{{ matrix_architecture != 'amd64'}}"
  351. matrix_mx_puppet_instagram_systemd_required_services_list: |
  352. {{
  353. ['docker.service']
  354. +
  355. (['matrix-synapse.service'] if matrix_synapse_enabled else [])
  356. }}
  357. matrix_mx_puppet_instagram_appservice_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'mxig.as.tok') | to_uuid }}"
  358. matrix_mx_puppet_instagram_homeserver_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'mxig.hs.tok') | to_uuid }}"
  359. 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 '' }}"
  360. # Postgres is the default, except if not using `matrix_postgres` (internal postgres)
  361. matrix_mx_puppet_instagram_database_engine: "{{ 'postgres' if matrix_postgres_enabled else 'sqlite' }}"
  362. matrix_mx_puppet_instagram_database_password: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'as.mx_puppet_instagram.db') | to_uuid }}"
  363. ######################################################################
  364. #
  365. # /matrix-bridge-mx-puppet-instagram
  366. #
  367. ######################################################################
  368. ######################################################################
  369. #
  370. # matrix-bridge-mx-puppet-discord
  371. #
  372. ######################################################################
  373. # We don't enable bridges by default.
  374. matrix_mx_puppet_discord_enabled: false
  375. matrix_mx_puppet_discord_container_image_self_build: "{{ matrix_architecture != 'amd64'}}"
  376. matrix_mx_puppet_discord_systemd_required_services_list: |
  377. {{
  378. ['docker.service']
  379. +
  380. (['matrix-synapse.service'] if matrix_synapse_enabled else [])
  381. }}
  382. matrix_mx_puppet_discord_appservice_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'mxdsc.as.tok') | to_uuid }}"
  383. matrix_mx_puppet_discord_homeserver_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'mxdsc.hs.tok') | to_uuid }}"
  384. 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 '' }}"
  385. # Postgres is the default, except if not using `matrix_postgres` (internal postgres)
  386. matrix_mx_puppet_discord_database_engine: "{{ 'postgres' if matrix_postgres_enabled else 'sqlite' }}"
  387. matrix_mx_puppet_discord_database_password: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'as.mx_puppet_discord.db') | to_uuid }}"
  388. ######################################################################
  389. #
  390. # /matrix-bridge-mx-puppet-discord
  391. #
  392. ######################################################################
  393. ######################################################################
  394. #
  395. # matrix-bridge-mx-puppet-steam
  396. #
  397. ######################################################################
  398. # We don't enable bridges by default.
  399. matrix_mx_puppet_steam_enabled: false
  400. matrix_mx_puppet_steam_container_image_self_build: "{{ matrix_architecture != 'amd64'}}"
  401. matrix_mx_puppet_steam_systemd_required_services_list: |
  402. {{
  403. ['docker.service']
  404. +
  405. (['matrix-synapse.service'] if matrix_synapse_enabled else [])
  406. }}
  407. matrix_mx_puppet_steam_appservice_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'mxste.as.tok') | to_uuid }}"
  408. matrix_mx_puppet_steam_homeserver_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'mxste.hs.tok') | to_uuid }}"
  409. 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 '' }}"
  410. # Postgres is the default, except if not using `matrix_postgres` (internal postgres)
  411. matrix_mx_puppet_stream_database_engine: "{{ 'postgres' if matrix_postgres_enabled else 'sqlite' }}"
  412. matrix_mx_puppet_steam_database_password: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'as.mx_puppet_steam.db') | to_uuid }}"
  413. ######################################################################
  414. #
  415. # /matrix-bridge-mx-puppet-steam
  416. #
  417. ######################################################################
  418. ######################################################################
  419. #
  420. # matrix-bot-matrix-reminder-bot
  421. #
  422. ######################################################################
  423. # We don't enable bots by default.
  424. matrix_bot_matrix_reminder_bot_enabled: false
  425. # Postgres is the default, except if not using `matrix_postgres` (internal postgres)
  426. matrix_bot_matrix_reminder_bot_database_engine: "{{ 'postgres' if matrix_postgres_enabled else 'sqlite' }}"
  427. matrix_bot_matrix_reminder_bot_database_password: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'reminder.bot.db') | to_uuid }}"
  428. ######################################################################
  429. #
  430. # /matrix-bot-matrix-reminder-bot
  431. #
  432. ######################################################################
  433. ######################################################################
  434. #
  435. # matrix-corporal
  436. #
  437. ######################################################################
  438. matrix_corporal_enabled: false
  439. matrix_corporal_container_image_self_build: "{{ matrix_architecture != 'amd64' }}"
  440. # Normally, matrix-nginx-proxy is enabled and nginx can reach matrix-corporal over the container network.
  441. # If matrix-nginx-proxy is not enabled, or you otherwise have a need for it, you can expose
  442. # matrix-corporal's web-server ports to the local host.
  443. matrix_corporal_container_http_gateway_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:41080' }}"
  444. matrix_corporal_container_http_api_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:41081' }}"
  445. matrix_corporal_systemd_required_services_list: |
  446. {{
  447. (['docker.service'])
  448. +
  449. (['matrix-synapse.service'])
  450. }}
  451. matrix_corporal_matrix_homeserver_api_endpoint: "http://matrix-synapse:8008"
  452. matrix_corporal_matrix_auth_shared_secret: "{{ matrix_synapse_ext_password_provider_shared_secret_auth_shared_secret }}"
  453. matrix_corporal_matrix_registration_shared_secret: "{{ matrix_synapse_registration_shared_secret }}"
  454. ######################################################################
  455. #
  456. # /matrix-corporal
  457. #
  458. ######################################################################
  459. ######################################################################
  460. #
  461. # matrix-coturn
  462. #
  463. ######################################################################
  464. matrix_coturn_enabled: true
  465. matrix_coturn_container_image_self_build: "{{ matrix_architecture != 'amd64'}}"
  466. matrix_coturn_turn_external_ip_address: "{{ ansible_host }}"
  467. matrix_coturn_tls_enabled: "{{ matrix_ssl_retrieval_method != 'none' }}"
  468. matrix_coturn_tls_cert_path: "{{ matrix_ssl_config_dir_path }}/live/{{ matrix_server_fqn_matrix }}/fullchain.pem"
  469. matrix_coturn_tls_key_path: "{{ matrix_ssl_config_dir_path }}/live/{{ matrix_server_fqn_matrix }}/privkey.pem"
  470. matrix_coturn_container_additional_volumes: |
  471. {{
  472. ([] if matrix_ssl_retrieval_method == 'none' else [
  473. {
  474. 'src': matrix_ssl_config_dir_path,
  475. 'dst': matrix_ssl_config_dir_path,
  476. 'options': 'ro',
  477. }
  478. ])
  479. }}
  480. ######################################################################
  481. #
  482. # /matrix-coturn
  483. #
  484. ######################################################################
  485. ######################################################################
  486. #
  487. # matrix-dimension
  488. #
  489. ######################################################################
  490. matrix_dimension_enabled: false
  491. # Normally, matrix-nginx-proxy is enabled and nginx can reach Dimension over the container network.
  492. # If matrix-nginx-proxy is not enabled, or you otherwise have a need for it, you can expose
  493. # the Dimension HTTP port to the local host.
  494. matrix_dimension_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:8184' }}"
  495. matrix_integration_manager_rest_url: "{{ matrix_dimension_integrations_rest_url if matrix_dimension_enabled else None }}"
  496. matrix_integration_manager_ui_url: "{{ matrix_dimension_integrations_ui_url if matrix_dimension_enabled else None }}"
  497. # Postgres is the default, except if not using `matrix_postgres` (internal postgres)
  498. matrix_dimension_database_engine: "{{ 'postgres' if matrix_postgres_enabled else 'sqlite' }}"
  499. matrix_dimension_database_password: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'as.dimension.db') | to_uuid }}"
  500. ######################################################################
  501. #
  502. # /matrix-dimension
  503. #
  504. ######################################################################
  505. ######################################################################
  506. #
  507. # matrix-dynamic-dns
  508. #
  509. ######################################################################
  510. matrix_dynamic_dns_enabled: false
  511. ######################################################################
  512. #
  513. # /matrix-dynamic-dns
  514. #
  515. ######################################################################
  516. ######################################################################
  517. #
  518. # matrix-email2matrix
  519. #
  520. ######################################################################
  521. matrix_email2matrix_enabled: false
  522. ######################################################################
  523. #
  524. # /matrix-email2matrix
  525. #
  526. ######################################################################
  527. ######################################################################
  528. #
  529. # matrix-jitsi
  530. #
  531. ######################################################################
  532. matrix_jitsi_enabled: false
  533. # Normally, matrix-nginx-proxy is enabled and nginx can reach jitsi/web over the container network.
  534. # If matrix-nginx-proxy is not enabled, or you otherwise have a need for it, you can expose
  535. # the Jitsi HTTP port to the local host.
  536. matrix_jitsi_web_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:12080' }}"
  537. matrix_jitsi_jvb_container_colibri_ws_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:12090' }}"
  538. matrix_jitsi_jibri_xmpp_password: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'jibri') | to_uuid }}"
  539. matrix_jitsi_jicofo_auth_password: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'jicofo') | to_uuid }}"
  540. matrix_jitsi_jvb_auth_password: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'jvb') | to_uuid }}"
  541. matrix_jitsi_web_stun_servers: |
  542. {{
  543. [
  544. 'stun:' + matrix_server_fqn_matrix + ':5349',
  545. 'stun:' + matrix_server_fqn_matrix + ':3478',
  546. ]
  547. if matrix_coturn_enabled
  548. else [ 'stun:meet-jit-si-turnrelay.jitsi.net:443']
  549. }}
  550. ######################################################################
  551. #
  552. # /matrix-jitsi
  553. #
  554. ######################################################################
  555. ######################################################################
  556. #
  557. # matrix-mailer
  558. #
  559. ######################################################################
  560. # By default, this playbook sets up an exim mailer server (running in a container).
  561. # This is so that Synapse can send email reminders for unread messages.
  562. # Other services (like ma1sd), also use the mailer.
  563. matrix_mailer_enabled: true
  564. matrix_mailer_container_image_self_build: "{{ matrix_architecture != 'amd64'}}"
  565. ######################################################################
  566. #
  567. # /matrix-mailer
  568. #
  569. ######################################################################
  570. ######################################################################
  571. #
  572. # matrix-ma1sd
  573. #
  574. ######################################################################
  575. # By default, this playbook installs the ma1sd identity server on the same domain as Synapse (`matrix_server_fqn_matrix`).
  576. # If you wish to use the public identity servers (matrix.org, vector.im) instead of your own you may wish to disable this.
  577. matrix_ma1sd_enabled: true
  578. # There's no prebuilt ma1sd image for the `arm32` architecture.
  579. # We're relying on self-building there.
  580. matrix_ma1sd_architecture: "{{
  581. {
  582. 'amd64': 'amd64',
  583. 'arm32': 'arm32',
  584. 'arm64': 'arm64',
  585. }[matrix_architecture]
  586. }}"
  587. matrix_ma1sd_container_image_self_build: "{{ matrix_architecture not in ['arm64', 'amd64'] }}"
  588. # Normally, matrix-nginx-proxy is enabled and nginx can reach ma1sd over the container network.
  589. # If matrix-nginx-proxy is not enabled, or you otherwise have a need for it, you can expose
  590. # ma1sd's web-server port.
  591. matrix_ma1sd_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:8090' }}"
  592. # We enable Synapse integration via its Postgres database by default.
  593. # When using another Identity store, you might wish to disable this and define
  594. # your own configuration in `matrix_ma1sd_configuration_extension_yaml`.
  595. matrix_ma1sd_synapsesql_enabled: true
  596. matrix_ma1sd_synapsesql_type: postgresql
  597. matrix_ma1sd_synapsesql_connection: //{{ matrix_synapse_database_host }}/{{ matrix_synapse_database_database }}?user={{ matrix_synapse_database_user | urlencode() }}&password={{ matrix_synapse_database_password | urlencode() }}
  598. matrix_ma1sd_dns_overwrite_enabled: true
  599. matrix_ma1sd_dns_overwrite_homeserver_client_name: "{{ matrix_server_fqn_matrix }}"
  600. matrix_ma1sd_dns_overwrite_homeserver_client_value: "http://{{ 'matrix-corporal:41080' if matrix_corporal_enabled else 'matrix-synapse:8008' }}"
  601. # By default, we send mail through the `matrix-mailer` service.
  602. matrix_ma1sd_threepid_medium_email_identity_from: "{{ matrix_mailer_sender_address }}"
  603. matrix_ma1sd_threepid_medium_email_connectors_smtp_host: "matrix-mailer"
  604. matrix_ma1sd_threepid_medium_email_connectors_smtp_port: 8025
  605. matrix_ma1sd_threepid_medium_email_connectors_smtp_tls: 0
  606. matrix_ma1sd_self_check_validate_certificates: "{{ false if matrix_ssl_retrieval_method == 'self-signed' else true }}"
  607. matrix_ma1sd_systemd_wanted_services_list: |
  608. {{
  609. (['matrix-corporal.service'] if matrix_corporal_enabled else ['matrix-synapse.service'])
  610. +
  611. (['matrix-postgres.service'] if matrix_postgres_enabled else [])
  612. +
  613. (['matrix-mailer.service'] if matrix_mailer_enabled else [])
  614. }}
  615. ######################################################################
  616. #
  617. # /matrix-ma1sd
  618. #
  619. ######################################################################
  620. ######################################################################
  621. #
  622. # matrix-nginx-proxy
  623. #
  624. ######################################################################
  625. # By default, this playbook sets up a reverse-proxy nginx proxy server on TCP ports 80, 443 and 8448.
  626. # This is fine if you're dedicating the whole server to Matrix.
  627. # If that's not the case, you may wish to disable this and take care of proxying yourself.
  628. matrix_nginx_proxy_enabled: true
  629. matrix_nginx_proxy_proxy_matrix_client_api_addr_with_container: "{{ 'matrix-corporal:41080' if matrix_corporal_enabled else 'matrix-synapse:8008' }}"
  630. matrix_nginx_proxy_proxy_matrix_client_api_addr_sans_container: "{{ '127.0.0.1:41080' if matrix_corporal_enabled else '127.0.0.1:8008' }}"
  631. matrix_nginx_proxy_proxy_matrix_client_api_client_max_body_size_mb: "{{ matrix_synapse_max_upload_size_mb }}"
  632. matrix_nginx_proxy_proxy_matrix_client_api_forwarded_location_synapse_admin_api_enabled: "{{ matrix_synapse_admin_enabled }}"
  633. matrix_nginx_proxy_proxy_matrix_client_redirect_root_uri_to_domain: "{{ matrix_server_fqn_element if matrix_client_element_enabled else '' }}"
  634. matrix_nginx_proxy_proxy_matrix_enabled: true
  635. matrix_nginx_proxy_proxy_element_enabled: "{{ matrix_client_element_enabled }}"
  636. matrix_nginx_proxy_proxy_dimension_enabled: "{{ matrix_dimension_enabled }}"
  637. matrix_nginx_proxy_proxy_jitsi_enabled: "{{ matrix_jitsi_enabled }}"
  638. matrix_nginx_proxy_proxy_matrix_corporal_api_enabled: "{{ matrix_corporal_enabled and matrix_corporal_http_api_enabled }}"
  639. matrix_nginx_proxy_proxy_matrix_corporal_api_addr_with_container: "matrix-corporal:41081"
  640. matrix_nginx_proxy_proxy_matrix_corporal_api_addr_sans_container: "127.0.0.1:41081"
  641. matrix_nginx_proxy_proxy_matrix_identity_api_enabled: "{{ matrix_ma1sd_enabled }}"
  642. matrix_nginx_proxy_proxy_matrix_identity_api_addr_with_container: "matrix-ma1sd:8090"
  643. matrix_nginx_proxy_proxy_matrix_identity_api_addr_sans_container: "127.0.0.1:8090"
  644. # By default, we do TLS termination for the Matrix Federation API (port 8448) at matrix-nginx-proxy.
  645. # Unless this is handled there OR Synapse's federation listener port is disabled, we'll reverse-proxy.
  646. matrix_nginx_proxy_proxy_matrix_federation_api_enabled: "{{ matrix_synapse_federation_port_enabled and not matrix_synapse_tls_federation_listener_enabled }}"
  647. matrix_nginx_proxy_proxy_matrix_federation_api_addr_with_container: "matrix-synapse:8048"
  648. matrix_nginx_proxy_proxy_matrix_federation_api_addr_sans_container: "127.0.0.1:8048"
  649. matrix_nginx_proxy_container_federation_host_bind_port: "{{ matrix_federation_public_port }}"
  650. matrix_nginx_proxy_proxy_synapse_metrics: "{{ matrix_synapse_metrics_enabled }}"
  651. matrix_nginx_proxy_proxy_synapse_metrics_addr_with_container: "matrix-synapse:{{ matrix_synapse_metrics_port }}"
  652. matrix_nginx_proxy_proxy_synapse_metrics_addr_sans_container: "127.0.0.1:{{ matrix_synapse_metrics_port }}"
  653. matrix_nginx_proxy_proxy_matrix_user_directory_search_enabled: "{{ matrix_ma1sd_enabled }}"
  654. matrix_nginx_proxy_proxy_matrix_user_directory_search_addr_with_container: "{{ matrix_nginx_proxy_proxy_matrix_identity_api_addr_with_container }}"
  655. matrix_nginx_proxy_proxy_matrix_user_directory_search_addr_sans_container: "{{ matrix_nginx_proxy_proxy_matrix_identity_api_addr_sans_container }}"
  656. matrix_nginx_proxy_self_check_validate_certificates: "{{ false if matrix_ssl_retrieval_method == 'self-signed' else true }}"
  657. matrix_nginx_proxy_systemd_wanted_services_list: |
  658. {{
  659. (['matrix-synapse.service'])
  660. +
  661. (['matrix-corporal.service'] if matrix_corporal_enabled else [])
  662. +
  663. (['matrix-ma1sd.service'] if matrix_ma1sd_enabled else [])
  664. +
  665. (['matrix-client-element.service'] if matrix_client_element_enabled else [])
  666. }}
  667. matrix_ssl_domains_to_obtain_certificates_for: |
  668. {{
  669. ([matrix_server_fqn_matrix])
  670. +
  671. ([matrix_server_fqn_element] if matrix_client_element_enabled else [])
  672. +
  673. ([matrix_nginx_proxy_proxy_riot_compat_redirect_hostname] if matrix_nginx_proxy_proxy_riot_compat_redirect_enabled else [])
  674. +
  675. ([matrix_server_fqn_dimension] if matrix_dimension_enabled else [])
  676. +
  677. ([matrix_server_fqn_jitsi] if matrix_jitsi_enabled else [])
  678. +
  679. ([matrix_domain] if matrix_nginx_proxy_base_domain_serving_enabled else [])
  680. }}
  681. matrix_ssl_architecture: "{{
  682. {
  683. 'amd64': 'amd64',
  684. 'arm32': 'arm32v6',
  685. 'arm64': 'arm64v8',
  686. }[matrix_architecture]
  687. }}"
  688. matrix_ssl_pre_obtaining_required_service_name: "{{ 'matrix-dynamic-dns' if matrix_dynamic_dns_enabled else '' }}"
  689. ######################################################################
  690. #
  691. # /matrix-nginx-proxy
  692. #
  693. ######################################################################
  694. ######################################################################
  695. #
  696. # matrix-postgres
  697. #
  698. ######################################################################
  699. matrix_postgres_enabled: true
  700. matrix_postgres_connection_hostname: "matrix-postgres"
  701. matrix_postgres_connection_username: "synapse"
  702. # Please note that the max length of the password is 99 characters
  703. matrix_postgres_connection_password: "synapse-password"
  704. matrix_postgres_db_name: "homeserver"
  705. matrix_postgres_additional_databases: |
  706. {{
  707. ([{
  708. 'name': matrix_bot_matrix_reminder_bot_database_db_name,
  709. 'username': matrix_bot_matrix_reminder_bot_database_username,
  710. 'password': matrix_bot_matrix_reminder_bot_database_password,
  711. }] 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 [])
  712. +
  713. ([{
  714. 'name': matrix_appservice_discord_database_db_name,
  715. 'username': matrix_appservice_discord_database_username,
  716. 'password': matrix_appservice_discord_database_password,
  717. }] if (matrix_appservice_discord_enabled and matrix_appservice_discord_database_engine == 'postgres' and matrix_appservice_discord_database_hostname == 'matrix-postgres') else [])
  718. + ([{
  719. 'name': matrix_appservice_slack_database_db_name,
  720. 'username': matrix_appservice_slack_database_username,
  721. 'password': matrix_appservice_slack_database_password,
  722. }] if (matrix_appservice_slack_enabled and matrix_appservice_slack_database_engine == 'postgres' and matrix_appservice_slack_database_hostname == 'matrix-postgres') else [])
  723. + ([{
  724. 'name': matrix_appservice_irc_database_db_name,
  725. 'username': matrix_appservice_irc_database_username,
  726. 'password': matrix_appservice_irc_database_password,
  727. }] if (matrix_appservice_irc_enabled and matrix_appservice_irc_database_engine == 'postgres' and matrix_appservice_irc_database_hostname == 'matrix-postgres') else [])
  728. + ([{
  729. 'name': matrix_mautrix_facebook_database_db_name,
  730. 'username': matrix_mautrix_facebook_database_username,
  731. 'password': matrix_mautrix_facebook_database_password,
  732. }] if (matrix_mautrix_facebook_enabled and matrix_mautrix_facebook_database_engine == 'postgres' and matrix_mautrix_facebook_database_hostname == 'matrix-postgres') else [])
  733. + ([{
  734. 'name': matrix_mautrix_hangouts_database_db_name,
  735. 'username': matrix_mautrix_hangouts_database_username,
  736. 'password': matrix_mautrix_hangouts_database_password,
  737. }] if (matrix_mautrix_hangouts_enabled and matrix_mautrix_hangouts_database_engine == 'postgres' and matrix_mautrix_hangouts_database_hostname == 'matrix-postgres') else [])
  738. + ([{
  739. 'name': matrix_mautrix_telegram_database_db_name,
  740. 'username': matrix_mautrix_telegram_database_username,
  741. 'password': matrix_mautrix_telegram_database_password,
  742. }] if (matrix_mautrix_telegram_enabled and matrix_mautrix_telegram_database_engine == 'postgres' and matrix_mautrix_telegram_database_hostname == 'matrix-postgres') else [])
  743. + ([{
  744. 'name': matrix_mautrix_whatsapp_database_db_name,
  745. 'username': matrix_mautrix_whatsapp_database_username,
  746. 'password': matrix_mautrix_whatsapp_database_password,
  747. }] if (matrix_mautrix_whatsapp_enabled and matrix_mautrix_whatsapp_database_engine == 'postgres' and matrix_mautrix_whatsapp_database_hostname == 'matrix-postgres') else [])
  748. + ([{
  749. 'name': 'matrix_bridge_sms',
  750. 'username': 'matrix_bridge_sms',
  751. 'password': matrix_synapse_macaroon_secret_key | password_hash('sha512', 'bridge_sms.db.secret') | to_uuid,
  752. }] if matrix_sms_bridge_enabled else [])
  753. + ([{
  754. 'name': matrix_mx_puppet_skype_database_db_name,
  755. 'username': matrix_mx_puppet_skype_database_username,
  756. 'password': matrix_mx_puppet_skype_database_password,
  757. }] if (matrix_mx_puppet_skype_enabled and matrix_mx_puppet_skype_database_engine == 'postgres' and matrix_mx_puppet_skype_database_hostname == 'matrix-postgres') else [])
  758. + ([{
  759. 'name': matrix_mx_puppet_slack_database_db_name,
  760. 'username': matrix_mx_puppet_slack_database_username,
  761. 'password': matrix_mx_puppet_slack_database_password,
  762. }] if (matrix_mx_puppet_slack_enabled and matrix_mx_puppet_slack_database_engine == 'postgres' and matrix_mx_puppet_slack_database_hostname == 'matrix-postgres') else [])
  763. + ([{
  764. 'name': matrix_mx_puppet_twitter_database_db_name,
  765. 'username': matrix_mx_puppet_twitter_database_username,
  766. 'password': matrix_mx_puppet_twitter_database_password,
  767. }] if (matrix_mx_puppet_twitter_enabled and matrix_mx_puppet_twitter_database_engine == 'postgres' and matrix_mx_puppet_twitter_database_hostname == 'matrix-postgres') else [])
  768. + ([{
  769. 'name': matrix_mx_puppet_instagram_database_db_name,
  770. 'username': matrix_mx_puppet_instagram_database_username,
  771. 'password': matrix_mx_puppet_instagram_database_password,
  772. }] if (matrix_mx_puppet_instagram_enabled
  773. and matrix_mx_puppet_instagram_database_engine == 'postgres'
  774. and matrix_mx_puppet_instagram_database_hostname == 'matrix-postgres') else [])
  775. + ([{
  776. 'name': matrix_mx_puppet_discord_database_db_name,
  777. 'username': matrix_mx_puppet_discord_database_username,
  778. 'password': matrix_mx_puppet_discord_database_password,
  779. }] if (matrix_mx_puppet_discord_enabled
  780. and matrix_mx_puppet_discord_database_engine == 'postgres'
  781. and matrix_mx_puppet_discord_database_hostname == 'matrix-postgres') else [])
  782. + ([{
  783. 'name': matrix_mx_puppet_steam_database_db_name,
  784. 'username': matrix_mx_puppet_steam_database_username,
  785. 'password': matrix_mx_puppet_steam_database_password,
  786. }] if (matrix_mx_puppet_steam_enabled
  787. and matrix_mx_puppet_steam_database_engine == 'postgres'
  788. and matrix_mx_puppet_steam_database_hostname == 'matrix-postgres') else [])
  789. + ([{
  790. 'name': matrix_dimension_database_db_name,
  791. 'username': matrix_dimension_database_username,
  792. 'password': matrix_dimension_database_password,
  793. }] if (matrix_dimension_enabled
  794. and matrix_dimension_database_engine == 'postgres'
  795. and matrix_dimension_database_hostname == 'matrix-postgres') else [])
  796. }}
  797. ######################################################################
  798. #
  799. # /matrix-postgres
  800. #
  801. ######################################################################
  802. ######################################################################
  803. #
  804. # matrix-client-element
  805. #
  806. ######################################################################
  807. # By default, this playbook installs the Element web UI on the `matrix_server_fqn_element` domain.
  808. # If you wish to connect to your Matrix server by other means, you may wish to disable this.
  809. matrix_client_element_enabled: true
  810. matrix_client_element_container_image_self_build: "{{ matrix_architecture != 'amd64' }}"
  811. # Normally, matrix-nginx-proxy is enabled and nginx can reach Element over the container network.
  812. # If matrix-nginx-proxy is not enabled, or you otherwise have a need for it, you can expose
  813. # the Element HTTP port to the local host.
  814. matrix_client_element_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:8765' }}"
  815. matrix_client_element_default_hs_url: "{{ matrix_homeserver_url }}"
  816. matrix_client_element_default_is_url: "{{ matrix_identity_server_url }}"
  817. # Use Dimension if enabled, otherwise fall back to Scalar
  818. matrix_client_element_integrations_ui_url: "{{ matrix_dimension_integrations_ui_url if matrix_dimension_enabled else 'https://scalar.vector.im/' }}"
  819. matrix_client_element_integrations_rest_url: "{{ matrix_dimension_integrations_rest_url if matrix_dimension_enabled else 'https://scalar.vector.im/api' }}"
  820. matrix_client_element_integrations_widgets_urls: "{{ matrix_dimension_integrations_widgets_urls if matrix_dimension_enabled else ['https://scalar.vector.im/api'] }}"
  821. 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' }}"
  822. matrix_client_element_self_check_validate_certificates: "{{ false if matrix_ssl_retrieval_method == 'self-signed' else true }}"
  823. matrix_client_element_registration_enabled: "{{ matrix_synapse_enable_registration }}"
  824. matrix_client_element_enable_presence_by_hs_url: |
  825. {{
  826. none
  827. if matrix_synapse_use_presence
  828. else {matrix_client_element_default_hs_url: false}
  829. }}
  830. matrix_client_element_welcome_user_id: ~
  831. matrix_client_element_jitsi_preferredDomain: "{{ matrix_server_fqn_jitsi if matrix_jitsi_enabled else '' }}"
  832. ######################################################################
  833. #
  834. # /matrix-client-element
  835. #
  836. ######################################################################
  837. ######################################################################
  838. #
  839. # matrix-synapse
  840. #
  841. ######################################################################
  842. matrix_synapse_container_image_self_build: "{{ matrix_architecture not in ['arm32', 'arm64', 'amd64'] }}"
  843. # When ma1sd is enabled, we can use it to validate email addresses and phone numbers.
  844. # 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.
  845. matrix_synapse_account_threepid_delegates_email: "{{ 'http://matrix-ma1sd:8090' if matrix_ma1sd_enabled else '' }}"
  846. matrix_synapse_account_threepid_delegates_msisdn: "{{ 'http://matrix-ma1sd:8090' if matrix_ma1sd_enabled else '' }}"
  847. # Normally, matrix-nginx-proxy is enabled and nginx can reach Synapse over the container network.
  848. # If matrix-nginx-proxy is not enabled, or you otherwise have a need for it,
  849. # you can expose Synapse's ports to the host.
  850. #
  851. # For exposing the Matrix Client API's port (plain HTTP) to the local host.
  852. matrix_synapse_container_client_api_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:8008' }}"
  853. #
  854. # For exposing the Matrix Federation API's plain port (plain HTTP) to the local host.
  855. matrix_synapse_container_federation_api_plain_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:8048' }}"
  856. #
  857. # For exposing the Matrix Federation API's TLS port (HTTPS) to the internet on all network interfaces.
  858. 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 '' }}"
  859. #
  860. # For exposing the Synapse Metrics API's port (plain HTTP) to the local host.
  861. 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 '' }}"
  862. #
  863. # For exposing the Synapse Manhole port (plain HTTP) to the local host.
  864. matrix_synapse_container_manhole_api_host_bind_port: "{{ '127.0.0.1:9000' if matrix_synapse_manhole_enabled else '' }}"
  865. matrix_synapse_database_host: "{{ matrix_postgres_connection_hostname }}"
  866. matrix_synapse_database_user: "{{ matrix_postgres_connection_username }}"
  867. matrix_synapse_database_password: "{{ matrix_postgres_connection_password }}"
  868. matrix_synapse_database_database: "{{ matrix_postgres_db_name }}"
  869. # We do not enable TLS in Synapse by default.
  870. # TLS is handled by the matrix-nginx-proxy, which proxies the requests to Synapse.
  871. matrix_synapse_tls_federation_listener_enabled: false
  872. matrix_synapse_tls_certificate_path: ~
  873. matrix_synapse_tls_private_key_path: ~
  874. matrix_synapse_federation_port_openid_resource_required: "{{ not matrix_synapse_federation_enabled and (matrix_dimension_enabled or matrix_ma1sd_enabled) }}"
  875. matrix_synapse_email_enabled: "{{ matrix_mailer_enabled }}"
  876. matrix_synapse_email_smtp_host: "matrix-mailer"
  877. matrix_synapse_email_smtp_port: 8025
  878. matrix_synapse_email_smtp_require_transport_security: false
  879. matrix_synapse_email_notif_from: "Matrix <{{ matrix_mailer_sender_address }}>"
  880. # Even if TURN doesn't support TLS (it does by default),
  881. # it doesn't hurt to try a secure connection anyway.
  882. matrix_synapse_turn_uris: |
  883. {{
  884. [
  885. 'turns:' + matrix_server_fqn_matrix + '?transport=udp',
  886. 'turns:' + matrix_server_fqn_matrix + '?transport=tcp',
  887. 'turn:' + matrix_server_fqn_matrix + '?transport=udp',
  888. 'turn:' + matrix_server_fqn_matrix + '?transport=tcp',
  889. ]
  890. if matrix_coturn_enabled
  891. else []
  892. }}
  893. matrix_synapse_turn_shared_secret: "{{ matrix_coturn_turn_static_auth_secret if matrix_coturn_enabled else '' }}"
  894. matrix_synapse_self_check_validate_certificates: "{{ false if matrix_ssl_retrieval_method == 'self-signed' else true }}"
  895. matrix_synapse_systemd_required_services_list: |
  896. {{
  897. (['docker.service'])
  898. +
  899. (['matrix-postgres.service'] if matrix_postgres_enabled else [])
  900. +
  901. (['matrix-goofys'] if matrix_s3_media_store_enabled else [])
  902. }}
  903. matrix_synapse_systemd_wanted_services_list: |
  904. {{
  905. (['matrix-coturn.service'] if matrix_coturn_enabled else [])
  906. +
  907. (['matrix-mailer.service'] if matrix_mailer_enabled else [])
  908. }}
  909. ######################################################################
  910. #
  911. # /matrix-synapse
  912. #
  913. ######################################################################
  914. ######################################################################
  915. #
  916. # matrix-synapse-admin
  917. #
  918. ######################################################################
  919. matrix_synapse_admin_enabled: false
  920. # Normally, matrix-nginx-proxy is enabled and nginx can reach Synapse Admin over the container network.
  921. # If matrix-nginx-proxy is not enabled, or you otherwise have a need for it, you can expose
  922. # Synapse Admin's HTTP port to the local host.
  923. matrix_synapse_admin_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:8766' }}"
  924. matrix_synapse_admin_container_self_build: "{{ matrix_architecture != 'amd64' }}"
  925. ######################################################################
  926. #
  927. # /matrix-synapse-admin
  928. #
  929. ######################################################################
  930. ######################################################################
  931. #
  932. # matrix-registration
  933. #
  934. ######################################################################
  935. matrix_registration_enabled: false
  936. # Normally, matrix-nginx-proxy is enabled and nginx can reach matrix-registration over the container network.
  937. # If matrix-nginx-proxy is not enabled, or you otherwise have a need for it, you can expose
  938. # matrix-registration's HTTP port to the local host.
  939. matrix_registration_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:8767' }}"
  940. matrix_registration_riot_instance: "{{ ('https://' + matrix_server_fqn_element) if matrix_client_element_enabled else 'https://riot.im/app/' }}"
  941. matrix_registration_shared_secret: "{{ matrix_synapse_registration_shared_secret if matrix_synapse_enabled else '' }}"
  942. matrix_registration_server_location: "{{ 'http://matrix-synapse:8008' if matrix_synapse_enabled else '' }}"
  943. matrix_registration_api_validate_certs: "{{ false if matrix_ssl_retrieval_method == 'self-signed' else true }}"
  944. matrix_registration_container_image_self_build: "{{ matrix_architecture != 'amd64' }}"
  945. ######################################################################
  946. #
  947. # /matrix-registration
  948. #
  949. ######################################################################