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

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