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

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