Matrix Docker Ansible eploy
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

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