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

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