Matrix Docker Ansible eploy
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.
 
 

1805 rader
76 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. matrix_container_global_registry_prefix: "docker.io/"
  11. ######################################################################
  12. #
  13. # matrix-base
  14. #
  15. ######################################################################
  16. matrix_identity_server_url: "{{ ('https://' + matrix_server_fqn_matrix) if matrix_ma1sd_enabled else None }}"
  17. # If Synapse workers are enabled and matrix-nginx-proxy is disabled, certain APIs may not work over 'http://matrix-synapse:8008'.
  18. # This is because we explicitly disable them for the main Synapse process.
  19. matrix_homeserver_container_url: "{{ 'http://matrix-nginx-proxy:12080' if matrix_nginx_proxy_enabled else 'http://matrix-synapse:8008' }}"
  20. ######################################################################
  21. #
  22. # /matrix-base
  23. #
  24. ######################################################################
  25. ######################################################################
  26. #
  27. # matrix-awx
  28. #
  29. ######################################################################
  30. # We don't enable AWX support by default.
  31. matrix_awx_enabled: false
  32. matrix_nginx_proxy_data_path: "{{ '/chroot/website' if (matrix_awx_enabled and not matrix_nginx_proxy_base_domain_homepage_enabled) else (matrix_nginx_proxy_base_path + '/data') }}"
  33. matrix_nginx_proxy_data_path_in_container: "{{ '/nginx-data/matrix-domain' if (matrix_awx_enabled and not matrix_nginx_proxy_base_domain_homepage_enabled) else '/nginx-data' }}"
  34. ######################################################################
  35. #
  36. # /matrix-awx
  37. #
  38. ######################################################################
  39. ######################################################################
  40. #
  41. # matrix-bridge-appservice-discord
  42. #
  43. ######################################################################
  44. # We don't enable bridges by default.
  45. matrix_appservice_discord_enabled: false
  46. # Normally, matrix-nginx-proxy is enabled and nginx can reach matrix-appservice-discord over the container network.
  47. # If matrix-nginx-proxy is not enabled, or you otherwise have a need for it, you can expose
  48. # matrix-appservice-discord's client-server port to the local host.
  49. matrix_appservice_discord_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:9005' }}"
  50. # If the homeserver disables presence, it's likely better (less wasteful) to also disable presence on the bridge side.
  51. matrix_appservice_discord_bridge_disablePresence: "{{ not matrix_synapse_presence_enabled }}"
  52. matrix_appservice_discord_systemd_required_services_list: |
  53. {{
  54. ['docker.service']
  55. +
  56. (['matrix-synapse.service'] if matrix_synapse_enabled else [])
  57. +
  58. (['matrix-postgres.service'] if matrix_postgres_enabled else [])
  59. +
  60. (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
  61. }}
  62. matrix_appservice_discord_appservice_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'discord.as.token') | to_uuid }}"
  63. matrix_appservice_discord_homeserver_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'discord.hs.token') | to_uuid }}"
  64. # We only make this use Postgres if our own Postgres server is enabled.
  65. # It's only then (for now) that we can automatically create the necessary database and user for this service.
  66. matrix_appservice_discord_database_engine: "{{ 'postgres' if matrix_postgres_enabled else 'sqlite' }}"
  67. matrix_appservice_discord_database_password: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'as.discord.db') | to_uuid }}"
  68. ######################################################################
  69. #
  70. # /matrix-bridge-appservice-discord
  71. #
  72. ######################################################################
  73. ######################################################################
  74. #
  75. # matrix-appservice-webhooks
  76. #
  77. ######################################################################
  78. # We don't enable bridges by default.
  79. matrix_appservice_webhooks_enabled: false
  80. # Normally, matrix-nginx-proxy is enabled and nginx can reach matrix-appservice-webhooks over the container network.
  81. # If matrix-nginx-proxy is not enabled, or you otherwise have a need for it, you can expose
  82. # matrix-appservice-webhooks' client-server port to the local host.
  83. matrix_appservice_webhooks_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else ('127.0.0.1:' ~ matrix_appservice_webhooks_matrix_port) }}"
  84. matrix_appservice_webhooks_appservice_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'webhook.as.token') | to_uuid }}"
  85. matrix_appservice_webhooks_homeserver_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'webhook.hs.token') | to_uuid }}"
  86. matrix_appservice_webhooks_id_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'webhook.id.token') | to_uuid }}"
  87. matrix_appservice_webhooks_systemd_required_services_list: |
  88. {{
  89. ['docker.service']
  90. +
  91. (['matrix-synapse.service'] if matrix_synapse_enabled else [])
  92. +
  93. (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
  94. }}
  95. ######################################################################
  96. #
  97. # /matrix-appservice-webhooks
  98. #
  99. ######################################################################
  100. ######################################################################
  101. #
  102. # matrix-appservice-slack
  103. #
  104. ######################################################################
  105. # We don't enable bridges by default.
  106. matrix_appservice_slack_enabled: false
  107. matrix_appservice_slack_container_self_build: "{{ matrix_architecture != 'amd64' }}"
  108. # Normally, matrix-nginx-proxy is enabled and nginx can reach matrix-appservice-slack over the container network.
  109. # If matrix-nginx-proxy is not enabled, or you otherwise have a need for it, you can expose
  110. # matrix-appservice-slack's client-server port to the local host.
  111. matrix_appservice_slack_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else ('127.0.0.1:' ~ matrix_appservice_slack_slack_port) }}"
  112. matrix_appservice_slack_appservice_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'slack.as.token') | to_uuid }}"
  113. matrix_appservice_slack_homeserver_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'slack.hs.token') | to_uuid }}"
  114. matrix_appservice_slack_id_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'slack.id.token') | to_uuid }}"
  115. matrix_appservice_slack_systemd_required_services_list: |
  116. {{
  117. ['docker.service']
  118. +
  119. (['matrix-synapse.service'] if matrix_synapse_enabled else [])
  120. +
  121. (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
  122. }}
  123. # Postgres is the default, except if not using `matrix_postgres` (internal postgres)
  124. matrix_appservice_slack_database_engine: "{{ 'postgres' if matrix_postgres_enabled else 'nedb' }}"
  125. matrix_appservice_slack_database_password: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'as.slack.db') | to_uuid }}"
  126. ######################################################################
  127. #
  128. # /matrix-bridge-appservice-slack
  129. #
  130. ######################################################################
  131. ######################################################################
  132. #
  133. # matrix-bridge-appservice-irc
  134. #
  135. ######################################################################
  136. # We don't enable bridges by default.
  137. matrix_appservice_irc_enabled: false
  138. matrix_appservice_irc_container_self_build: "{{ matrix_architecture != 'amd64' }}"
  139. # Normally, matrix-nginx-proxy is enabled and nginx can reach matrix-appservice-irc over the container network.
  140. # If matrix-nginx-proxy is not enabled, or you otherwise have a need for it, you can expose
  141. # matrix-appservice-irc's client-server port to the local host.
  142. matrix_appservice_irc_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:9999' }}"
  143. # The IRC bridge docs say that if homeserver presence is disabled, it's better to also disable
  144. # IRC bridge presence, for performance reasons.
  145. matrix_appservice_irc_homeserver_enablePresence: "{{ matrix_synapse_presence_enabled }}"
  146. matrix_appservice_irc_systemd_required_services_list: |
  147. {{
  148. ['docker.service']
  149. +
  150. (['matrix-synapse.service'] if matrix_synapse_enabled else [])
  151. +
  152. (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
  153. }}
  154. matrix_appservice_irc_appservice_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'irc.as.token') | to_uuid }}"
  155. matrix_appservice_irc_homeserver_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'irc.hs.token') | to_uuid }}"
  156. matrix_appservice_irc_database_engine: "{{ 'postgres' if matrix_postgres_enabled else 'nedb' }}"
  157. matrix_appservice_irc_database_password: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'as.irc.db') | to_uuid }}"
  158. ######################################################################
  159. #
  160. # /matrix-bridge-appservice-irc
  161. #
  162. ######################################################################
  163. ######################################################################
  164. #
  165. # matrix-bridge-mautrix-facebook
  166. #
  167. ######################################################################
  168. # We don't enable bridges by default.
  169. matrix_mautrix_facebook_enabled: false
  170. matrix_mautrix_facebook_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm64'] }}"
  171. matrix_mautrix_facebook_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-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
  180. }}
  181. matrix_mautrix_facebook_appservice_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'fb.as.token') | to_uuid }}"
  182. matrix_mautrix_facebook_homeserver_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'fb.hs.token') | to_uuid }}"
  183. 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 '' }}"
  184. matrix_mautrix_facebook_bridge_presence: "{{ matrix_synapse_presence_enabled if matrix_synapse_enabled else true }}"
  185. # We'd like to force-set people with external Postgres to SQLite, so the bridge role can complain
  186. # and point them to a migration path.
  187. matrix_mautrix_facebook_database_engine: "{{ 'postgres' if matrix_postgres_enabled else 'sqlite' }}"
  188. matrix_mautrix_facebook_database_password: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'mau.fb.db') | to_uuid }}"
  189. ######################################################################
  190. #
  191. # /matrix-bridge-mautrix-facebook
  192. #
  193. ######################################################################
  194. ######################################################################
  195. #
  196. # matrix-bridge-mautrix-hangouts
  197. #
  198. ######################################################################
  199. # We don't enable bridges by default.
  200. matrix_mautrix_hangouts_enabled: false
  201. matrix_mautrix_hangouts_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm64'] }}"
  202. matrix_mautrix_hangouts_systemd_required_services_list: |
  203. {{
  204. ['docker.service']
  205. +
  206. (['matrix-synapse.service'] if matrix_synapse_enabled else [])
  207. +
  208. (['matrix-postgres.service'] if matrix_postgres_enabled else [])
  209. +
  210. (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
  211. }}
  212. matrix_mautrix_hangouts_appservice_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'ho.as.token') | to_uuid }}"
  213. matrix_mautrix_hangouts_homeserver_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'ho.hs.token') | to_uuid }}"
  214. matrix_mautrix_hangouts_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:9007' }}"
  215. 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 '' }}"
  216. # Postgres is the default, except if not using `matrix_postgres` (internal postgres)
  217. matrix_mautrix_hangouts_database_engine: "{{ 'postgres' if matrix_postgres_enabled else 'sqlite' }}"
  218. matrix_mautrix_hangouts_database_password: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'mau.hangouts.db') | to_uuid }}"
  219. ######################################################################
  220. #
  221. # /matrix-bridge-mautrix-hangouts
  222. #
  223. ######################################################################
  224. ######################################################################
  225. #
  226. # matrix-bridge-mautrix-instagram
  227. #
  228. ######################################################################
  229. # We don't enable bridges by default.
  230. matrix_mautrix_instagram_enabled: false
  231. matrix_mautrix_instagram_container_image_self_build: "{{ matrix_architecture not in ['amd64', 'arm64'] }}"
  232. matrix_mautrix_instagram_systemd_required_services_list: |
  233. {{
  234. ['docker.service']
  235. +
  236. (['matrix-synapse.service'] if matrix_synapse_enabled else [])
  237. +
  238. (['matrix-postgres.service'] if matrix_postgres_enabled else [])
  239. +
  240. (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
  241. }}
  242. matrix_mautrix_instagram_appservice_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'ig.as.token') | to_uuid }}"
  243. matrix_mautrix_instagram_homeserver_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'ig.hs.token') | to_uuid }}"
  244. matrix_mautrix_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 '' }}"
  245. matrix_mautrix_instagram_bridge_presence: "{{ matrix_synapse_presence_enabled if matrix_synapse_enabled else true }}"
  246. # We'd like to force-set people with external Postgres to SQLite, so the bridge role can complain
  247. # and point them to a migration path.
  248. matrix_mautrix_instagram_database_engine: "{{ 'postgres' if matrix_postgres_enabled else 'sqlite' }}"
  249. matrix_mautrix_instagram_database_password: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'mau.ig.db') | to_uuid }}"
  250. ######################################################################
  251. #
  252. # /matrix-bridge-mautrix-instagram
  253. #
  254. ######################################################################
  255. ######################################################################
  256. #
  257. # matrix-bridge-mautrix-signal
  258. #
  259. ######################################################################
  260. # We don't enable bridges by default.
  261. matrix_mautrix_signal_enabled: false
  262. matrix_mautrix_signal_systemd_required_services_list: |
  263. {{
  264. ['docker.service']
  265. +
  266. (['matrix-synapse.service'] if matrix_synapse_enabled else [])
  267. +
  268. (['matrix-postgres.service'] if matrix_postgres_enabled else [])
  269. +
  270. (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
  271. +
  272. ['matrix-mautrix-signal-daemon.service']
  273. }}
  274. matrix_mautrix_signal_homeserver_domain: '{{ matrix_domain }}'
  275. matrix_mautrix_signal_homeserver_address: "{{ matrix_homeserver_container_url }}"
  276. matrix_mautrix_signal_homeserver_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'si.hs.token') | to_uuid }}"
  277. matrix_mautrix_signal_appservice_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'si.as.token') | to_uuid }}"
  278. 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 '' }}"
  279. matrix_mautrix_signal_database_engine: 'postgres'
  280. matrix_mautrix_signal_database_password: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'mau.signal.db') | to_uuid }}"
  281. ######################################################################
  282. #
  283. # /matrix-bridge-mautrix-signal
  284. #
  285. ######################################################################
  286. ######################################################################
  287. #
  288. # matrix-bridge-mautrix-telegram
  289. #
  290. ######################################################################
  291. # We don't enable bridges by default.
  292. matrix_mautrix_telegram_enabled: false
  293. # Images are multi-arch (amd64 and arm64, but not arm32).
  294. matrix_mautrix_telegram_container_self_build: "{{ matrix_architecture not in ['arm64', 'amd64'] }}"
  295. matrix_mautrix_telegram_systemd_required_services_list: |
  296. {{
  297. ['docker.service']
  298. +
  299. (['matrix-synapse.service'] if matrix_synapse_enabled else [])
  300. +
  301. (['matrix-postgres.service'] if matrix_postgres_enabled else [])
  302. +
  303. (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
  304. }}
  305. matrix_mautrix_telegram_appservice_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'telegr.as.token') | to_uuid }}"
  306. matrix_mautrix_telegram_homeserver_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'telegr.hs.token') | to_uuid }}"
  307. matrix_mautrix_telegram_public_endpoint: "/{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'telegram') | to_uuid }}"
  308. matrix_mautrix_telegram_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:9006' }}"
  309. 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 '' }}"
  310. # Postgres is the default, except if not using `matrix_postgres` (internal postgres)
  311. matrix_mautrix_telegram_database_engine: "{{ 'postgres' if matrix_postgres_enabled else 'sqlite' }}"
  312. matrix_mautrix_telegram_database_password: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'mau.telegram.db') | to_uuid }}"
  313. ######################################################################
  314. #
  315. # /matrix-bridge-mautrix-telegram
  316. #
  317. ######################################################################
  318. ######################################################################
  319. #
  320. # matrix-bridge-mautrix-whatsapp
  321. #
  322. ######################################################################
  323. # We don't enable bridges by default.
  324. matrix_mautrix_whatsapp_enabled: false
  325. matrix_mautrix_whatsapp_systemd_required_services_list: |
  326. {{
  327. ['docker.service']
  328. +
  329. (['matrix-synapse.service'] if matrix_synapse_enabled else [])
  330. +
  331. (['matrix-postgres.service'] if matrix_postgres_enabled else [])
  332. +
  333. (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
  334. }}
  335. matrix_mautrix_whatsapp_appservice_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'whats.as.token') | to_uuid }}"
  336. matrix_mautrix_whatsapp_homeserver_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'whats.hs.token') | to_uuid }}"
  337. 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 '' }}"
  338. # Postgres is the default, except if not using `matrix_postgres` (internal postgres)
  339. matrix_mautrix_whatsapp_database_engine: "{{ 'postgres' if matrix_postgres_enabled else 'sqlite' }}"
  340. matrix_mautrix_whatsapp_database_password: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'mauwhatsapp.db') | to_uuid }}"
  341. ######################################################################
  342. #
  343. # /matrix-bridge-mautrix-whatsapp
  344. #
  345. ######################################################################
  346. ######################################################################
  347. #
  348. # matrix-sms-bridge
  349. #
  350. ######################################################################
  351. # We don't enable bridges by default.
  352. matrix_sms_bridge_enabled: false
  353. matrix_sms_bridge_systemd_required_services_list: |
  354. {{
  355. ['docker.service']
  356. +
  357. (['matrix-synapse.service'] if matrix_synapse_enabled else [])
  358. +
  359. (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
  360. }}
  361. matrix_sms_bridge_appservice_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'sms.as.token') | to_uuid }}"
  362. matrix_sms_bridge_homeserver_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'sms.hs.token') | to_uuid }}"
  363. ######################################################################
  364. #
  365. # /matrix-sms-bridge
  366. #
  367. ######################################################################
  368. ######################################################################
  369. #
  370. # matrix-bridge-mx-puppet-skype
  371. #
  372. ######################################################################
  373. # We don't enable bridges by default.
  374. matrix_mx_puppet_skype_enabled: false
  375. matrix_mx_puppet_skype_container_image_self_build: "{{ matrix_architecture != 'amd64'}}"
  376. matrix_mx_puppet_skype_systemd_required_services_list: |
  377. {{
  378. ['docker.service']
  379. +
  380. (['matrix-synapse.service'] if matrix_synapse_enabled else [])
  381. +
  382. (['matrix-postgres.service'] if matrix_postgres_enabled else [])
  383. +
  384. (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
  385. }}
  386. matrix_mx_puppet_skype_appservice_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'skype.as.tok') | to_uuid }}"
  387. matrix_mx_puppet_skype_homeserver_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'skype.hs.tok') | to_uuid }}"
  388. 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 '' }}"
  389. # Postgres is the default, except if not using `matrix_postgres` (internal postgres)
  390. matrix_mx_puppet_skype_database_engine: "{{ 'postgres' if matrix_postgres_enabled else 'sqlite' }}"
  391. matrix_mx_puppet_skype_database_password: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'mxpup.skype.db') | to_uuid }}"
  392. ######################################################################
  393. #
  394. # /matrix-bridge-mx-puppet-skype
  395. #
  396. ######################################################################
  397. ######################################################################
  398. #
  399. # matrix-bridge-mx-puppet-slack
  400. #
  401. ######################################################################
  402. # We don't enable bridges by default.
  403. matrix_mx_puppet_slack_enabled: false
  404. matrix_mx_puppet_slack_container_image_self_build: "{{ matrix_architecture != 'amd64'}}"
  405. matrix_mx_puppet_slack_systemd_required_services_list: |
  406. {{
  407. ['docker.service']
  408. +
  409. (['matrix-synapse.service'] if matrix_synapse_enabled else [])
  410. +
  411. (['matrix-postgres.service'] if matrix_postgres_enabled else [])
  412. +
  413. (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
  414. }}
  415. matrix_mx_puppet_slack_appservice_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'mxslk.as.tok') | to_uuid }}"
  416. matrix_mx_puppet_slack_homeserver_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'mxslk.hs.tok') | to_uuid }}"
  417. 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 '' }}"
  418. # Postgres is the default, except if not using `matrix_postgres` (internal postgres)
  419. matrix_mx_puppet_slack_database_engine: "{{ 'postgres' if matrix_postgres_enabled else 'sqlite' }}"
  420. matrix_mx_puppet_slack_database_password: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'mxpup.slack.db') | to_uuid }}"
  421. ######################################################################
  422. #
  423. # /matrix-bridge-mx-puppet-slack
  424. #
  425. ######################################################################
  426. ######################################################################
  427. #
  428. # matrix-bridge-mx-puppet-twitter
  429. #
  430. ######################################################################
  431. # We don't enable bridges by default.
  432. matrix_mx_puppet_twitter_enabled: false
  433. matrix_mx_puppet_twitter_container_image_self_build: "{{ matrix_architecture != 'amd64'}}"
  434. matrix_mx_puppet_twitter_systemd_required_services_list: |
  435. {{
  436. ['docker.service']
  437. +
  438. (['matrix-synapse.service'] if matrix_synapse_enabled else [])
  439. +
  440. (['matrix-postgres.service'] if matrix_postgres_enabled else [])
  441. +
  442. (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
  443. }}
  444. matrix_mx_puppet_twitter_appservice_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'mxtwt.as.tok') | to_uuid }}"
  445. matrix_mx_puppet_twitter_homeserver_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'mxtwt.hs.tok') | to_uuid }}"
  446. 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 '' }}"
  447. 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) }}"
  448. # Postgres is the default, except if not using `matrix_postgres` (internal postgres)
  449. matrix_mx_puppet_twitter_database_engine: "{{ 'postgres' if matrix_postgres_enabled else 'sqlite' }}"
  450. matrix_mx_puppet_twitter_database_password: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'mxpup.twitter.db') | to_uuid }}"
  451. ######################################################################
  452. #
  453. # /matrix-bridge-mx-puppet-twitter
  454. #
  455. ######################################################################
  456. ######################################################################
  457. #
  458. # matrix-bridge-mx-puppet-instagram
  459. #
  460. ######################################################################
  461. # We don't enable bridges by default.
  462. matrix_mx_puppet_instagram_enabled: false
  463. matrix_mx_puppet_instagram_container_image_self_build: "{{ matrix_architecture != 'amd64'}}"
  464. matrix_mx_puppet_instagram_systemd_required_services_list: |
  465. {{
  466. ['docker.service']
  467. +
  468. (['matrix-synapse.service'] if matrix_synapse_enabled else [])
  469. +
  470. (['matrix-postgres.service'] if matrix_postgres_enabled else [])
  471. +
  472. (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
  473. }}
  474. matrix_mx_puppet_instagram_appservice_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'mxig.as.tok') | to_uuid }}"
  475. matrix_mx_puppet_instagram_homeserver_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'mxig.hs.tok') | to_uuid }}"
  476. 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 '' }}"
  477. # Postgres is the default, except if not using `matrix_postgres` (internal postgres)
  478. matrix_mx_puppet_instagram_database_engine: "{{ 'postgres' if matrix_postgres_enabled else 'sqlite' }}"
  479. matrix_mx_puppet_instagram_database_password: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'mxpup.ig.db') | to_uuid }}"
  480. ######################################################################
  481. #
  482. # /matrix-bridge-mx-puppet-instagram
  483. #
  484. ######################################################################
  485. ######################################################################
  486. #
  487. # matrix-bridge-mx-puppet-discord
  488. #
  489. ######################################################################
  490. # We don't enable bridges by default.
  491. matrix_mx_puppet_discord_enabled: false
  492. matrix_mx_puppet_discord_container_image_self_build: "{{ matrix_architecture != 'amd64'}}"
  493. matrix_mx_puppet_discord_systemd_required_services_list: |
  494. {{
  495. ['docker.service']
  496. +
  497. (['matrix-synapse.service'] if matrix_synapse_enabled else [])
  498. +
  499. (['matrix-postgres.service'] if matrix_postgres_enabled else [])
  500. +
  501. (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
  502. }}
  503. matrix_mx_puppet_discord_appservice_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'mxdsc.as.tok') | to_uuid }}"
  504. matrix_mx_puppet_discord_homeserver_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'mxdsc.hs.tok') | to_uuid }}"
  505. 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 '' }}"
  506. # Postgres is the default, except if not using `matrix_postgres` (internal postgres)
  507. matrix_mx_puppet_discord_database_engine: "{{ 'postgres' if matrix_postgres_enabled else 'sqlite' }}"
  508. matrix_mx_puppet_discord_database_password: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'mxpup.dsc.db') | to_uuid }}"
  509. ######################################################################
  510. #
  511. # /matrix-bridge-mx-puppet-discord
  512. #
  513. ######################################################################
  514. ######################################################################
  515. #
  516. # matrix-bridge-mx-puppet-steam
  517. #
  518. ######################################################################
  519. # We don't enable bridges by default.
  520. matrix_mx_puppet_steam_enabled: false
  521. matrix_mx_puppet_steam_container_image_self_build: "{{ matrix_architecture != 'amd64'}}"
  522. matrix_mx_puppet_steam_systemd_required_services_list: |
  523. {{
  524. ['docker.service']
  525. +
  526. (['matrix-synapse.service'] if matrix_synapse_enabled else [])
  527. +
  528. (['matrix-postgres.service'] if matrix_postgres_enabled else [])
  529. +
  530. (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
  531. }}
  532. matrix_mx_puppet_steam_appservice_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'mxste.as.tok') | to_uuid }}"
  533. matrix_mx_puppet_steam_homeserver_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'mxste.hs.tok') | to_uuid }}"
  534. 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 '' }}"
  535. # Postgres is the default, except if not using `matrix_postgres` (internal postgres)
  536. matrix_mx_puppet_steam_database_engine: "{{ 'postgres' if matrix_postgres_enabled else 'sqlite' }}"
  537. matrix_mx_puppet_steam_database_password: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'mxpup.steam.db') | to_uuid }}"
  538. ######################################################################
  539. #
  540. # /matrix-bridge-mx-puppet-steam
  541. #
  542. ######################################################################
  543. ######################################################################
  544. #
  545. # matrix-bridge-mx-puppet-groupme
  546. #
  547. ######################################################################
  548. # We don't enable bridges by default.
  549. matrix_mx_puppet_groupme_enabled: false
  550. matrix_mx_puppet_groupme_container_image_self_build: "{{ matrix_architecture != 'amd64'}}"
  551. matrix_mx_puppet_groupme_systemd_required_services_list: |
  552. {{
  553. ['docker.service']
  554. +
  555. (['matrix-synapse.service'] if matrix_synapse_enabled else [])
  556. +
  557. (['matrix-postgres.service'] if matrix_postgres_enabled else [])
  558. +
  559. (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
  560. }}
  561. matrix_mx_puppet_groupme_appservice_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'mxgro.as.tok') | to_uuid }}"
  562. matrix_mx_puppet_groupme_homeserver_token: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'mxgro.hs.tok') | to_uuid }}"
  563. matrix_mx_puppet_groupme_login_shared_secret: "{{ matrix_synapse_ext_password_provider_shared_secret_auth_shared_secret if matrix_synapse_ext_password_provider_shared_secret_auth_enabled else '' }}"
  564. # Postgres is the default, except if not using `matrix_postgres` (internal postgres)
  565. matrix_mx_puppet_groupme_database_engine: "{{ 'postgres' if matrix_postgres_enabled else 'sqlite' }}"
  566. matrix_mx_puppet_groupme_database_password: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'mxpup.groupme.db') | to_uuid }}"
  567. ######################################################################
  568. #
  569. # /matrix-bridge-mx-puppet-groupme
  570. #
  571. ######################################################################
  572. ######################################################################
  573. #
  574. # matrix-bot-matrix-reminder-bot
  575. #
  576. ######################################################################
  577. # We don't enable bots by default.
  578. matrix_bot_matrix_reminder_bot_enabled: false
  579. matrix_bot_matrix_reminder_bot_systemd_required_services_list: |
  580. {{
  581. ['docker.service']
  582. +
  583. (['matrix-postgres.service'] if matrix_postgres_enabled else [])
  584. +
  585. (['matrix-synapse.service'] if matrix_synapse_enabled else [])
  586. +
  587. (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
  588. }}
  589. # Postgres is the default, except if not using `matrix_postgres` (internal postgres)
  590. matrix_bot_matrix_reminder_bot_database_engine: "{{ 'postgres' if matrix_postgres_enabled else 'sqlite' }}"
  591. matrix_bot_matrix_reminder_bot_database_password: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'reminder.bot.db') | to_uuid }}"
  592. ######################################################################
  593. #
  594. # /matrix-bot-matrix-reminder-bot
  595. #
  596. ######################################################################
  597. ######################################################################
  598. #
  599. # matrix-bot-go-neb
  600. #
  601. ######################################################################
  602. # We don't enable bots by default.
  603. matrix_bot_go_neb_enabled: false
  604. matrix_bot_go_neb_systemd_required_services_list: |
  605. {{
  606. ['docker.service']
  607. +
  608. (['matrix-synapse.service'] if matrix_synapse_enabled else [])
  609. +
  610. (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
  611. }}
  612. matrix_bot_go_neb_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:4050' }}"
  613. ######################################################################
  614. #
  615. # /matrix-bot-go-neb
  616. #
  617. ######################################################################
  618. ######################################################################
  619. #
  620. # matrix-bot-mjolnir
  621. #
  622. ######################################################################
  623. # We don't enable bots by default.
  624. matrix_bot_mjolnir_enabled: false
  625. matrix_bot_mjolnir_systemd_required_services_list: |
  626. {{
  627. ['docker.service']
  628. +
  629. (['matrix-synapse.service'] if matrix_synapse_enabled else [])
  630. +
  631. (['matrix-postgres.service'] if matrix_postgres_enabled else [])
  632. +
  633. (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
  634. }}
  635. ######################################################################
  636. #
  637. # /matrix-bot-mjolnir
  638. #
  639. ######################################################################
  640. ######################################################################
  641. #
  642. # matrix-corporal
  643. #
  644. ######################################################################
  645. matrix_corporal_enabled: false
  646. matrix_corporal_container_image_self_build: "{{ matrix_architecture != 'amd64' }}"
  647. # Normally, matrix-nginx-proxy is enabled and nginx can reach matrix-corporal over the container network.
  648. # If matrix-nginx-proxy is not enabled, or you otherwise have a need for it, you can expose
  649. # matrix-corporal's web-server ports to the local host.
  650. matrix_corporal_container_http_gateway_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:41080' }}"
  651. matrix_corporal_container_http_api_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:41081' }}"
  652. matrix_corporal_systemd_required_services_list: |
  653. {{
  654. (['docker.service'])
  655. +
  656. (['matrix-synapse.service'])
  657. }}
  658. # This goes to Synapse's vhost
  659. matrix_corporal_matrix_homeserver_api_endpoint: "{{ matrix_homeserver_container_url }}"
  660. matrix_corporal_matrix_auth_shared_secret: "{{ matrix_synapse_ext_password_provider_shared_secret_auth_shared_secret }}"
  661. # This is only useful if there's REST auth provider to make use of it.
  662. matrix_corporal_http_gateway_internal_rest_auth_enabled: "{{ matrix_synapse_ext_password_provider_rest_auth_enabled }}"
  663. matrix_corporal_matrix_registration_shared_secret: "{{ matrix_synapse_registration_shared_secret }}"
  664. ######################################################################
  665. #
  666. # /matrix-corporal
  667. #
  668. ######################################################################
  669. ######################################################################
  670. #
  671. # matrix-coturn
  672. #
  673. ######################################################################
  674. matrix_coturn_enabled: true
  675. matrix_coturn_container_image_self_build: "{{ matrix_architecture != 'amd64'}}"
  676. matrix_coturn_turn_external_ip_address: "{{ ansible_host }}"
  677. matrix_coturn_tls_enabled: "{{ matrix_ssl_retrieval_method != 'none' }}"
  678. matrix_coturn_tls_cert_path: "{{ matrix_ssl_config_dir_path }}/live/{{ matrix_server_fqn_matrix }}/fullchain.pem"
  679. matrix_coturn_tls_key_path: "{{ matrix_ssl_config_dir_path }}/live/{{ matrix_server_fqn_matrix }}/privkey.pem"
  680. matrix_coturn_container_additional_volumes: |
  681. {{
  682. ([] if matrix_ssl_retrieval_method == 'none' else [
  683. {
  684. 'src': matrix_ssl_config_dir_path,
  685. 'dst': matrix_ssl_config_dir_path,
  686. 'options': 'ro',
  687. }
  688. ])
  689. }}
  690. ######################################################################
  691. #
  692. # /matrix-coturn
  693. #
  694. ######################################################################
  695. ######################################################################
  696. #
  697. # matrix-dimension
  698. #
  699. ######################################################################
  700. matrix_dimension_enabled: false
  701. # Normally, matrix-nginx-proxy is enabled and nginx can reach Dimension over the container network.
  702. # If matrix-nginx-proxy is not enabled, or you otherwise have a need for it, you can expose
  703. # the Dimension HTTP port to the local host.
  704. matrix_dimension_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:8184' }}"
  705. matrix_integration_manager_rest_url: "{{ matrix_dimension_integrations_rest_url if matrix_dimension_enabled else None }}"
  706. matrix_integration_manager_ui_url: "{{ matrix_dimension_integrations_ui_url if matrix_dimension_enabled else None }}"
  707. matrix_dimension_systemd_required_services_list: |
  708. {{
  709. ['docker.service']
  710. +
  711. (['matrix-postgres.service'] if matrix_postgres_enabled else [])
  712. +
  713. (['matrix-synapse.service'] if matrix_synapse_enabled else [])
  714. +
  715. (['matrix-nginx-proxy.service'] if matrix_nginx_proxy_enabled else [])
  716. }}
  717. # Postgres is the default, except if not using `matrix_postgres` (internal postgres)
  718. matrix_dimension_database_engine: "{{ 'postgres' if matrix_postgres_enabled else 'sqlite' }}"
  719. matrix_dimension_database_password: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'dimension.db') | to_uuid }}"
  720. ######################################################################
  721. #
  722. # /matrix-dimension
  723. #
  724. ######################################################################
  725. ######################################################################
  726. #
  727. # matrix-etherpad
  728. #
  729. ######################################################################
  730. matrix_etherpad_enabled: false
  731. matrix_etherpad_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:9001' }}"
  732. matrix_etherpad_systemd_required_services_list: |
  733. {{
  734. ['docker.service']
  735. +
  736. (['matrix-postgres.service'] if matrix_postgres_enabled else [])
  737. }}
  738. matrix_etherpad_database_password: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'etherpad.db') | to_uuid }}"
  739. ######################################################################
  740. #
  741. # /matrix-etherpad
  742. #
  743. ######################################################################
  744. ######################################################################
  745. #
  746. # matrix-dynamic-dns
  747. #
  748. ######################################################################
  749. matrix_dynamic_dns_enabled: false
  750. ######################################################################
  751. #
  752. # /matrix-dynamic-dns
  753. #
  754. ######################################################################
  755. ######################################################################
  756. #
  757. # matrix-email2matrix
  758. #
  759. ######################################################################
  760. matrix_email2matrix_enabled: false
  761. ######################################################################
  762. #
  763. # /matrix-email2matrix
  764. #
  765. ######################################################################
  766. ######################################################################
  767. #
  768. # matrix-jitsi
  769. #
  770. ######################################################################
  771. matrix_jitsi_enabled: false
  772. # Normally, matrix-nginx-proxy is enabled and nginx can reach jitsi/web over the container network.
  773. # If matrix-nginx-proxy is not enabled, or you otherwise have a need for it, you can expose
  774. # the Jitsi HTTP port to the local host.
  775. matrix_jitsi_web_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:13080' }}"
  776. matrix_jitsi_jvb_container_colibri_ws_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:13090' }}"
  777. matrix_jitsi_jibri_xmpp_password: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'jibri') | to_uuid }}"
  778. matrix_jitsi_jicofo_auth_password: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'jicofo') | to_uuid }}"
  779. matrix_jitsi_jvb_auth_password: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'jvb') | to_uuid }}"
  780. matrix_jitsi_web_stun_servers: |
  781. {{
  782. [
  783. 'stun:' + matrix_server_fqn_matrix + ':5349',
  784. 'stun:' + matrix_server_fqn_matrix + ':3478',
  785. ]
  786. if matrix_coturn_enabled
  787. else [ 'stun:meet-jit-si-turnrelay.jitsi.net:443']
  788. }}
  789. # If the self-hosted Etherpad instance is available, it will also show up in Jitsi conferences,
  790. # unless explicitly disabled by setting `matrix_jitsi_etherpad_enabled` to false.
  791. # Falls back to the scalar.vector.im etherpad in case someone sets `matrix_jitsi_etherpad_enabled` to true,
  792. # while also setting `matrix_etherpad_enabled` to false.
  793. matrix_jitsi_etherpad_enabled: "{{ matrix_etherpad_enabled }}"
  794. matrix_jitsi_etherpad_base: "{{ matrix_etherpad_base_url if matrix_etherpad_enabled else 'https://scalar.vector.im/etherpad' }}"
  795. ######################################################################
  796. #
  797. # /matrix-jitsi
  798. #
  799. ######################################################################
  800. ######################################################################
  801. #
  802. # matrix-mailer
  803. #
  804. ######################################################################
  805. # By default, this playbook sets up an exim mailer server (running in a container).
  806. # This is so that Synapse can send email reminders for unread messages.
  807. # Other services (like ma1sd), also use the mailer.
  808. matrix_mailer_enabled: true
  809. matrix_mailer_container_image_self_build: "{{ matrix_architecture != 'amd64'}}"
  810. ######################################################################
  811. #
  812. # /matrix-mailer
  813. #
  814. ######################################################################
  815. ######################################################################
  816. #
  817. # matrix-ma1sd
  818. #
  819. ######################################################################
  820. # By default, this playbook installs the ma1sd identity server on the same domain as Synapse (`matrix_server_fqn_matrix`).
  821. # If you wish to use the public identity servers (matrix.org, vector.im) instead of your own you may wish to disable this.
  822. matrix_ma1sd_enabled: true
  823. # There's no prebuilt ma1sd image for the `arm32` architecture.
  824. # We're relying on self-building there.
  825. matrix_ma1sd_architecture: "{{
  826. {
  827. 'amd64': 'amd64',
  828. 'arm32': 'arm32',
  829. 'arm64': 'arm64',
  830. }[matrix_architecture]
  831. }}"
  832. matrix_ma1sd_container_image_self_build: "{{ matrix_architecture not in ['arm64', 'amd64'] }}"
  833. # Normally, matrix-nginx-proxy is enabled and nginx can reach ma1sd over the container network.
  834. # If matrix-nginx-proxy is not enabled, or you otherwise have a need for it, you can expose
  835. # ma1sd's web-server port.
  836. matrix_ma1sd_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:8090' }}"
  837. # We enable Synapse integration via its Postgres database by default.
  838. # When using another Identity store, you might wish to disable this and define
  839. # your own configuration in `matrix_ma1sd_configuration_extension_yaml`.
  840. matrix_ma1sd_synapsesql_enabled: true
  841. matrix_ma1sd_synapsesql_type: postgresql
  842. matrix_ma1sd_synapsesql_connection: //{{ matrix_synapse_database_host }}/{{ matrix_synapse_database_database }}?user={{ matrix_synapse_database_user | urlencode() }}&password={{ matrix_synapse_database_password | urlencode() }}
  843. matrix_ma1sd_dns_overwrite_enabled: true
  844. matrix_ma1sd_dns_overwrite_homeserver_client_name: "{{ matrix_server_fqn_matrix }}"
  845. # The `matrix_ma1sd_dns_overwrite_homeserver_client_value` value when matrix_nginx_proxy_enabled is false covers the general case,
  846. # but may be inaccurate if matrix-corporal is enabled.
  847. matrix_ma1sd_dns_overwrite_homeserver_client_value: "{{ ('http://' + matrix_nginx_proxy_proxy_matrix_client_api_addr_with_container) if matrix_nginx_proxy_enabled else matrix_homeserver_container_url }}"
  848. # By default, we send mail through the `matrix-mailer` service.
  849. matrix_ma1sd_threepid_medium_email_identity_from: "{{ matrix_mailer_sender_address }}"
  850. matrix_ma1sd_threepid_medium_email_connectors_smtp_host: "matrix-mailer"
  851. matrix_ma1sd_threepid_medium_email_connectors_smtp_port: 8025
  852. matrix_ma1sd_threepid_medium_email_connectors_smtp_tls: 0
  853. matrix_ma1sd_self_check_validate_certificates: "{{ false if matrix_ssl_retrieval_method == 'self-signed' else true }}"
  854. matrix_ma1sd_systemd_required_services_list: |
  855. {{
  856. (['matrix-postgres.service'] if matrix_postgres_enabled else [])
  857. }}
  858. matrix_ma1sd_systemd_wanted_services_list: |
  859. {{
  860. (['matrix-corporal.service'] if matrix_corporal_enabled else ['matrix-synapse.service'])
  861. +
  862. (['matrix-postgres.service'] if matrix_postgres_enabled else [])
  863. +
  864. (['matrix-mailer.service'] if matrix_mailer_enabled else [])
  865. }}
  866. # Postgres is the default, except if not using `matrix_postgres` (internal postgres)
  867. matrix_ma1sd_database_engine: "{{ 'postgres' if matrix_postgres_enabled else 'sqlite' }}"
  868. matrix_ma1sd_database_password: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'ma1sd.db') | to_uuid }}"
  869. ######################################################################
  870. #
  871. # /matrix-ma1sd
  872. #
  873. ######################################################################
  874. ######################################################################
  875. #
  876. # matrix-nginx-proxy
  877. #
  878. ######################################################################
  879. # By default, this playbook sets up a reverse-proxy nginx proxy server on TCP ports 80, 443 and 8448.
  880. # This is fine if you're dedicating the whole server to Matrix.
  881. # If that's not the case, you may wish to disable this and take care of proxying yourself.
  882. matrix_nginx_proxy_enabled: true
  883. matrix_nginx_proxy_proxy_matrix_client_api_addr_with_container: "{{ 'matrix-corporal:41080' if matrix_corporal_enabled else 'matrix-nginx-proxy:12080' }}"
  884. 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' }}"
  885. matrix_nginx_proxy_proxy_matrix_client_api_client_max_body_size_mb: "{{ matrix_synapse_max_upload_size_mb }}"
  886. matrix_nginx_proxy_proxy_matrix_client_api_forwarded_location_synapse_admin_api_enabled: "{{ matrix_synapse_admin_enabled }}"
  887. matrix_nginx_proxy_proxy_matrix_client_redirect_root_uri_to_domain: "{{ matrix_server_fqn_element if matrix_client_element_enabled else '' }}"
  888. matrix_nginx_proxy_proxy_matrix_enabled: true
  889. matrix_nginx_proxy_proxy_element_enabled: "{{ matrix_client_element_enabled }}"
  890. matrix_nginx_proxy_proxy_dimension_enabled: "{{ matrix_dimension_enabled }}"
  891. matrix_nginx_proxy_proxy_bot_go_neb_enabled: "{{ matrix_bot_go_neb_enabled }}"
  892. matrix_nginx_proxy_proxy_jitsi_enabled: "{{ matrix_jitsi_enabled }}"
  893. matrix_nginx_proxy_proxy_grafana_enabled: "{{ matrix_grafana_enabled }}"
  894. matrix_nginx_proxy_proxy_sygnal_enabled: "{{ matrix_sygnal_enabled }}"
  895. matrix_nginx_proxy_proxy_matrix_corporal_api_enabled: "{{ matrix_corporal_enabled and matrix_corporal_http_api_enabled }}"
  896. matrix_nginx_proxy_proxy_matrix_corporal_api_addr_with_container: "matrix-corporal:41081"
  897. matrix_nginx_proxy_proxy_matrix_corporal_api_addr_sans_container: "127.0.0.1:41081"
  898. matrix_nginx_proxy_proxy_matrix_identity_api_enabled: "{{ matrix_ma1sd_enabled }}"
  899. matrix_nginx_proxy_proxy_matrix_identity_api_addr_with_container: "matrix-ma1sd:8090"
  900. matrix_nginx_proxy_proxy_matrix_identity_api_addr_sans_container: "127.0.0.1:8090"
  901. # By default, we do TLS termination for the Matrix Federation API (port 8448) at matrix-nginx-proxy.
  902. # Unless this is handled there OR Synapse's federation listener port is disabled, we'll reverse-proxy.
  903. matrix_nginx_proxy_proxy_matrix_federation_api_enabled: "{{ matrix_synapse_federation_port_enabled and not matrix_synapse_tls_federation_listener_enabled }}"
  904. matrix_nginx_proxy_proxy_matrix_federation_api_addr_with_container: "matrix-nginx-proxy:12088"
  905. matrix_nginx_proxy_proxy_matrix_federation_api_addr_sans_container: "127.0.0.1:12088"
  906. # Settings controlling matrix-synapse-proxy.conf
  907. matrix_nginx_proxy_proxy_synapse_enabled: "{{ matrix_synapse_enabled }}"
  908. # When matrix-nginx-proxy is disabled, the actual port number that the vhost uses may begin to matter.
  909. matrix_nginx_proxy_proxy_matrix_federation_port: "{{ matrix_federation_public_port }}"
  910. matrix_nginx_proxy_container_federation_host_bind_port: "{{ matrix_federation_public_port }}"
  911. # This used to be hooked to `matrix_synapse_metrics_enabled`, but we don't do it anymore.
  912. # The fact that someone wishes to enable Synapse metrics does not necessarily mean they want to make them public.
  913. # A local Prometheus can consume them over the container network.
  914. matrix_nginx_proxy_proxy_synapse_metrics: false
  915. matrix_nginx_proxy_proxy_synapse_metrics_addr_with_container: "matrix-synapse:{{ matrix_synapse_metrics_port }}"
  916. matrix_nginx_proxy_proxy_synapse_metrics_addr_sans_container: "127.0.0.1:{{ matrix_synapse_metrics_port }}"
  917. matrix_nginx_proxy_proxy_matrix_user_directory_search_enabled: "{{ matrix_ma1sd_enabled }}"
  918. matrix_nginx_proxy_proxy_matrix_user_directory_search_addr_with_container: "{{ matrix_nginx_proxy_proxy_matrix_identity_api_addr_with_container }}"
  919. matrix_nginx_proxy_proxy_matrix_user_directory_search_addr_sans_container: "{{ matrix_nginx_proxy_proxy_matrix_identity_api_addr_sans_container }}"
  920. matrix_nginx_proxy_self_check_validate_certificates: "{{ false if matrix_ssl_retrieval_method == 'self-signed' else true }}"
  921. matrix_nginx_proxy_synapse_presence_disabled: "{{ not matrix_synapse_presence_enabled }}"
  922. matrix_nginx_proxy_synapse_workers_enabled: "{{ matrix_synapse_workers_enabled }}"
  923. matrix_nginx_proxy_synapse_workers_list: "{{ matrix_synapse_workers_enabled_list }}"
  924. matrix_nginx_proxy_synapse_generic_worker_client_server_locations: "{{ matrix_synapse_workers_generic_worker_client_server_endpoints }}"
  925. matrix_nginx_proxy_synapse_generic_worker_federation_locations: "{{ matrix_synapse_workers_generic_worker_federation_endpoints }}"
  926. matrix_nginx_proxy_synapse_media_repository_locations: "{{matrix_synapse_workers_media_repository_endpoints|default([]) }}"
  927. matrix_nginx_proxy_synapse_user_dir_locations: "{{ matrix_synapse_workers_user_dir_endpoints|default([]) }}"
  928. matrix_nginx_proxy_synapse_frontend_proxy_locations: "{{ matrix_synapse_workers_frontend_proxy_endpoints|default([]) }}"
  929. matrix_nginx_proxy_systemd_wanted_services_list: |
  930. {{
  931. (['matrix-synapse.service'] if matrix_synapse_enabled else [])
  932. +
  933. (['matrix-corporal.service'] if matrix_corporal_enabled else [])
  934. +
  935. (['matrix-ma1sd.service'] if matrix_ma1sd_enabled else [])
  936. +
  937. (['matrix-client-element.service'] if matrix_client_element_enabled else [])
  938. }}
  939. matrix_ssl_domains_to_obtain_certificates_for: |
  940. {{
  941. ([matrix_server_fqn_matrix])
  942. +
  943. ([matrix_server_fqn_element] if matrix_client_element_enabled else [])
  944. +
  945. ([matrix_nginx_proxy_proxy_riot_compat_redirect_hostname] if matrix_nginx_proxy_proxy_riot_compat_redirect_enabled else [])
  946. +
  947. ([matrix_server_fqn_dimension] if matrix_dimension_enabled else [])
  948. +
  949. ([matrix_server_fqn_bot_go_neb] if matrix_bot_go_neb_enabled else [])
  950. +
  951. ([matrix_server_fqn_jitsi] if matrix_jitsi_enabled else [])
  952. +
  953. ([matrix_server_fqn_grafana] if matrix_grafana_enabled else [])
  954. +
  955. ([matrix_server_fqn_sygnal] if matrix_sygnal_enabled else [])
  956. +
  957. ([matrix_domain] if matrix_nginx_proxy_base_domain_serving_enabled else [])
  958. +
  959. matrix_ssl_additional_domains_to_obtain_certificates_for
  960. }}
  961. matrix_ssl_architecture: "{{
  962. {
  963. 'amd64': 'amd64',
  964. 'arm32': 'arm32v6',
  965. 'arm64': 'arm64v8',
  966. }[matrix_architecture]
  967. }}"
  968. matrix_ssl_pre_obtaining_required_service_name: "{{ 'matrix-dynamic-dns' if matrix_dynamic_dns_enabled else '' }}"
  969. ######################################################################
  970. #
  971. # /matrix-nginx-proxy
  972. #
  973. ######################################################################
  974. ######################################################################
  975. #
  976. # matrix-postgres
  977. #
  978. ######################################################################
  979. matrix_postgres_enabled: true
  980. matrix_postgres_architecture: "{{ matrix_architecture }}"
  981. # We unset this if internal Postgres disabled, which will cascade to some other variables
  982. # and tell users they need to set it (either here or in those variables).
  983. matrix_postgres_connection_hostname: "{{ 'matrix-postgres' if matrix_postgres_enabled else '' }}"
  984. matrix_postgres_pgloader_container_image_self_build: "{{ matrix_architecture != 'amd64' }}"
  985. matrix_postgres_additional_databases: |
  986. {{
  987. ([{
  988. 'name': matrix_synapse_database_database,
  989. 'username': matrix_synapse_database_user,
  990. 'password': matrix_synapse_database_password,
  991. }] if (matrix_synapse_enabled and matrix_synapse_database_database != matrix_postgres_db_name and matrix_synapse_database_host == 'matrix-postgres') else [])
  992. +
  993. ([{
  994. 'name': matrix_ma1sd_database_name,
  995. 'username': matrix_ma1sd_database_username,
  996. 'password': matrix_ma1sd_database_password,
  997. }] if (matrix_ma1sd_enabled and matrix_ma1sd_database_engine == 'postgres' and matrix_ma1sd_database_hostname == 'matrix-postgres') else [])
  998. +
  999. ([{
  1000. 'name': matrix_bot_matrix_reminder_bot_database_name,
  1001. 'username': matrix_bot_matrix_reminder_bot_database_username,
  1002. 'password': matrix_bot_matrix_reminder_bot_database_password,
  1003. }] 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 [])
  1004. +
  1005. ([{
  1006. 'name': matrix_registration_database_name,
  1007. 'username': matrix_registration_database_username,
  1008. 'password': matrix_registration_database_password,
  1009. }] if (matrix_registration_enabled and matrix_registration_database_engine == 'postgres' and matrix_registration_database_hostname == 'matrix-postgres') else [])
  1010. +
  1011. ([{
  1012. 'name': matrix_appservice_discord_database_name,
  1013. 'username': matrix_appservice_discord_database_username,
  1014. 'password': matrix_appservice_discord_database_password,
  1015. }] if (matrix_appservice_discord_enabled and matrix_appservice_discord_database_engine == 'postgres' and matrix_appservice_discord_database_hostname == 'matrix-postgres') else [])
  1016. +
  1017. ([{
  1018. 'name': matrix_appservice_slack_database_name,
  1019. 'username': matrix_appservice_slack_database_username,
  1020. 'password': matrix_appservice_slack_database_password,
  1021. }] if (matrix_appservice_slack_enabled and matrix_appservice_slack_database_engine == 'postgres' and matrix_appservice_slack_database_hostname == 'matrix-postgres') else [])
  1022. +
  1023. ([{
  1024. 'name': matrix_appservice_irc_database_name,
  1025. 'username': matrix_appservice_irc_database_username,
  1026. 'password': matrix_appservice_irc_database_password,
  1027. }] if (matrix_appservice_irc_enabled and matrix_appservice_irc_database_engine == 'postgres' and matrix_appservice_irc_database_hostname == 'matrix-postgres') else [])
  1028. +
  1029. ([{
  1030. 'name': matrix_mautrix_facebook_database_name,
  1031. 'username': matrix_mautrix_facebook_database_username,
  1032. 'password': matrix_mautrix_facebook_database_password,
  1033. }] if (matrix_mautrix_facebook_enabled and matrix_mautrix_facebook_database_engine == 'postgres' and matrix_mautrix_facebook_database_hostname == 'matrix-postgres') else [])
  1034. +
  1035. ([{
  1036. 'name': matrix_mautrix_hangouts_database_name,
  1037. 'username': matrix_mautrix_hangouts_database_username,
  1038. 'password': matrix_mautrix_hangouts_database_password,
  1039. }] if (matrix_mautrix_hangouts_enabled and matrix_mautrix_hangouts_database_engine == 'postgres' and matrix_mautrix_hangouts_database_hostname == 'matrix-postgres') else [])
  1040. +
  1041. ([{
  1042. 'name': matrix_mautrix_instagram_database_name,
  1043. 'username': matrix_mautrix_instagram_database_username,
  1044. 'password': matrix_mautrix_instagram_database_password,
  1045. }] if (matrix_mautrix_instagram_enabled and matrix_mautrix_instagram_database_engine == 'postgres' and matrix_mautrix_instagram_database_hostname == 'matrix-postgres') else [])
  1046. +
  1047. ([{
  1048. 'name': matrix_mautrix_signal_database_name,
  1049. 'username': matrix_mautrix_signal_database_username,
  1050. 'password': matrix_mautrix_signal_database_password,
  1051. }] if (matrix_mautrix_signal_enabled and matrix_mautrix_signal_database_engine == 'postgres' and matrix_mautrix_signal_database_hostname == 'matrix-postgres') else [])
  1052. +
  1053. ([{
  1054. 'name': matrix_mautrix_telegram_database_name,
  1055. 'username': matrix_mautrix_telegram_database_username,
  1056. 'password': matrix_mautrix_telegram_database_password,
  1057. }] if (matrix_mautrix_telegram_enabled and matrix_mautrix_telegram_database_engine == 'postgres' and matrix_mautrix_telegram_database_hostname == 'matrix-postgres') else [])
  1058. +
  1059. ([{
  1060. 'name': matrix_mautrix_whatsapp_database_name,
  1061. 'username': matrix_mautrix_whatsapp_database_username,
  1062. 'password': matrix_mautrix_whatsapp_database_password,
  1063. }] if (matrix_mautrix_whatsapp_enabled and matrix_mautrix_whatsapp_database_engine == 'postgres' and matrix_mautrix_whatsapp_database_hostname == 'matrix-postgres') else [])
  1064. +
  1065. ([{
  1066. 'name': matrix_mx_puppet_skype_database_name,
  1067. 'username': matrix_mx_puppet_skype_database_username,
  1068. 'password': matrix_mx_puppet_skype_database_password,
  1069. }] if (matrix_mx_puppet_skype_enabled and matrix_mx_puppet_skype_database_engine == 'postgres' and matrix_mx_puppet_skype_database_hostname == 'matrix-postgres') else [])
  1070. +
  1071. ([{
  1072. 'name': matrix_mx_puppet_slack_database_name,
  1073. 'username': matrix_mx_puppet_slack_database_username,
  1074. 'password': matrix_mx_puppet_slack_database_password,
  1075. }] if (matrix_mx_puppet_slack_enabled and matrix_mx_puppet_slack_database_engine == 'postgres' and matrix_mx_puppet_slack_database_hostname == 'matrix-postgres') else [])
  1076. +
  1077. ([{
  1078. 'name': matrix_mx_puppet_twitter_database_name,
  1079. 'username': matrix_mx_puppet_twitter_database_username,
  1080. 'password': matrix_mx_puppet_twitter_database_password,
  1081. }] if (matrix_mx_puppet_twitter_enabled and matrix_mx_puppet_twitter_database_engine == 'postgres' and matrix_mx_puppet_twitter_database_hostname == 'matrix-postgres') else [])
  1082. +
  1083. ([{
  1084. 'name': matrix_mx_puppet_instagram_database_name,
  1085. 'username': matrix_mx_puppet_instagram_database_username,
  1086. 'password': matrix_mx_puppet_instagram_database_password,
  1087. }] if (matrix_mx_puppet_instagram_enabled and matrix_mx_puppet_instagram_database_engine == 'postgres' and matrix_mx_puppet_instagram_database_hostname == 'matrix-postgres') else [])
  1088. +
  1089. ([{
  1090. 'name': matrix_mx_puppet_discord_database_name,
  1091. 'username': matrix_mx_puppet_discord_database_username,
  1092. 'password': matrix_mx_puppet_discord_database_password,
  1093. }] if (matrix_mx_puppet_discord_enabled and matrix_mx_puppet_discord_database_engine == 'postgres' and matrix_mx_puppet_discord_database_hostname == 'matrix-postgres') else [])
  1094. +
  1095. ([{
  1096. 'name': matrix_mx_puppet_steam_database_name,
  1097. 'username': matrix_mx_puppet_steam_database_username,
  1098. 'password': matrix_mx_puppet_steam_database_password,
  1099. }] if (matrix_mx_puppet_steam_enabled and matrix_mx_puppet_steam_database_engine == 'postgres' and matrix_mx_puppet_steam_database_hostname == 'matrix-postgres') else [])
  1100. +
  1101. ([{
  1102. 'name': matrix_mx_puppet_groupme_database_name,
  1103. 'username': matrix_mx_puppet_groupme_database_username,
  1104. 'password': matrix_mx_puppet_groupme_database_password,
  1105. }] if (matrix_mx_puppet_groupme_enabled and matrix_mx_puppet_groupme_database_engine == 'postgres' and matrix_mx_puppet_groupme_database_hostname == 'matrix-postgres') else [])
  1106. +
  1107. ([{
  1108. 'name': matrix_dimension_database_name,
  1109. 'username': matrix_dimension_database_username,
  1110. 'password': matrix_dimension_database_password,
  1111. }] if (matrix_dimension_enabled and matrix_dimension_database_engine == 'postgres' and matrix_dimension_database_hostname == 'matrix-postgres') else [])
  1112. +
  1113. ([{
  1114. 'name': matrix_etherpad_database_name,
  1115. 'username': matrix_etherpad_database_username,
  1116. 'password': matrix_etherpad_database_password,
  1117. }] if (matrix_etherpad_enabled and matrix_etherpad_database_engine == 'postgres' and matrix_etherpad_database_hostname == 'matrix-postgres') else [])
  1118. +
  1119. ([{
  1120. 'name': matrix_sygnal_database_name,
  1121. 'username': matrix_sygnal_database_username,
  1122. 'password': matrix_sygnal_database_password,
  1123. }] if (matrix_sygnal_enabled and matrix_sygnal_database_engine == 'postgres' and matrix_sygnal_database_hostname == 'matrix-postgres') else [])
  1124. }}
  1125. matrix_postgres_import_roles_to_ignore: |
  1126. {{
  1127. [matrix_postgres_connection_username]
  1128. +
  1129. matrix_postgres_additional_databases|map(attribute='username')|list
  1130. }}
  1131. matrix_postgres_import_databases_to_ignore: |
  1132. {{
  1133. [matrix_postgres_db_name]
  1134. +
  1135. matrix_postgres_additional_databases|map(attribute='name')|list
  1136. }}
  1137. ######################################################################
  1138. #
  1139. # /matrix-postgres
  1140. #
  1141. ######################################################################
  1142. ######################################################################
  1143. #
  1144. # matrix-sygnal
  1145. #
  1146. ######################################################################
  1147. # Most people don't need their own push-server, because they also need their own app to utilize it from.
  1148. matrix_sygnal_enabled: false
  1149. # If someone instals Prometheus via the playbook, they most likely wish to monitor Sygnal.
  1150. matrix_sygnal_metrics_prometheus_enabled: "{{ matrix_prometheus_enabled }}"
  1151. matrix_sygnal_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:6000' }}"
  1152. # Postgres is the default, except if not using `matrix_postgres` (internal postgres)
  1153. matrix_sygnal_database_engine: "{{ 'postgres' if matrix_postgres_enabled else 'sqlite' }}"
  1154. matrix_sygnal_database_password: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'sygnal') | to_uuid }}"
  1155. ######################################################################
  1156. #
  1157. # /matrix-sygnal
  1158. #
  1159. ######################################################################
  1160. ######################################################################
  1161. #
  1162. # matrix-redis
  1163. #
  1164. ######################################################################
  1165. matrix_redis_enabled: "{{ matrix_synapse_workers_enabled }}"
  1166. ######################################################################
  1167. #
  1168. # /matrix-redis
  1169. #
  1170. ######################################################################
  1171. ######################################################################
  1172. #
  1173. # matrix-client-element
  1174. #
  1175. ######################################################################
  1176. # By default, this playbook installs the Element web UI on the `matrix_server_fqn_element` domain.
  1177. # If you wish to connect to your Matrix server by other means, you may wish to disable this.
  1178. matrix_client_element_enabled: true
  1179. matrix_client_element_container_image_self_build: "{{ matrix_architecture != 'amd64' }}"
  1180. # Normally, matrix-nginx-proxy is enabled and nginx can reach Element over the container network.
  1181. # If matrix-nginx-proxy is not enabled, or you otherwise have a need for it, you can expose
  1182. # the Element HTTP port to the local host.
  1183. matrix_client_element_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:8765' }}"
  1184. matrix_client_element_default_hs_url: "{{ matrix_homeserver_url }}"
  1185. matrix_client_element_default_is_url: "{{ matrix_identity_server_url }}"
  1186. # Use Dimension if enabled, otherwise fall back to Scalar
  1187. matrix_client_element_integrations_ui_url: "{{ matrix_dimension_integrations_ui_url if matrix_dimension_enabled else 'https://scalar.vector.im/' }}"
  1188. matrix_client_element_integrations_rest_url: "{{ matrix_dimension_integrations_rest_url if matrix_dimension_enabled else 'https://scalar.vector.im/api' }}"
  1189. matrix_client_element_integrations_widgets_urls: "{{ matrix_dimension_integrations_widgets_urls if matrix_dimension_enabled else ['https://scalar.vector.im/api'] }}"
  1190. 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' }}"
  1191. matrix_client_element_self_check_validate_certificates: "{{ false if matrix_ssl_retrieval_method == 'self-signed' else true }}"
  1192. matrix_client_element_registration_enabled: "{{ matrix_synapse_enable_registration }}"
  1193. matrix_client_element_enable_presence_by_hs_url: |
  1194. {{
  1195. none
  1196. if matrix_synapse_presence_enabled
  1197. else {matrix_client_element_default_hs_url: false}
  1198. }}
  1199. matrix_client_element_welcome_user_id: ~
  1200. matrix_client_element_jitsi_preferredDomain: "{{ matrix_server_fqn_jitsi if matrix_jitsi_enabled else '' }}"
  1201. ######################################################################
  1202. #
  1203. # /matrix-client-element
  1204. #
  1205. ######################################################################
  1206. ######################################################################
  1207. #
  1208. # matrix-synapse
  1209. #
  1210. ######################################################################
  1211. matrix_synapse_container_image_self_build: "{{ matrix_architecture not in ['arm64', 'amd64'] }}"
  1212. # When ma1sd is enabled, we can use it to validate email addresses and phone numbers.
  1213. # 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.
  1214. matrix_synapse_account_threepid_delegates_email: "{{ 'http://matrix-ma1sd:8090' if matrix_ma1sd_enabled else '' }}"
  1215. matrix_synapse_account_threepid_delegates_msisdn: "{{ 'http://matrix-ma1sd:8090' if matrix_ma1sd_enabled else '' }}"
  1216. # Normally, matrix-nginx-proxy is enabled and nginx can reach Synapse over the container network.
  1217. # If matrix-nginx-proxy is not enabled, or you otherwise have a need for it,
  1218. # you can expose Synapse's ports to the host.
  1219. #
  1220. # For exposing the Matrix Client API's port (plain HTTP) to the local host.
  1221. matrix_synapse_container_client_api_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:8008' }}"
  1222. #
  1223. # For exposing the Matrix Federation API's plain port (plain HTTP) to the local host.
  1224. matrix_synapse_container_federation_api_plain_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:8048' }}"
  1225. #
  1226. # For exposing the Matrix Federation API's TLS port (HTTPS) to the internet on all network interfaces.
  1227. 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 '' }}"
  1228. #
  1229. # For exposing the Synapse Metrics API's port (plain HTTP) to the local host.
  1230. 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 '' }}"
  1231. #
  1232. # For exposing the Synapse Manhole port (plain HTTP) to the local host.
  1233. matrix_synapse_container_manhole_api_host_bind_port: "{{ '127.0.0.1:9000' if matrix_synapse_manhole_enabled else '' }}"
  1234. #
  1235. # For exposing the Synapse worker (and metrics) ports to the local host.
  1236. matrix_synapse_workers_container_host_bind_address: "{{ '127.0.0.1' if (matrix_synapse_workers_enabled and not matrix_nginx_proxy_enabled) else '' }}"
  1237. matrix_synapse_database_password: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'synapse.db') | to_uuid }}"
  1238. # We do not enable TLS in Synapse by default.
  1239. # TLS is handled by the matrix-nginx-proxy, which proxies the requests to Synapse.
  1240. matrix_synapse_tls_federation_listener_enabled: false
  1241. matrix_synapse_tls_certificate_path: ~
  1242. matrix_synapse_tls_private_key_path: ~
  1243. matrix_synapse_federation_port_openid_resource_required: "{{ not matrix_synapse_federation_enabled and (matrix_dimension_enabled or matrix_ma1sd_enabled) }}"
  1244. # If someone instals Prometheus via the playbook, they most likely wish to monitor Synapse.
  1245. matrix_synapse_metrics_enabled: "{{ matrix_prometheus_enabled }}"
  1246. matrix_synapse_email_enabled: "{{ matrix_mailer_enabled }}"
  1247. matrix_synapse_email_smtp_host: "matrix-mailer"
  1248. matrix_synapse_email_smtp_port: 8025
  1249. matrix_synapse_email_smtp_require_transport_security: false
  1250. matrix_synapse_email_notif_from: "Matrix <{{ matrix_mailer_sender_address }}>"
  1251. # Even if TURN doesn't support TLS (it does by default),
  1252. # it doesn't hurt to try a secure connection anyway.
  1253. matrix_synapse_turn_uris: |
  1254. {{
  1255. [
  1256. 'turns:' + matrix_server_fqn_matrix + '?transport=udp',
  1257. 'turns:' + matrix_server_fqn_matrix + '?transport=tcp',
  1258. 'turn:' + matrix_server_fqn_matrix + '?transport=udp',
  1259. 'turn:' + matrix_server_fqn_matrix + '?transport=tcp',
  1260. ]
  1261. if matrix_coturn_enabled
  1262. else []
  1263. }}
  1264. matrix_synapse_turn_shared_secret: "{{ matrix_coturn_turn_static_auth_secret if matrix_coturn_enabled else '' }}"
  1265. matrix_synapse_self_check_validate_certificates: "{{ false if matrix_ssl_retrieval_method == 'self-signed' else true }}"
  1266. matrix_synapse_systemd_required_services_list: |
  1267. {{
  1268. (['docker.service'])
  1269. +
  1270. (['matrix-postgres.service'] if matrix_postgres_enabled else [])
  1271. +
  1272. (['matrix-goofys'] if matrix_s3_media_store_enabled else [])
  1273. }}
  1274. matrix_synapse_systemd_wanted_services_list: |
  1275. {{
  1276. (['matrix-coturn.service'] if matrix_coturn_enabled else [])
  1277. +
  1278. (['matrix-mailer.service'] if matrix_mailer_enabled else [])
  1279. }}
  1280. # Synapse workers (used for parallel load-scaling) need Redis for IPC.
  1281. matrix_synapse_redis_enabled: "{{ matrix_redis_enabled }}"
  1282. matrix_synapse_redis_host: "{{ 'matrix-redis' if matrix_redis_enabled else '' }}"
  1283. matrix_synapse_redis_password: "{{ matrix_redis_connection_password if matrix_redis_enabled else '' }}"
  1284. ######################################################################
  1285. #
  1286. # /matrix-synapse
  1287. #
  1288. ######################################################################
  1289. ######################################################################
  1290. #
  1291. # matrix-synapse-admin
  1292. #
  1293. ######################################################################
  1294. matrix_synapse_admin_enabled: false
  1295. # Normally, matrix-nginx-proxy is enabled and nginx can reach Synapse Admin over the container network.
  1296. # If matrix-nginx-proxy is not enabled, or you otherwise have a need for it, you can expose
  1297. # Synapse Admin's HTTP port to the local host.
  1298. matrix_synapse_admin_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:8766' }}"
  1299. matrix_synapse_admin_container_self_build: "{{ matrix_architecture != 'amd64' }}"
  1300. ######################################################################
  1301. #
  1302. # /matrix-synapse-admin
  1303. #
  1304. ######################################################################
  1305. ######################################################################
  1306. #
  1307. # matrix-prometheus-node-exporter
  1308. #
  1309. ######################################################################
  1310. matrix_prometheus_node_exporter_enabled: false
  1311. ######################################################################
  1312. #
  1313. # /matrix-prometheus-node-exporter
  1314. #
  1315. ######################################################################
  1316. ######################################################################
  1317. #
  1318. # matrix-prometheus
  1319. #
  1320. ######################################################################
  1321. matrix_prometheus_enabled: false
  1322. # Normally, matrix-nginx-proxy is enabled and nginx can reach Prometheus over the container network.
  1323. # If matrix-nginx-proxy is not enabled, or you otherwise have a need for it, you can expose
  1324. # Prometheus' HTTP port to the local host.
  1325. matrix_prometheus_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:9090' }}"
  1326. matrix_prometheus_scraper_synapse_enabled: "{{ matrix_synapse_enabled and matrix_synapse_metrics_enabled }}"
  1327. matrix_prometheus_scraper_synapse_targets: ['matrix-synapse:{{ matrix_synapse_metrics_port }}']
  1328. matrix_prometheus_scraper_synapse_rules_synapse_tag: "{{ matrix_synapse_docker_image_tag }}"
  1329. matrix_prometheus_scraper_node_enabled: "{{ matrix_prometheus_node_exporter_enabled }}"
  1330. matrix_prometheus_scraper_node_targets: "{{ ['matrix-prometheus-node-exporter:9100'] if matrix_prometheus_node_exporter_enabled else [] }}"
  1331. ######################################################################
  1332. #
  1333. # /matrix-prometheus
  1334. #
  1335. ######################################################################
  1336. ######################################################################
  1337. #
  1338. # matrix-grafana
  1339. #
  1340. ######################################################################
  1341. matrix_grafana_enabled: false
  1342. # Normally, matrix-nginx-proxy is enabled and nginx can reach Grafana over the container network.
  1343. # If matrix-nginx-proxy is not enabled, or you otherwise have a need for it, you can expose
  1344. # Grafana's HTTP port to the local host.
  1345. matrix_grafana_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:3000' }}"
  1346. ######################################################################
  1347. #
  1348. # /matrix-grafana
  1349. #
  1350. ######################################################################
  1351. ######################################################################
  1352. #
  1353. # matrix-registration
  1354. #
  1355. ######################################################################
  1356. matrix_registration_enabled: false
  1357. # Normally, matrix-nginx-proxy is enabled and nginx can reach matrix-registration over the container network.
  1358. # If matrix-nginx-proxy is not enabled, or you otherwise have a need for it, you can expose
  1359. # matrix-registration's HTTP port to the local host.
  1360. matrix_registration_container_http_host_bind_port: "{{ '' if matrix_nginx_proxy_enabled else '127.0.0.1:8767' }}"
  1361. matrix_registration_riot_instance: "{{ ('https://' + matrix_server_fqn_element) if matrix_client_element_enabled else 'https://riot.im/app/' }}"
  1362. matrix_registration_shared_secret: "{{ matrix_synapse_registration_shared_secret if matrix_synapse_enabled else '' }}"
  1363. matrix_registration_server_location: "{{ matrix_homeserver_container_url }}"
  1364. matrix_registration_api_validate_certs: "{{ false if matrix_ssl_retrieval_method == 'self-signed' else true }}"
  1365. matrix_registration_container_image_self_build: "{{ matrix_architecture != 'amd64' }}"
  1366. matrix_registration_systemd_required_services_list: |
  1367. {{
  1368. ['docker.service']
  1369. +
  1370. (['matrix-postgres.service'] if matrix_postgres_enabled else [])
  1371. }}
  1372. # Postgres is the default, except if not using `matrix_postgres` (internal postgres)
  1373. matrix_registration_database_engine: "{{ 'postgres' if matrix_postgres_enabled else 'sqlite' }}"
  1374. matrix_registration_database_password: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'mx.registr.db') | to_uuid }}"
  1375. ######################################################################
  1376. #
  1377. # /matrix-registration
  1378. #
  1379. ######################################################################
  1380. ######################################################################
  1381. #
  1382. # matrix-postgres-backup
  1383. #
  1384. ######################################################################
  1385. matrix_postgres_backup_connection_hostname: "{{ matrix_postgres_connection_hostname }}"
  1386. matrix_postgres_backup_connection_port: "{{ matrix_postgres_connection_port }}"
  1387. matrix_postgres_backup_connection_username: "{{ matrix_postgres_connection_username }}"
  1388. matrix_postgres_backup_connection_password: "{{ matrix_postgres_connection_password }}"
  1389. matrix_postgres_backup_postgres_data_path: "{{ matrix_postgres_data_path if matrix_postgres_enabled else '' }}"
  1390. # the default matrix synapse databse is not always part of the matrix_postgres_additional_databases variable thus we have to add it if the default database is used
  1391. matrix_postgres_backup_databases: |
  1392. {{
  1393. (([{
  1394. 'name': matrix_synapse_database_database
  1395. }] if (matrix_synapse_enabled and matrix_synapse_database_database == matrix_postgres_db_name and matrix_synapse_database_host == 'matrix-postgres') else [])
  1396. +
  1397. matrix_postgres_additional_databases)|map(attribute='name')|list
  1398. }}
  1399. ######################################################################
  1400. #
  1401. # /matrix-postgres-backup
  1402. #
  1403. ######################################################################