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.
 
 

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