Matrix Docker Ansible eploy
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

1533 lines
66 KiB

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