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.
 
 

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