Matrix Docker Ansible eploy
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
 
 

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