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

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