Matrix Docker Ansible eploy
Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.
 
 

1417 Zeilen
61 KiB

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