Matrix Docker Ansible eploy
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.
 
 

237 rader
15 KiB

  1. ---
  2. # ma1sd is a Federated Matrix Identity Server
  3. # Project source code URL: https://github.com/ma1uta/ma1sd
  4. matrix_ma1sd_enabled: true
  5. matrix_ma1sd_scheme: https
  6. matrix_ma1sd_hostname: ''
  7. matrix_ma1sd_container_image_self_build: false
  8. matrix_ma1sd_container_image_self_build_repo: "https://github.com/ma1uta/ma1sd.git"
  9. matrix_ma1sd_container_image_self_build_branch: "{{ matrix_ma1sd_version }}"
  10. # renovate: datasource=docker depName=ma1uta/ma1sd
  11. matrix_ma1sd_version: "2.5.0"
  12. matrix_ma1sd_docker_image: "{{ matrix_ma1sd_docker_image_registry_prefix }}ma1uta/ma1sd:{{ matrix_ma1sd_version }}"
  13. matrix_ma1sd_docker_image_registry_prefix: "{{ 'localhost/' if matrix_ma1sd_container_image_self_build else matrix_ma1sd_docker_image_registry_prefix_upstream }}"
  14. matrix_ma1sd_docker_image_registry_prefix_upstream: "{{ matrix_ma1sd_docker_image_registry_prefix_upstream_default }}"
  15. matrix_ma1sd_docker_image_registry_prefix_upstream_default: "docker.io/"
  16. matrix_ma1sd_docker_image_force_pull: "{{ matrix_ma1sd_docker_image.endswith(':latest') }}"
  17. matrix_ma1sd_base_path: "{{ matrix_base_data_path }}/ma1sd"
  18. # We need the docker src directory to be named ma1sd. See: https://github.com/spantaleev/matrix-docker-ansible-deploy/pull/588
  19. matrix_ma1sd_docker_src_files_path: "{{ matrix_ma1sd_base_path }}/docker-src/ma1sd"
  20. matrix_ma1sd_config_path: "{{ matrix_ma1sd_base_path }}/config"
  21. matrix_ma1sd_data_path: "{{ matrix_ma1sd_base_path }}/data"
  22. matrix_ma1sd_container_port: 8090
  23. # Controls whether the matrix-ma1sd container exposes its HTTP port (tcp/{{ matrix_ma1sd_container_port }} in the container).
  24. #
  25. # Takes an "<ip>:<port>" or "<port>" value (e.g. "127.0.0.1:8090"), or empty string to not expose.
  26. matrix_ma1sd_container_http_host_bind_port: ''
  27. # A list of extra arguments to pass to the container
  28. matrix_ma1sd_container_extra_arguments: []
  29. # List of systemd services that matrix-ma1sd.service depends on
  30. matrix_ma1sd_systemd_required_services_list: "{{ matrix_ma1sd_systemd_required_services_list_default + matrix_ma1sd_systemd_required_services_list_auto + matrix_ma1sd_systemd_required_services_list_custom }}"
  31. matrix_ma1sd_systemd_required_services_list_default: "{{ [devture_systemd_docker_base_docker_service_name] if devture_systemd_docker_base_docker_service_name else [] }}"
  32. matrix_ma1sd_systemd_required_services_list_auto: []
  33. matrix_ma1sd_systemd_required_services_list_custom: []
  34. # List of systemd services that matrix-ma1sd.service wants
  35. matrix_ma1sd_systemd_wanted_services_list: "{{ matrix_ma1sd_systemd_wanted_services_list_default + matrix_ma1sd_systemd_wanted_services_list_auto + matrix_ma1sd_systemd_wanted_services_list_custom }}"
  36. matrix_ma1sd_systemd_wanted_services_list_default: []
  37. matrix_ma1sd_systemd_wanted_services_list_auto: []
  38. matrix_ma1sd_systemd_wanted_services_list_custom: []
  39. # The base container network. It will be auto-created by this role if it doesn't exist already.
  40. matrix_ma1sd_container_network: ""
  41. # A list of additional container networks that matrix-ma1sd would be connected to.
  42. # The playbook does not create these networks, so make sure they already exist.
  43. #
  44. # Use this to expose matrix-ma1sd to another docker network, that matrix-ma1sd might have to reach for authentication (e.g. an ldap instance)
  45. matrix_ma1sd_container_additional_networks: "{{ matrix_ma1sd_container_additional_networks_auto + matrix_ma1sd_container_additional_networks_custom }}"
  46. matrix_ma1sd_container_additional_networks_auto: []
  47. matrix_ma1sd_container_additional_networks_custom: []
  48. # matrix_ma1sd_container_labels_traefik_enabled controls whether labels to assist a Traefik reverse-proxy will be attached to the container.
  49. # See `../templates/labels.j2` for details.
  50. #
  51. # To inject your own other container labels, see `matrix_ma1sd_container_labels_additional_labels`.
  52. matrix_ma1sd_container_labels_traefik_enabled: true
  53. matrix_ma1sd_container_labels_traefik_docker_network: "{{ matrix_ma1sd_container_network }}"
  54. matrix_ma1sd_container_labels_traefik_entrypoints: web-secure
  55. matrix_ma1sd_container_labels_traefik_tls_certResolver: default # noqa var-naming
  56. # Controls whether labels will be added that expose ma1sd's /_matrix/identity endpoints
  57. matrix_ma1sd_container_labels_matrix_identity_enabled: "{{ matrix_ma1sd_container_labels_traefik_enabled }}"
  58. matrix_ma1sd_container_labels_matrix_identity_hostname: "{{ matrix_ma1sd_hostname }}"
  59. matrix_ma1sd_container_labels_matrix_identity_path_prefix: "/_matrix/identity"
  60. matrix_ma1sd_container_labels_matrix_identity_traefik_rule: "Host(`{{ matrix_ma1sd_container_labels_matrix_identity_hostname }}`) && PathPrefix(`{{ matrix_ma1sd_container_labels_matrix_identity_path_prefix }}`)"
  61. matrix_ma1sd_container_labels_matrix_identity_traefik_priority: 0
  62. matrix_ma1sd_container_labels_matrix_identity_traefik_entrypoints: "{{ matrix_ma1sd_container_labels_traefik_entrypoints }}"
  63. matrix_ma1sd_container_labels_matrix_identity_traefik_tls: "{{ matrix_ma1sd_container_labels_matrix_identity_traefik_entrypoints != 'web' }}"
  64. matrix_ma1sd_container_labels_matrix_identity_traefik_tls_certResolver: "{{ matrix_ma1sd_container_labels_traefik_tls_certResolver }}" # noqa var-naming
  65. # Controls whether labels will be added that expose ma1sd's /_matrix/client/VERSION/user_directory/search endpoint
  66. matrix_ma1sd_container_labels_matrix_client_user_directory_search_enabled: "{{ matrix_ma1sd_container_labels_traefik_enabled }}"
  67. matrix_ma1sd_container_labels_matrix_client_user_directory_search_hostname: "{{ matrix_ma1sd_hostname }}"
  68. matrix_ma1sd_container_labels_matrix_client_user_directory_search_path_regexp: "/_matrix/client/(?P<version>(r0|v3))/user_directory/search"
  69. matrix_ma1sd_container_labels_matrix_client_user_directory_search_traefik_rule: "Host(`{{ matrix_ma1sd_container_labels_matrix_client_user_directory_search_hostname }}`) && PathRegexp(`{{ matrix_ma1sd_container_labels_matrix_client_user_directory_search_path_regexp }}`)"
  70. matrix_ma1sd_container_labels_matrix_client_user_directory_search_traefik_priority: 0
  71. matrix_ma1sd_container_labels_matrix_client_user_directory_search_traefik_entrypoints: "{{ matrix_ma1sd_container_labels_traefik_entrypoints }}"
  72. matrix_ma1sd_container_labels_matrix_client_user_directory_search_traefik_tls: "{{ matrix_ma1sd_container_labels_matrix_client_user_directory_search_traefik_entrypoints != 'web' }}"
  73. matrix_ma1sd_container_labels_matrix_client_user_directory_search_traefik_tls_certResolver: "{{ matrix_ma1sd_container_labels_traefik_tls_certResolver }}" # noqa var-naming
  74. # Controls whether labels will be added that expose ma1sd's /_matrix/client/VERSION/register/TYPE/requestToken endpoints
  75. # This allows another service to control registrations involving 3PIDs.
  76. # To learn more, see: https://github.com/ma1uta/ma1sd/blob/master/docs/features/registration.md
  77. matrix_ma1sd_container_labels_matrix_client_3pid_registration_enabled: false
  78. matrix_ma1sd_container_labels_matrix_client_3pid_registration_hostname: "{{ matrix_ma1sd_hostname }}"
  79. matrix_ma1sd_container_labels_matrix_client_3pid_registration_path_regexp: "/_matrix/client/(?P<version>(r0|v3))/register/(?P<type>(email|msisdn))/requestToken"
  80. matrix_ma1sd_container_labels_matrix_client_3pid_registration_traefik_rule: "Host(`{{ matrix_ma1sd_container_labels_matrix_client_3pid_registration_hostname }}`) && PathRegexp(`{{ matrix_ma1sd_container_labels_matrix_client_3pid_registration_path_regexp }}`)"
  81. matrix_ma1sd_container_labels_matrix_client_3pid_registration_traefik_priority: 0
  82. matrix_ma1sd_container_labels_matrix_client_3pid_registration_traefik_entrypoints: "{{ matrix_ma1sd_container_labels_traefik_entrypoints }}"
  83. matrix_ma1sd_container_labels_matrix_client_3pid_registration_traefik_tls: "{{ matrix_ma1sd_container_labels_matrix_client_3pid_registration_traefik_entrypoints != 'web' }}"
  84. matrix_ma1sd_container_labels_matrix_client_3pid_registration_traefik_tls_certResolver: "{{ matrix_ma1sd_container_labels_traefik_tls_certResolver }}" # noqa var-naming
  85. # matrix_ma1sd_container_labels_additional_labels contains a multiline string with additional labels to add to the container label file.
  86. # See `../templates/labels.j2` for details.
  87. #
  88. # Example:
  89. # matrix_ma1sd_container_labels_additional_labels: |
  90. # my.label=1
  91. # another.label="here"
  92. matrix_ma1sd_container_labels_additional_labels: ''
  93. # Your identity server is private by default.
  94. # To ensure maximum discovery, you can make your identity server
  95. # also forward lookups to the central matrix.org Identity server
  96. # (at the cost of potentially leaking all your contacts information).
  97. # Enabling this is discouraged. Learn more here: https://github.com/ma1uta/ma1sd/blob/master/docs/features/identity.md#lookups
  98. matrix_ma1sd_matrixorg_forwarding_enabled: false
  99. # Database-related configuration fields.
  100. #
  101. # To use SQLite, stick to these defaults.
  102. #
  103. # To use Postgres:
  104. # - change the engine (`matrix_ma1sd_database_engine: 'postgres'`)
  105. # - adjust your database credentials via the `matrix_ma1sd_database_*` variables
  106. matrix_ma1sd_database_engine: 'sqlite'
  107. matrix_ma1sd_sqlite_database_path_local: "{{ matrix_ma1sd_data_path }}/ma1sd.db"
  108. matrix_ma1sd_sqlite_database_path_in_container: "/var/ma1sd/ma1sd.db"
  109. matrix_ma1sd_database_username: 'matrix_ma1sd'
  110. matrix_ma1sd_database_password: 'some-password'
  111. matrix_ma1sd_database_hostname: ''
  112. matrix_ma1sd_database_port: 5432
  113. matrix_ma1sd_database_name: 'matrix_ma1sd'
  114. matrix_ma1sd_database_connection_string: 'postgresql://{{ matrix_ma1sd_database_username }}:{{ matrix_ma1sd_database_password }}@{{ matrix_ma1sd_database_hostname }}:{{ matrix_ma1sd_database_port }}/{{ matrix_ma1sd_database_name }}'
  115. # ma1sd has serveral supported identity stores.
  116. # One of them is storing identities directly in Synapse's database.
  117. # Learn more here: https://github.com/ma1uta/ma1sd/blob/master/docs/stores/synapse.md
  118. matrix_ma1sd_synapsesql_enabled: false
  119. matrix_ma1sd_synapsesql_type: ""
  120. matrix_ma1sd_synapsesql_connection: ""
  121. # Setting up email-sending settings is required for using ma1sd.
  122. matrix_ma1sd_threepid_medium_email_identity_from: "matrix@{{ matrix_domain }}"
  123. matrix_ma1sd_threepid_medium_email_connectors_smtp_host: ""
  124. matrix_ma1sd_threepid_medium_email_connectors_smtp_port: 587
  125. matrix_ma1sd_threepid_medium_email_connectors_smtp_tls: 1
  126. matrix_ma1sd_threepid_medium_email_connectors_smtp_login: ""
  127. matrix_ma1sd_threepid_medium_email_connectors_smtp_password: ""
  128. # DNS overwrites are useful for telling ma1sd how it can reach the homeserver directly.
  129. # Useful when reverse-proxying certain URLs (e.g. `/_matrix/client/r0/user_directory/search`) to ma1sd,
  130. # so that ma1sd can rewrite the original URL to one that would reach the homeserver.
  131. matrix_ma1sd_dns_overwrite_enabled: false
  132. matrix_ma1sd_dns_overwrite_homeserver_client_name: "{{ matrix_server_fqn_matrix }}"
  133. matrix_ma1sd_dns_overwrite_homeserver_client_value: ""
  134. # Override the default session templates
  135. # To use this, fill in the template variables with the full desired template as a multi-line YAML variable
  136. #
  137. # More info:
  138. # https://github.com/ma1uta/ma1sd/blob/master/docs/threepids/session/session-views.md
  139. matrix_ma1sd_view_session_custom_templates_enabled: false
  140. # Defaults to: https://github.com/ma1uta/ma1sd/blob/master/src/main/resources/templates/session/tokenSubmitSuccess.html
  141. matrix_ma1sd_view_session_custom_onTokenSubmit_success_template: "" # noqa var-naming
  142. # Defaults to: https://github.com/ma1uta/ma1sd/blob/master/src/main/resources/templates/session/tokenSubmitFailure.html
  143. matrix_ma1sd_view_session_custom_onTokenSubmit_failure_template: "" # noqa var-naming
  144. # Override the default email templates
  145. # To use this, fill in the template variables with the full desired template as a multi-line YAML variable
  146. #
  147. # More info:
  148. # https://github.com/ma1uta/ma1sd/blob/master/docs/threepids/notification/template-generator.md
  149. # https://github.com/ma1uta/ma1sd/tree/master/src/main/resources/threepids/email
  150. matrix_ma1sd_threepid_medium_email_custom_templates_enabled: false
  151. # Defaults to: https://github.com/ma1uta/ma1sd/blob/master/src/main/resources/threepids/email/invite-template.eml
  152. matrix_ma1sd_threepid_medium_email_custom_invite_template: ""
  153. # Defaults to: https://github.com/ma1uta/ma1sd/blob/master/src/main/resources/threepids/email/validate-template.eml
  154. matrix_ma1sd_threepid_medium_email_custom_session_validation_template: ""
  155. # Defaults to: https://github.com/ma1uta/ma1sd/blob/master/src/main/resources/threepids/email/unbind-notification.eml
  156. matrix_ma1sd_threepid_medium_email_custom_session_unbind_notification_template: ""
  157. # Defaults to: https://github.com/ma1uta/ma1sd/blob/master/src/main/resources/threepids/email/mxid-template.eml
  158. matrix_ma1sd_threepid_medium_email_custom_matrixid_template: ""
  159. matrix_ma1sd_self_check_endpoint_url: "{{ matrix_ma1sd_scheme }}://{{ matrix_ma1sd_hostname }}/_matrix/identity/api/v1"
  160. # Controls whether the self-check feature should validate SSL certificates.
  161. matrix_ma1sd_self_check_validate_certificates: true
  162. # Controls ma1sd logging verbosity for troubleshooting.
  163. #
  164. # See: https://github.com/ma1uta/ma1sd/blob/master/docs/troubleshooting.md#increase-verbosity
  165. matrix_ma1sd_verbose_logging: false
  166. # Setting up support for API prefixes
  167. matrix_ma1sd_v1_enabled: true
  168. matrix_ma1sd_v2_enabled: true
  169. # Fix for missing 3PIDS bug
  170. matrix_ma1sd_hashing_enabled: true
  171. # Default ma1sd configuration template which covers the generic use case.
  172. # You can customize it by controlling the various variables inside it.
  173. #
  174. # For a more advanced customization, you can extend the default (see `matrix_ma1sd_configuration_extension_yaml`)
  175. # or completely replace this variable with your own template.
  176. matrix_ma1sd_configuration_yaml: "{{ lookup('template', 'templates/ma1sd.yaml.j2') }}"
  177. matrix_ma1sd_configuration_extension_yaml: |
  178. # Your custom YAML configuration for ma1sd goes here.
  179. # This configuration extends the default starting configuration (`matrix_ma1sd_configuration_yaml`).
  180. #
  181. # You can override individual variables from the default configuration, or introduce new ones.
  182. #
  183. # If you need something more special, you can take full control by
  184. # completely redefining `matrix_ma1sd_configuration_yaml`.
  185. #
  186. # Example configuration extension follows:
  187. #
  188. # ldap:
  189. # enabled: true
  190. # connection:
  191. # host: ldapHostnameOrIp
  192. # tls: false
  193. # port: 389
  194. # baseDNs: ['OU=Users,DC=example,DC=org']
  195. # bindDn: CN=My Ma1sd User,OU=Users,DC=example,DC=org
  196. # bindPassword: TheUserPassword
  197. matrix_ma1sd_configuration_extension: "{{ matrix_ma1sd_configuration_extension_yaml | from_yaml if matrix_ma1sd_configuration_extension_yaml | from_yaml is mapping else {} }}"
  198. # Holds the final ma1sd configuration (a combination of the default and its extension).
  199. # You most likely don't need to touch this variable. Instead, see `matrix_ma1sd_configuration_yaml`.
  200. matrix_ma1sd_configuration: "{{ matrix_ma1sd_configuration_yaml | from_yaml | combine(matrix_ma1sd_configuration_extension, recursive=True) }}"