Matrix Docker Ansible eploy
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.
 
 

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