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.
 
 

279 lines
14 KiB

  1. ---
  2. # The bare domain name which represents your Matrix identity.
  3. # Matrix user ids for your server will be of the form (`@user:<matrix-domain>`).
  4. #
  5. # Note: this playbook does not touch the server referenced here.
  6. # Installation happens on another server ("matrix.<matrix-domain>", see `matrix_server_fqn_matrix`).
  7. #
  8. # Example value: example.com
  9. matrix_domain: ~
  10. # The optional matrix admin MXID, used in bridges' configs to set bridge admin user
  11. # Example value: "@someone:{{ matrix_domain }}"
  12. matrix_admin: ''
  13. # matrix_homeserver_enabled controls whether to enable the homeserver systemd service, etc.
  14. #
  15. # Unless you're wrapping this playbook in another one
  16. # where you optionally wish to disable homeserver integration, you don't need to use this.
  17. #
  18. # Note: disabling this does not mean that a homeserver won't get installed.
  19. # Whether homeserver software is installed depends on other (`matrix_HOMESERVER_enabled`) variables - see `group_vars/matrix_servers`.
  20. matrix_homeserver_enabled: true
  21. # Homeserver admin contacts and support page as per MSC 1929
  22. # See: https://github.com/matrix-org/matrix-spec-proposals/pull/1929
  23. # Users in form:
  24. # matrix_homeserver_admin_contacts:
  25. # - matrix_id: @admin:domain.tld
  26. # email_address: admin@domain.tld
  27. # role: admin
  28. # - email_address: security@domain.tld
  29. # role: security
  30. # Also see: `matrix_well_known_matrix_support_enabled`
  31. matrix_homeserver_admin_contacts: []
  32. # Url string like https://domain.tld/support.html
  33. # Also see: `matrix_well_known_matrix_support_enabled`
  34. matrix_homeserver_support_url: ''
  35. # This will contain the homeserver implementation that is in use.
  36. # Valid values: synapse, dendrite, conduit
  37. #
  38. # By default, we use Synapse, because it's the only full-featured Matrix server at the moment.
  39. #
  40. # This value automatically influences other variables (`matrix_synapse_enabled`, `matrix_dendrite_enabled`, etc.).
  41. # The homeserver implementation of an existing server cannot be changed without data loss.
  42. matrix_homeserver_implementation: synapse
  43. # This contains a secret, which is used for generating various other secrets later on.
  44. matrix_homeserver_generic_secret_key: ''
  45. # This is where your data lives and what we set up.
  46. # This and the Element FQN (see below) are expected to be on the same server.
  47. matrix_server_fqn_matrix: "matrix.{{ matrix_domain }}"
  48. # This is where you access federation API.
  49. matrix_server_fqn_matrix_federation: '{{ matrix_server_fqn_matrix }}'
  50. # This is where you access the Element web UI from (if enabled via matrix_client_element_enabled; enabled by default).
  51. # This and the Matrix FQN (see above) are expected to be on the same server.
  52. matrix_server_fqn_element: "element.{{ matrix_domain }}"
  53. # This is where you access the Hydrogen web client from (if enabled via matrix_client_hydrogen_enabled; disabled by default).
  54. matrix_server_fqn_hydrogen: "hydrogen.{{ matrix_domain }}"
  55. # This is where you access the Cinny web client from (if enabled via matrix_client_cinny_enabled; disabled by default).
  56. matrix_server_fqn_cinny: "cinny.{{ matrix_domain }}"
  57. # This is where you access the buscarron bot from (if enabled via matrix_bot_buscarron_enabled; disabled by default).
  58. matrix_server_fqn_buscarron: "buscarron.{{ matrix_domain }}"
  59. # This is where you access the Dimension.
  60. matrix_server_fqn_dimension: "dimension.{{ matrix_domain }}"
  61. # This is where you access the etherpad (if enabled via matrix_etherpad_enabled; disabled by default).
  62. matrix_server_fqn_etherpad: "etherpad.{{ matrix_domain }}"
  63. # For use with Go-NEB! (github callback url for example)
  64. matrix_server_fqn_bot_go_neb: "goneb.{{ matrix_domain }}"
  65. # This is where you access Jitsi.
  66. matrix_server_fqn_jitsi: "jitsi.{{ matrix_domain }}"
  67. # This is where you access Grafana.
  68. matrix_server_fqn_grafana: "stats.{{ matrix_domain }}"
  69. # This is where you access the Sygnal push gateway.
  70. matrix_server_fqn_sygnal: "sygnal.{{ matrix_domain }}"
  71. # This is where you access the ntfy push notification service.
  72. matrix_server_fqn_ntfy: "ntfy.{{ matrix_domain }}"
  73. matrix_federation_public_port: 8448
  74. # The architecture that your server runs.
  75. # Recognized values by us are 'amd64', 'arm32' and 'arm64'.
  76. # Not all architectures support all services, so your experience (on non-amd64) may vary.
  77. # See docs/alternative-architectures.md
  78. matrix_architecture: "{{ 'amd64' if ansible_architecture == 'x86_64' else ('arm64' if ansible_architecture == 'aarch64' else ('arm32' if ansible_architecture.startswith('armv') else '')) }}"
  79. # The architecture for Debian packages.
  80. # See: https://wiki.debian.org/SupportedArchitectures
  81. # We just remap from our `matrix_architecture` values to what Debian and possibly other distros call things.
  82. matrix_debian_arch: "{{ 'armhf' if matrix_architecture == 'arm32' else matrix_architecture }}"
  83. matrix_container_global_registry_prefix: "docker.io/"
  84. matrix_user_username: "matrix"
  85. matrix_user_groupname: "matrix"
  86. # By default, the playbook creates the user (`matrix_user_username`)
  87. # and group (`matrix_user_groupname`) with a random id.
  88. # To use a specific user/group id, override these variables.
  89. matrix_user_uid: ~
  90. matrix_user_gid: ~
  91. matrix_base_data_path: "/matrix"
  92. matrix_base_data_path_mode: "750"
  93. matrix_bin_path: "{{ matrix_base_data_path }}/bin"
  94. matrix_static_files_base_path: "{{ matrix_base_data_path }}/static-files"
  95. matrix_host_command_sleep: "/usr/bin/env sleep"
  96. matrix_host_command_chown: "/usr/bin/env chown"
  97. matrix_host_command_fusermount: "/usr/bin/env fusermount"
  98. matrix_host_command_openssl: "/usr/bin/env openssl"
  99. matrix_homeserver_url: "https://{{ matrix_server_fqn_matrix }}"
  100. # Specifies where the homeserver's Client-Server API is on the container network.
  101. # Where this is depends on whether there's a reverse-proxy in front of the homeserver, which homeserver it is, etc.
  102. # This likely gets overriden elsewhere.
  103. matrix_homeserver_container_url: ""
  104. # Specifies where the homeserver's Federation API is on the container network.
  105. # Where this is depends on whether there's a reverse-proxy in front of the homeserver, which homeserver it is, etc.
  106. # This likely gets overriden elsewhere.
  107. matrix_homeserver_container_federation_url: ""
  108. matrix_identity_server_url: ~
  109. matrix_integration_manager_rest_url: ~
  110. matrix_integration_manager_ui_url: ~
  111. # The domain name where a Jitsi server is self-hosted.
  112. # If set, `/.well-known/matrix/client` will suggest Element clients to use that Jitsi server.
  113. # See: https://github.com/vector-im/element-web/blob/develop/docs/jitsi.md#configuring-element-to-use-your-self-hosted-jitsi-server
  114. matrix_client_element_jitsi_preferredDomain: '' # noqa var-naming
  115. # Controls whether Element should use End-to-End Encryption by default.
  116. # Setting this to false will update `/.well-known/matrix/client` and tell Element clients to avoid E2EE.
  117. # See: https://github.com/vector-im/element-web/blob/develop/docs/e2ee.md
  118. matrix_client_element_e2ee_default: true
  119. # Controls whether Element should require a secure backup set up before Element can be used.
  120. # Setting this to true will update `/.well-known/matrix/client` and tell Element require a secure backup.
  121. # See: https://github.com/vector-im/element-web/blob/develop/docs/e2ee.md
  122. matrix_client_element_e2ee_secure_backup_required: false
  123. # Controls which backup methods from ["key", "passphrase"] should be used, both is the default.
  124. # Setting this to other then empty will update `/.well-known/matrix/client` and tell Element which method to use
  125. # See: https://github.com/vector-im/element-web/blob/develop/docs/e2ee.md
  126. matrix_client_element_e2ee_secure_backup_setup_methods: []
  127. # Default `/.well-known/matrix/client` configuration - it covers the generic use case.
  128. # You can customize it by controlling the various variables inside the template file that it references.
  129. #
  130. # For a more advanced customization, you can extend the default (see `matrix_well_known_matrix_client_configuration_extension_json`)
  131. # or completely replace this variable with your own template.
  132. #
  133. # The side-effect of this lookup is that Ansible would even parse the JSON for us, returning a dict.
  134. # This is unlike what it does when looking up YAML template files (no automatic parsing there).
  135. matrix_well_known_matrix_client_configuration_default: "{{ lookup('template', 'templates/static-files/well-known/matrix-client.j2') }}"
  136. # Your custom JSON configuration for `/.well-known/matrix/client` should go to `matrix_well_known_matrix_client_configuration_extension_json`.
  137. # This configuration extends the default starting configuration (`matrix_well_known_matrix_client_configuration_default`).
  138. #
  139. # You can override individual variables from the default configuration, or introduce new ones.
  140. #
  141. # If you need something more special, you can take full control by
  142. # completely redefining `matrix_well_known_matrix_client_configuration`.
  143. #
  144. # Example configuration extension follows:
  145. #
  146. # matrix_well_known_matrix_client_configuration_extension_json: |
  147. # {
  148. # "io.element.call_behaviour": {
  149. # "widget_build_url": "https://dimension.example.com/api/v1/dimension/bigbluebutton/widget_state"
  150. # }
  151. # }
  152. matrix_well_known_matrix_client_configuration_extension_json: '{}'
  153. matrix_well_known_matrix_client_configuration_extension: "{{ matrix_well_known_matrix_client_configuration_extension_json | from_json if matrix_well_known_matrix_client_configuration_extension_json | from_json is mapping else {} }}"
  154. # Holds the final `/.well-known/matrix/client` configuration (a combination of the default and its extension).
  155. # You most likely don't need to touch this variable. Instead, see `matrix_well_known_matrix_client_configuration_default` and `matrix_well_known_matrix_client_configuration_extension_json`.
  156. matrix_well_known_matrix_client_configuration: "{{ matrix_well_known_matrix_client_configuration_default | combine(matrix_well_known_matrix_client_configuration_extension, recursive=True) }}"
  157. # Default `/.well-known/matrix/server` configuration - it covers the generic use case.
  158. # You can customize it by controlling the various variables inside the template file that it references.
  159. #
  160. # For a more advanced customization, you can extend the default (see `matrix_well_known_matrix_server_configuration_extension_json`)
  161. # or completely replace this variable with your own template.
  162. #
  163. # The side-effect of this lookup is that Ansible would even parse the JSON for us, returning a dict.
  164. # This is unlike what it does when looking up YAML template files (no automatic parsing there).
  165. matrix_well_known_matrix_server_configuration_default: "{{ lookup('template', 'templates/static-files/well-known/matrix-server.j2') }}"
  166. # Your custom JSON configuration for `/.well-known/matrix/server` should go to `matrix_well_known_matrix_server_configuration_extension_json`.
  167. # This configuration extends the default starting configuration (`matrix_well_known_matrix_server_configuration_default`).
  168. #
  169. # You can override individual variables from the default configuration, or introduce new ones.
  170. #
  171. # If you need something more special, you can take full control by
  172. # completely redefining `matrix_well_known_matrix_server_configuration`.
  173. #
  174. # Example configuration extension follows:
  175. #
  176. # matrix_well_known_matrix_server_configuration_extension_json: |
  177. # {
  178. # "something": "another"
  179. # }
  180. matrix_well_known_matrix_server_configuration_extension_json: '{}'
  181. matrix_well_known_matrix_server_configuration_extension: "{{ matrix_well_known_matrix_server_configuration_extension_json | from_json if matrix_well_known_matrix_server_configuration_extension_json | from_json is mapping else {} }}"
  182. # Holds the final `/.well-known/matrix/server` configuration (a combination of the default and its extension).
  183. # You most likely don't need to touch this variable. Instead, see `matrix_well_known_matrix_server_configuration_default` and `matrix_well_known_matrix_server_configuration_extension_json`.
  184. matrix_well_known_matrix_server_configuration: "{{ matrix_well_known_matrix_server_configuration_default | combine(matrix_well_known_matrix_server_configuration_extension, recursive=True) }}"
  185. # The side-effect of this lookup is that Ansible would even parse the JSON for us, returning a dict.
  186. # This is unlike what it does when looking up YAML template files (no automatic parsing there).
  187. matrix_well_known_matrix_support_configuration_default: "{{ lookup('template', 'templates/static-files/well-known/matrix-support.j2') }}"
  188. matrix_well_known_matrix_support_configuration_extension_json: '{}'
  189. matrix_well_known_matrix_support_configuration_extension: "{{ matrix_well_known_matrix_support_configuration_extension_json | from_json if matrix_well_known_matrix_support_configuration_extension_json | from_json is mapping else {} }}"
  190. # Holds the final `/.well-known/matrix/support` configuration (a combination of the default and its extension).
  191. # You most likely don't need to touch this variable. Instead, see `matrix_well_known_matrix_support_configuration_default` and `matrix_well_known_matrix_support_configuration_extension_json`.
  192. matrix_well_known_matrix_support_configuration: "{{ matrix_well_known_matrix_support_configuration_default | combine(matrix_well_known_matrix_support_configuration_extension, recursive=True) }}"
  193. # The Docker network that all services would be put into
  194. matrix_docker_network: "matrix"
  195. # Controls whether a `/.well-known/matrix/server` file is generated and used at all.
  196. #
  197. # If you wish to rely on DNS SRV records only, you can disable this.
  198. # Using DNS SRV records implies that you'll be handling Matrix Federation API traffic (tcp/8448)
  199. # using certificates for the base domain (`matrix_domain`) and not for the
  200. # matrix domain (`matrix_server_fqn_matrix`).
  201. matrix_well_known_matrix_server_enabled: true
  202. # Controls whether a `/.well-known/matrix/support` file is generated and used at all.
  203. #
  204. # This is not enabled by default, until the MSC gets accepted: https://github.com/matrix-org/matrix-spec-proposals/pull/1929
  205. #
  206. # See `matrix_homeserver_admin_contacts`, `matrix_homeserver_support_url`, etc.
  207. matrix_well_known_matrix_support_enabled: false
  208. matrix_homeserver_container_extra_arguments_auto: []
  209. matrix_homeserver_app_service_config_files_auto: []
  210. # Variables to Control which parts of our roles run.
  211. run_postgres_import: true
  212. run_postgres_upgrade: true
  213. run_postgres_import_sqlite_db: true
  214. run_postgres_vacuum: true
  215. run_synapse_register_user: true
  216. run_synapse_update_user_password: true
  217. run_synapse_import_media_store: true
  218. run_synapse_rust_synapse_compress_state: true
  219. run_dendrite_register_user: true
  220. run_setup: true
  221. run_self_check: true
  222. run_start: true
  223. run_stop: true