Matrix Docker Ansible eploy
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.
 
 

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