Matrix Docker Ansible eploy
No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.
 
 

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