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

1955 строки
83 KiB

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