Matrix Docker Ansible eploy
Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.
 
 

1238 righe
53 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_postgres_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. ######################################################################
  426. #
  427. # /matrix-bot-matrix-reminder-bot
  428. #
  429. ######################################################################
  430. ######################################################################
  431. #
  432. # matrix-corporal
  433. #
  434. ######################################################################
  435. matrix_corporal_enabled: false
  436. matrix_corporal_container_image_self_build: "{{ matrix_architecture != 'amd64' }}"
  437. # Normally, matrix-nginx-proxy is enabled and nginx can reach matrix-corporal over the container network.
  438. # If matrix-nginx-proxy is not enabled, or you otherwise have a need for it, you can expose
  439. # matrix-corporal's web-server ports to the local host.
  440. matrix_corporal_container_http_gateway_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:41080' }}"
  441. matrix_corporal_container_http_api_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:41081' }}"
  442. matrix_corporal_systemd_required_services_list: |
  443. {{
  444. (['docker.service'])
  445. +
  446. (['matrix-synapse.service'])
  447. }}
  448. matrix_corporal_matrix_homeserver_api_endpoint: "http://matrix-synapse:8008"
  449. matrix_corporal_matrix_auth_shared_secret: "{{ matrix_synapse_ext_password_provider_shared_secret_auth_shared_secret }}"
  450. matrix_corporal_matrix_registration_shared_secret: "{{ matrix_synapse_registration_shared_secret }}"
  451. ######################################################################
  452. #
  453. # /matrix-corporal
  454. #
  455. ######################################################################
  456. ######################################################################
  457. #
  458. # matrix-coturn
  459. #
  460. ######################################################################
  461. matrix_coturn_enabled: true
  462. matrix_coturn_container_image_self_build: "{{ matrix_architecture != 'amd64'}}"
  463. matrix_coturn_turn_external_ip_address: "{{ ansible_host }}"
  464. matrix_coturn_tls_enabled: "{{ matrix_ssl_retrieval_method != 'none' }}"
  465. matrix_coturn_tls_cert_path: "{{ matrix_ssl_config_dir_path }}/live/{{ matrix_server_fqn_matrix }}/fullchain.pem"
  466. matrix_coturn_tls_key_path: "{{ matrix_ssl_config_dir_path }}/live/{{ matrix_server_fqn_matrix }}/privkey.pem"
  467. matrix_coturn_container_additional_volumes: |
  468. {{
  469. ([] if matrix_ssl_retrieval_method == 'none' else [
  470. {
  471. 'src': matrix_ssl_config_dir_path,
  472. 'dst': matrix_ssl_config_dir_path,
  473. 'options': 'ro',
  474. }
  475. ])
  476. }}
  477. ######################################################################
  478. #
  479. # /matrix-coturn
  480. #
  481. ######################################################################
  482. ######################################################################
  483. #
  484. # matrix-dimension
  485. #
  486. ######################################################################
  487. matrix_dimension_enabled: false
  488. # Normally, matrix-nginx-proxy is enabled and nginx can reach Dimension over the container network.
  489. # If matrix-nginx-proxy is not enabled, or you otherwise have a need for it, you can expose
  490. # the Dimension HTTP port to the local host.
  491. matrix_dimension_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:8184' }}"
  492. matrix_integration_manager_rest_url: "{{ matrix_dimension_integrations_rest_url if matrix_dimension_enabled else None }}"
  493. matrix_integration_manager_ui_url: "{{ matrix_dimension_integrations_ui_url if matrix_dimension_enabled else None }}"
  494. # Postgres is the default, except if not using `matrix_postgres` (internal postgres)
  495. matrix_dimension_database_engine: "{{ 'postgres' if matrix_postgres_enabled else 'sqlite' }}"
  496. matrix_dimension_database_password: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'as.dimension.db') | to_uuid }}"
  497. ######################################################################
  498. #
  499. # /matrix-dimension
  500. #
  501. ######################################################################
  502. ######################################################################
  503. #
  504. # matrix-dynamic-dns
  505. #
  506. ######################################################################
  507. matrix_dynamic_dns_enabled: false
  508. ######################################################################
  509. #
  510. # /matrix-dynamic-dns
  511. #
  512. ######################################################################
  513. ######################################################################
  514. #
  515. # matrix-email2matrix
  516. #
  517. ######################################################################
  518. matrix_email2matrix_enabled: false
  519. ######################################################################
  520. #
  521. # /matrix-email2matrix
  522. #
  523. ######################################################################
  524. ######################################################################
  525. #
  526. # matrix-jitsi
  527. #
  528. ######################################################################
  529. matrix_jitsi_enabled: false
  530. # Normally, matrix-nginx-proxy is enabled and nginx can reach jitsi/web over the container network.
  531. # If matrix-nginx-proxy is not enabled, or you otherwise have a need for it, you can expose
  532. # the Jitsi HTTP port to the local host.
  533. matrix_jitsi_web_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:12080' }}"
  534. matrix_jitsi_jvb_container_colibri_ws_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:12090' }}"
  535. matrix_jitsi_jibri_xmpp_password: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'jibri') | to_uuid }}"
  536. matrix_jitsi_jicofo_auth_password: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'jicofo') | to_uuid }}"
  537. matrix_jitsi_jvb_auth_password: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'jvb') | to_uuid }}"
  538. matrix_jitsi_web_stun_servers: |
  539. {{
  540. [
  541. 'stun:' + matrix_server_fqn_matrix + ':5349',
  542. 'stun:' + matrix_server_fqn_matrix + ':3478',
  543. ]
  544. if matrix_coturn_enabled
  545. else [ 'stun:meet-jit-si-turnrelay.jitsi.net:443']
  546. }}
  547. ######################################################################
  548. #
  549. # /matrix-jitsi
  550. #
  551. ######################################################################
  552. ######################################################################
  553. #
  554. # matrix-mailer
  555. #
  556. ######################################################################
  557. # By default, this playbook sets up an exim mailer server (running in a container).
  558. # This is so that Synapse can send email reminders for unread messages.
  559. # Other services (like ma1sd), also use the mailer.
  560. matrix_mailer_enabled: true
  561. matrix_mailer_container_image_self_build: "{{ matrix_architecture != 'amd64'}}"
  562. ######################################################################
  563. #
  564. # /matrix-mailer
  565. #
  566. ######################################################################
  567. ######################################################################
  568. #
  569. # matrix-ma1sd
  570. #
  571. ######################################################################
  572. # By default, this playbook installs the ma1sd identity server on the same domain as Synapse (`matrix_server_fqn_matrix`).
  573. # If you wish to use the public identity servers (matrix.org, vector.im) instead of your own you may wish to disable this.
  574. matrix_ma1sd_enabled: true
  575. # There's no prebuilt ma1sd image for the `arm32` architecture.
  576. # We're relying on self-building there.
  577. matrix_ma1sd_architecture: "{{
  578. {
  579. 'amd64': 'amd64',
  580. 'arm32': 'arm32',
  581. 'arm64': 'arm64',
  582. }[matrix_architecture]
  583. }}"
  584. matrix_ma1sd_container_image_self_build: "{{ matrix_architecture not in ['arm64', 'amd64'] }}"
  585. # Normally, matrix-nginx-proxy is enabled and nginx can reach ma1sd over the container network.
  586. # If matrix-nginx-proxy is not enabled, or you otherwise have a need for it, you can expose
  587. # ma1sd's web-server port.
  588. matrix_ma1sd_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:8090' }}"
  589. # We enable Synapse integration via its Postgres database by default.
  590. # When using another Identity store, you might wish to disable this and define
  591. # your own configuration in `matrix_ma1sd_configuration_extension_yaml`.
  592. matrix_ma1sd_synapsesql_enabled: true
  593. matrix_ma1sd_synapsesql_type: postgresql
  594. matrix_ma1sd_synapsesql_connection: //{{ matrix_synapse_database_host }}/{{ matrix_synapse_database_database }}?user={{ matrix_synapse_database_user | urlencode() }}&password={{ matrix_synapse_database_password | urlencode() }}
  595. matrix_ma1sd_dns_overwrite_enabled: true
  596. matrix_ma1sd_dns_overwrite_homeserver_client_name: "{{ matrix_server_fqn_matrix }}"
  597. matrix_ma1sd_dns_overwrite_homeserver_client_value: "http://{{ 'matrix-corporal:41080' if matrix_corporal_enabled else 'matrix-synapse:8008' }}"
  598. # By default, we send mail through the `matrix-mailer` service.
  599. matrix_ma1sd_threepid_medium_email_identity_from: "{{ matrix_mailer_sender_address }}"
  600. matrix_ma1sd_threepid_medium_email_connectors_smtp_host: "matrix-mailer"
  601. matrix_ma1sd_threepid_medium_email_connectors_smtp_port: 8025
  602. matrix_ma1sd_threepid_medium_email_connectors_smtp_tls: 0
  603. matrix_ma1sd_self_check_validate_certificates: "{{ false if matrix_ssl_retrieval_method == 'self-signed' else true }}"
  604. matrix_ma1sd_systemd_wanted_services_list: |
  605. {{
  606. (['matrix-corporal.service'] if matrix_corporal_enabled else ['matrix-synapse.service'])
  607. +
  608. (['matrix-postgres.service'] if matrix_postgres_enabled else [])
  609. +
  610. (['matrix-mailer.service'] if matrix_mailer_enabled else [])
  611. }}
  612. ######################################################################
  613. #
  614. # /matrix-ma1sd
  615. #
  616. ######################################################################
  617. ######################################################################
  618. #
  619. # matrix-nginx-proxy
  620. #
  621. ######################################################################
  622. # By default, this playbook sets up a reverse-proxy nginx proxy server on TCP ports 80, 443 and 8448.
  623. # This is fine if you're dedicating the whole server to Matrix.
  624. # If that's not the case, you may wish to disable this and take care of proxying yourself.
  625. matrix_nginx_proxy_enabled: true
  626. matrix_nginx_proxy_proxy_matrix_client_api_addr_with_container: "{{ 'matrix-corporal:41080' if matrix_corporal_enabled else 'matrix-synapse:8008' }}"
  627. 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' }}"
  628. matrix_nginx_proxy_proxy_matrix_client_api_client_max_body_size_mb: "{{ matrix_synapse_max_upload_size_mb }}"
  629. matrix_nginx_proxy_proxy_matrix_client_api_forwarded_location_synapse_admin_api_enabled: "{{ matrix_synapse_admin_enabled }}"
  630. matrix_nginx_proxy_proxy_matrix_client_redirect_root_uri_to_domain: "{{ matrix_server_fqn_element if matrix_client_element_enabled else '' }}"
  631. matrix_nginx_proxy_proxy_matrix_enabled: true
  632. matrix_nginx_proxy_proxy_element_enabled: "{{ matrix_client_element_enabled }}"
  633. matrix_nginx_proxy_proxy_dimension_enabled: "{{ matrix_dimension_enabled }}"
  634. matrix_nginx_proxy_proxy_jitsi_enabled: "{{ matrix_jitsi_enabled }}"
  635. matrix_nginx_proxy_proxy_matrix_corporal_api_enabled: "{{ matrix_corporal_enabled and matrix_corporal_http_api_enabled }}"
  636. matrix_nginx_proxy_proxy_matrix_corporal_api_addr_with_container: "matrix-corporal:41081"
  637. matrix_nginx_proxy_proxy_matrix_corporal_api_addr_sans_container: "127.0.0.1:41081"
  638. matrix_nginx_proxy_proxy_matrix_identity_api_enabled: "{{ matrix_ma1sd_enabled }}"
  639. matrix_nginx_proxy_proxy_matrix_identity_api_addr_with_container: "matrix-ma1sd:8090"
  640. matrix_nginx_proxy_proxy_matrix_identity_api_addr_sans_container: "127.0.0.1:8090"
  641. # By default, we do TLS termination for the Matrix Federation API (port 8448) at matrix-nginx-proxy.
  642. # Unless this is handled there OR Synapse's federation listener port is disabled, we'll reverse-proxy.
  643. matrix_nginx_proxy_proxy_matrix_federation_api_enabled: "{{ matrix_synapse_federation_port_enabled and not matrix_synapse_tls_federation_listener_enabled }}"
  644. matrix_nginx_proxy_proxy_matrix_federation_api_addr_with_container: "matrix-synapse:8048"
  645. matrix_nginx_proxy_proxy_matrix_federation_api_addr_sans_container: "127.0.0.1:8048"
  646. matrix_nginx_proxy_container_federation_host_bind_port: "{{ matrix_federation_public_port }}"
  647. matrix_nginx_proxy_proxy_synapse_metrics: "{{ matrix_synapse_metrics_enabled }}"
  648. matrix_nginx_proxy_proxy_synapse_metrics_addr_with_container: "matrix-synapse:{{ matrix_synapse_metrics_port }}"
  649. matrix_nginx_proxy_proxy_synapse_metrics_addr_sans_container: "127.0.0.1:{{ matrix_synapse_metrics_port }}"
  650. matrix_nginx_proxy_proxy_matrix_user_directory_search_enabled: "{{ matrix_ma1sd_enabled }}"
  651. matrix_nginx_proxy_proxy_matrix_user_directory_search_addr_with_container: "{{ matrix_nginx_proxy_proxy_matrix_identity_api_addr_with_container }}"
  652. matrix_nginx_proxy_proxy_matrix_user_directory_search_addr_sans_container: "{{ matrix_nginx_proxy_proxy_matrix_identity_api_addr_sans_container }}"
  653. matrix_nginx_proxy_self_check_validate_certificates: "{{ false if matrix_ssl_retrieval_method == 'self-signed' else true }}"
  654. matrix_nginx_proxy_systemd_wanted_services_list: |
  655. {{
  656. (['matrix-synapse.service'])
  657. +
  658. (['matrix-corporal.service'] if matrix_corporal_enabled else [])
  659. +
  660. (['matrix-ma1sd.service'] if matrix_ma1sd_enabled else [])
  661. +
  662. (['matrix-client-element.service'] if matrix_client_element_enabled else [])
  663. }}
  664. matrix_ssl_domains_to_obtain_certificates_for: |
  665. {{
  666. ([matrix_server_fqn_matrix])
  667. +
  668. ([matrix_server_fqn_element] if matrix_client_element_enabled else [])
  669. +
  670. ([matrix_nginx_proxy_proxy_riot_compat_redirect_hostname] if matrix_nginx_proxy_proxy_riot_compat_redirect_enabled else [])
  671. +
  672. ([matrix_server_fqn_dimension] if matrix_dimension_enabled else [])
  673. +
  674. ([matrix_server_fqn_jitsi] if matrix_jitsi_enabled else [])
  675. +
  676. ([matrix_domain] if matrix_nginx_proxy_base_domain_serving_enabled else [])
  677. }}
  678. matrix_ssl_architecture: "{{
  679. {
  680. 'amd64': 'amd64',
  681. 'arm32': 'arm32v6',
  682. 'arm64': 'arm64v8',
  683. }[matrix_architecture]
  684. }}"
  685. matrix_ssl_pre_obtaining_required_service_name: "{{ 'matrix-dynamic-dns' if matrix_dynamic_dns_enabled else '' }}"
  686. ######################################################################
  687. #
  688. # /matrix-nginx-proxy
  689. #
  690. ######################################################################
  691. ######################################################################
  692. #
  693. # matrix-postgres
  694. #
  695. ######################################################################
  696. matrix_postgres_enabled: true
  697. matrix_postgres_connection_hostname: "matrix-postgres"
  698. matrix_postgres_connection_username: "synapse"
  699. # Please note that the max length of the password is 99 characters
  700. matrix_postgres_connection_password: "synapse-password"
  701. matrix_postgres_db_name: "homeserver"
  702. matrix_postgres_additional_databases: |
  703. {{
  704. ([{
  705. 'name': matrix_appservice_discord_postgres_db_name,
  706. 'username': matrix_appservice_discord_postgres_username,
  707. 'password': matrix_appservice_discord_postgres_password,
  708. }] if (matrix_appservice_discord_enabled and matrix_appservice_discord_database_engine == 'postgres' and matrix_appservice_discord_postgres_hostname == 'matrix-postgres') else [])
  709. + ([{
  710. 'name': matrix_appservice_slack_postgres_db_name,
  711. 'username': matrix_appservice_slack_postgres_username,
  712. 'password': matrix_appservice_slack_postgres_password,
  713. }] if (matrix_appservice_slack_enabled and matrix_appservice_slack_database_engine == 'postgres' and matrix_appservice_slack_database_hostname == 'matrix-postgres') else [])
  714. + ([{
  715. 'name': matrix_appservice_irc_postgres_db_name,
  716. 'username': matrix_appservice_irc_postgres_username,
  717. 'password': matrix_appservice_irc_postgres_password,
  718. }] if (matrix_appservice_irc_enabled and matrix_appservice_irc_database_engine == 'postgres' and matrix_appservice_irc_database_hostname == 'matrix-postgres') else [])
  719. + ([{
  720. 'name': matrix_mautrix_facebook_postgres_db_name,
  721. 'username': matrix_mautrix_facebook_postgres_username,
  722. 'password': matrix_mautrix_facebook_postgres_password,
  723. }] if (matrix_mautrix_facebook_enabled and matrix_mautrix_facebook_database_engine == 'postgres' and matrix_mautrix_facebook_postgres_hostname == 'matrix-postgres') else [])
  724. + ([{
  725. 'name': matrix_mautrix_hangouts_postgres_db_name,
  726. 'username': matrix_mautrix_hangouts_postgres_username,
  727. 'password': matrix_mautrix_hangouts_postgres_password,
  728. }] if (matrix_mautrix_hangouts_enabled and matrix_mautrix_hangouts_database_engine == 'postgres' and matrix_mautrix_hangouts_database_hostname == 'matrix-postgres') else [])
  729. + ([{
  730. 'name': matrix_mautrix_telegram_postgres_db_name,
  731. 'username': matrix_mautrix_telegram_postgres_username,
  732. 'password': matrix_mautrix_telegram_postgres_password,
  733. }] if (matrix_mautrix_telegram_enabled and matrix_mautrix_telegram_database_engine == 'postgres' and matrix_telegram_facebook_database_hostname == 'matrix-postgres') else [])
  734. + ([{
  735. 'name': matrix_mautrix_whatsapp_postgres_db_name,
  736. 'username': matrix_mautrix_whatsapp_postgres_username,
  737. 'password': matrix_mautrix_whatsapp_postgres_password,
  738. }] if (matrix_mautrix_whatsapp_enabled and matrix_mautrix_whatsapp_database_engine == 'postgres' and matrix_mautrix_whatsapp_database_hostname == 'matrix-postgres') else [])
  739. + ([{
  740. 'name': 'matrix_bridge_sms',
  741. 'username': 'matrix_bridge_sms',
  742. 'password': matrix_synapse_macaroon_secret_key | password_hash('sha512', 'bridge_sms.db.secret') | to_uuid,
  743. }] if matrix_sms_bridge_enabled else [])
  744. + ([{
  745. 'name': matrix_mx_puppet_skype_postgres_db_name,
  746. 'username': matrix_mx_puppet_skype_postgres_username,
  747. 'password': matrix_mx_puppet_skype_postgres_password,
  748. }] if (matrix_mx_puppet_skype_enabled and matrix_mx_puppet_skype_database_engine == 'postgres' and matrix_mx_puppet_skype_database_hostname == 'matrix-postgres') else [])
  749. + ([{
  750. 'name': matrix_mx_puppet_slack_postgres_db_name,
  751. 'username': matrix_mx_puppet_slack_postgres_username,
  752. 'password': matrix_mx_puppet_slack_postgres_password,
  753. }] if (matrix_mx_puppet_slack_enabled and matrix_mx_puppet_slack_database_engine == 'postgres' and matrix_mx_puppet_slack_database_hostname == 'matrix-postgres') else [])
  754. + ([{
  755. 'name': matrix_mx_puppet_twitter_postgres_db_name,
  756. 'username': matrix_mx_puppet_twitter_postgres_username,
  757. 'password': matrix_mx_puppet_twitter_postgres_password,
  758. }] if (matrix_mx_puppet_twitter_enabled and matrix_mx_puppet_twitter_database_engine == 'postgres' and matrix_mx_puppet_twitter_database_hostname == 'matrix-postgres') else [])
  759. + ([{
  760. 'name': matrix_mx_puppet_instagram_postgres_db_name,
  761. 'username': matrix_mx_puppet_instagram_postgres_username,
  762. 'password': matrix_mx_puppet_instagram_postgres_password,
  763. }] if (matrix_mx_puppet_instagram_enabled
  764. and matrix_mx_puppet_instagram_database_engine == 'postgres'
  765. and matrix_mx_puppet_instagram_database_hostname == 'matrix-postgres') else [])
  766. + ([{
  767. 'name': matrix_mx_puppet_discord_postgres_db_name,
  768. 'username': matrix_mx_puppet_discord_postgres_username,
  769. 'password': matrix_mx_puppet_discord_postgres_password,
  770. }] if (matrix_mx_puppet_discord_enabled
  771. and matrix_mx_puppet_discord_database_engine == 'postgres'
  772. and matrix_mx_puppet_discord_database_hostname == 'matrix-postgres') else [])
  773. + ([{
  774. 'name': matrix_mx_puppet_steam_postgres_db_name,
  775. 'username': matrix_mx_puppet_steam_postgres_username,
  776. 'password': matrix_mx_puppet_steam_postgres_password,
  777. }] if (matrix_mx_puppet_steam_enabled
  778. and matrix_mx_puppet_steam_database_engine == 'postgres'
  779. and matrix_mx_puppet_steam_database_hostname == 'matrix-postgres') else [])
  780. + ([{
  781. 'name': matrix_dimension_postgres_db_name,
  782. 'username': matrix_dimension_postgres_username,
  783. 'password': matrix_dimension_postgres_password,
  784. }] if (matrix_dimension_enabled
  785. and matrix_dimension_database_engine == 'postgres'
  786. and matrix_dimension_database_hostname == 'matrix-postgres') else [])
  787. }}
  788. ######################################################################
  789. #
  790. # /matrix-postgres
  791. #
  792. ######################################################################
  793. ######################################################################
  794. #
  795. # matrix-client-element
  796. #
  797. ######################################################################
  798. # By default, this playbook installs the Element web UI on the `matrix_server_fqn_element` domain.
  799. # If you wish to connect to your Matrix server by other means, you may wish to disable this.
  800. matrix_client_element_enabled: true
  801. matrix_client_element_container_image_self_build: "{{ matrix_architecture != 'amd64' }}"
  802. # Normally, matrix-nginx-proxy is enabled and nginx can reach Element over the container network.
  803. # If matrix-nginx-proxy is not enabled, or you otherwise have a need for it, you can expose
  804. # the Element HTTP port to the local host.
  805. matrix_client_element_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:8765' }}"
  806. matrix_client_element_default_hs_url: "{{ matrix_homeserver_url }}"
  807. matrix_client_element_default_is_url: "{{ matrix_identity_server_url }}"
  808. # Use Dimension if enabled, otherwise fall back to Scalar
  809. matrix_client_element_integrations_ui_url: "{{ matrix_dimension_integrations_ui_url if matrix_dimension_enabled else 'https://scalar.vector.im/' }}"
  810. matrix_client_element_integrations_rest_url: "{{ matrix_dimension_integrations_rest_url if matrix_dimension_enabled else 'https://scalar.vector.im/api' }}"
  811. matrix_client_element_integrations_widgets_urls: "{{ matrix_dimension_integrations_widgets_urls if matrix_dimension_enabled else ['https://scalar.vector.im/api'] }}"
  812. 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' }}"
  813. matrix_client_element_self_check_validate_certificates: "{{ false if matrix_ssl_retrieval_method == 'self-signed' else true }}"
  814. matrix_client_element_registration_enabled: "{{ matrix_synapse_enable_registration }}"
  815. matrix_client_element_enable_presence_by_hs_url: |
  816. {{
  817. none
  818. if matrix_synapse_use_presence
  819. else {matrix_client_element_default_hs_url: false}
  820. }}
  821. matrix_client_element_welcome_user_id: ~
  822. matrix_client_element_jitsi_preferredDomain: "{{ matrix_server_fqn_jitsi if matrix_jitsi_enabled else '' }}"
  823. ######################################################################
  824. #
  825. # /matrix-client-element
  826. #
  827. ######################################################################
  828. ######################################################################
  829. #
  830. # matrix-synapse
  831. #
  832. ######################################################################
  833. matrix_synapse_container_image_self_build: "{{ matrix_architecture not in ['arm32', 'arm64', 'amd64'] }}"
  834. # When ma1sd is enabled, we can use it to validate email addresses and phone numbers.
  835. # 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.
  836. matrix_synapse_account_threepid_delegates_email: "{{ 'http://matrix-ma1sd:8090' if matrix_ma1sd_enabled else '' }}"
  837. matrix_synapse_account_threepid_delegates_msisdn: "{{ 'http://matrix-ma1sd:8090' if matrix_ma1sd_enabled else '' }}"
  838. # Normally, matrix-nginx-proxy is enabled and nginx can reach Synapse over the container network.
  839. # If matrix-nginx-proxy is not enabled, or you otherwise have a need for it,
  840. # you can expose Synapse's ports to the host.
  841. #
  842. # For exposing the Matrix Client API's port (plain HTTP) to the local host.
  843. matrix_synapse_container_client_api_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:8008' }}"
  844. #
  845. # For exposing the Matrix Federation API's plain port (plain HTTP) to the local host.
  846. matrix_synapse_container_federation_api_plain_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:8048' }}"
  847. #
  848. # For exposing the Matrix Federation API's TLS port (HTTPS) to the internet on all network interfaces.
  849. 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 '' }}"
  850. #
  851. # For exposing the Synapse Metrics API's port (plain HTTP) to the local host.
  852. 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 '' }}"
  853. #
  854. # For exposing the Synapse Manhole port (plain HTTP) to the local host.
  855. matrix_synapse_container_manhole_api_host_bind_port: "{{ '127.0.0.1:9000' if matrix_synapse_manhole_enabled else '' }}"
  856. matrix_synapse_database_host: "{{ matrix_postgres_connection_hostname }}"
  857. matrix_synapse_database_user: "{{ matrix_postgres_connection_username }}"
  858. matrix_synapse_database_password: "{{ matrix_postgres_connection_password }}"
  859. matrix_synapse_database_database: "{{ matrix_postgres_db_name }}"
  860. # We do not enable TLS in Synapse by default.
  861. # TLS is handled by the matrix-nginx-proxy, which proxies the requests to Synapse.
  862. matrix_synapse_tls_federation_listener_enabled: false
  863. matrix_synapse_tls_certificate_path: ~
  864. matrix_synapse_tls_private_key_path: ~
  865. matrix_synapse_federation_port_openid_resource_required: "{{ not matrix_synapse_federation_enabled and (matrix_dimension_enabled or matrix_ma1sd_enabled) }}"
  866. matrix_synapse_email_enabled: "{{ matrix_mailer_enabled }}"
  867. matrix_synapse_email_smtp_host: "matrix-mailer"
  868. matrix_synapse_email_smtp_port: 8025
  869. matrix_synapse_email_smtp_require_transport_security: false
  870. matrix_synapse_email_notif_from: "Matrix <{{ matrix_mailer_sender_address }}>"
  871. # Even if TURN doesn't support TLS (it does by default),
  872. # it doesn't hurt to try a secure connection anyway.
  873. matrix_synapse_turn_uris: |
  874. {{
  875. [
  876. 'turns:' + matrix_server_fqn_matrix + '?transport=udp',
  877. 'turns:' + matrix_server_fqn_matrix + '?transport=tcp',
  878. 'turn:' + matrix_server_fqn_matrix + '?transport=udp',
  879. 'turn:' + matrix_server_fqn_matrix + '?transport=tcp',
  880. ]
  881. if matrix_coturn_enabled
  882. else []
  883. }}
  884. matrix_synapse_turn_shared_secret: "{{ matrix_coturn_turn_static_auth_secret if matrix_coturn_enabled else '' }}"
  885. matrix_synapse_self_check_validate_certificates: "{{ false if matrix_ssl_retrieval_method == 'self-signed' else true }}"
  886. matrix_synapse_systemd_required_services_list: |
  887. {{
  888. (['docker.service'])
  889. +
  890. (['matrix-postgres.service'] if matrix_postgres_enabled else [])
  891. +
  892. (['matrix-goofys'] if matrix_s3_media_store_enabled else [])
  893. }}
  894. matrix_synapse_systemd_wanted_services_list: |
  895. {{
  896. (['matrix-coturn.service'] if matrix_coturn_enabled else [])
  897. +
  898. (['matrix-mailer.service'] if matrix_mailer_enabled else [])
  899. }}
  900. ######################################################################
  901. #
  902. # /matrix-synapse
  903. #
  904. ######################################################################
  905. ######################################################################
  906. #
  907. # matrix-synapse-admin
  908. #
  909. ######################################################################
  910. matrix_synapse_admin_enabled: false
  911. # Normally, matrix-nginx-proxy is enabled and nginx can reach Synapse Admin over the container network.
  912. # If matrix-nginx-proxy is not enabled, or you otherwise have a need for it, you can expose
  913. # Synapse Admin's HTTP port to the local host.
  914. matrix_synapse_admin_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:8766' }}"
  915. matrix_synapse_admin_container_self_build: "{{ matrix_architecture != 'amd64' }}"
  916. ######################################################################
  917. #
  918. # /matrix-synapse-admin
  919. #
  920. ######################################################################
  921. ######################################################################
  922. #
  923. # matrix-registration
  924. #
  925. ######################################################################
  926. matrix_registration_enabled: false
  927. # Normally, matrix-nginx-proxy is enabled and nginx can reach matrix-registration over the container network.
  928. # If matrix-nginx-proxy is not enabled, or you otherwise have a need for it, you can expose
  929. # matrix-registration's HTTP port to the local host.
  930. matrix_registration_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:8767' }}"
  931. matrix_registration_riot_instance: "{{ ('https://' + matrix_server_fqn_element) if matrix_client_element_enabled else 'https://riot.im/app/' }}"
  932. matrix_registration_shared_secret: "{{ matrix_synapse_registration_shared_secret if matrix_synapse_enabled else '' }}"
  933. matrix_registration_server_location: "{{ 'http://matrix-synapse:8008' if matrix_synapse_enabled else '' }}"
  934. matrix_registration_api_validate_certs: "{{ false if matrix_ssl_retrieval_method == 'self-signed' else true }}"
  935. matrix_registration_container_image_self_build: "{{ matrix_architecture != 'amd64' }}"
  936. ######################################################################
  937. #
  938. # /matrix-registration
  939. #
  940. ######################################################################