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.
 
 

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