Просмотр исходного кода

change vars to new format

pull/2290/head
array-in-a-matrix 3 лет назад
committed by Slavi Pantaleev
Родитель
Сommit
76f25c67f5
2 измененных файлов: 28 добавлений и 28 удалений
  1. +10
    -10
      roles/custom/matrix-dendrite/defaults/main.yml
  2. +18
    -18
      roles/custom/matrix-dendrite/templates/dendrite/dendrite.yaml.j2

+ 10
- 10
roles/custom/matrix-dendrite/defaults/main.yml Просмотреть файл

@@ -76,7 +76,7 @@ matrix_dendrite_systemd_wanted_services_list: []
# matrix_dendrite_template_dendrite_config: "{{ playbook_dir }}/inventory/host_vars/<host>/dendrite.yaml.j2" # matrix_dendrite_template_dendrite_config: "{{ playbook_dir }}/inventory/host_vars/<host>/dendrite.yaml.j2"
matrix_dendrite_template_dendrite_config: "{{ role_path }}/templates/dendrite/dendrite.yaml.j2" matrix_dendrite_template_dendrite_config: "{{ role_path }}/templates/dendrite/dendrite.yaml.j2"


matrix_dendrite_registration_shared_secret: ''
matrix_dendrite_client_api_registration_shared_secret: ''
matrix_dendrite_allow_guest_access: false matrix_dendrite_allow_guest_access: false


matrix_dendrite_max_file_size_bytes: 10485760 matrix_dendrite_max_file_size_bytes: 10485760
@@ -89,12 +89,12 @@ matrix_dendrite_sync_api_real_ip_header: ''
matrix_dendrite_tmp_directory_size_mb: 500 matrix_dendrite_tmp_directory_size_mb: 500


# Rate limits # Rate limits
matrix_dendrite_rate_limiting_enabled: true
matrix_dendrite_rate_limiting_threshold: 20
matrix_dendrite_rate_limiting_cooloff_ms: 500
matrix_dendrite_client_api_rate_limiting_enabled: true
matrix_dendrite_client_api_rate_limiting_threshold: 20
matrix_dendrite_client_api_rate_limiting_cooloff_ms: 500


# Controls whether people with access to the homeserver can register by themselves. # Controls whether people with access to the homeserver can register by themselves.
matrix_dendrite_registration_disabled: true
matrix_dendrite_client_api_registration_disabled: true


# reCAPTCHA API for validating registration attempts # reCAPTCHA API for validating registration attempts
matrix_dendrite_client_api_enable_registration_captcha: false matrix_dendrite_client_api_enable_registration_captcha: false
@@ -137,12 +137,12 @@ matrix_dendrite_metrics_username: "metrics"
matrix_dendrite_metrics_password: "metrics" matrix_dendrite_metrics_password: "metrics"


# Postgres database information # Postgres database information
matrix_dendrite_database_str: "postgresql://{{ matrix_dendrite_database_user }}:{{ matrix_dendrite_database_password }}@{{ matrix_dendrite_database_hostname }}"
matrix_dendrite_client_api_database_str: "postgresql://{{ matrix_dendrite_database_user }}:{{ matrix_dendrite_database_password }}@{{ matrix_dendrite_database_hostname }}"
matrix_dendrite_database_hostname: "matrix-postgres" matrix_dendrite_database_hostname: "matrix-postgres"
matrix_dendrite_database_user: "dendrite" matrix_dendrite_database_user: "dendrite"
matrix_dendrite_database_password: "itsasecret" matrix_dendrite_database_password: "itsasecret"
matrix_dendrite_federationapi_database: "dendrite_federationapi"
matrix_dendrite_keyserver_database: "dendrite_keyserver"
matrix_dendrite_client_api_federationapi_database: "dendrite_federationapi"
matrix_dendrite_client_api_keyserver_database: "dendrite_keyserver"
matrix_dendrite_mediaapi_database: "dendrite_mediaapi" matrix_dendrite_mediaapi_database: "dendrite_mediaapi"
matrix_dendrite_room_database: "dendrite_room" matrix_dendrite_room_database: "dendrite_room"
matrix_dendrite_syncapi_database: "dendrite_syncapi" matrix_dendrite_syncapi_database: "dendrite_syncapi"
@@ -151,11 +151,11 @@ matrix_dendrite_pushserver_database: "dendrite_pushserver"
matrix_dendrite_mscs_database: "dendrite_mscs" matrix_dendrite_mscs_database: "dendrite_mscs"


matrix_dendrite_turn_uris: [] matrix_dendrite_turn_uris: []
matrix_dendrite_turn_shared_secret: ""
matrix_dendrite_turn_client_api_shared_secret: ""
matrix_dendrite_turn_allow_guests: false matrix_dendrite_turn_allow_guests: false


# Controls whether the self-check feature should validate TLS certificates. # Controls whether the self-check feature should validate TLS certificates.
matrix_dendrite_disable_tls_validation: false
matrix_dendrite_client_api_disable_tls_validation: false


matrix_dendrite_trusted_id_servers: matrix_dendrite_trusted_id_servers:
- "matrix.org" - "matrix.org"


+ 18
- 18
roles/custom/matrix-dendrite/templates/dendrite/dendrite.yaml.j2 Просмотреть файл

@@ -160,7 +160,7 @@ app_service_api:
# Disable the validation of TLS certificates of appservices. This is # Disable the validation of TLS certificates of appservices. This is
# not recommended in production since it may allow appservice traffic # not recommended in production since it may allow appservice traffic
# to be sent to an unverified endpoint. # to be sent to an unverified endpoint.
disable_tls_validation: {{ matrix_dendrite_disable_tls_validation|to_json }}
disable_tls_validation: {{ matrix_dendrite_client_api_disable_tls_validation|to_json }}


# Appservice configuration files to load into this homeserver. # Appservice configuration files to load into this homeserver.
config_files: {{ matrix_dendrite_app_service_config_files_final|to_json }} config_files: {{ matrix_dendrite_app_service_config_files_final|to_json }}
@@ -175,7 +175,7 @@ client_api:


# Prevents new users from being able to register on this homeserver, except when # Prevents new users from being able to register on this homeserver, except when
# using the registration shared secret below. # using the registration shared secret below.
registration_disabled: {{ matrix_dendrite_registration_disabled|to_json }}
registration_disabled: {{ matrix_dendrite_client_api_registration_disabled|to_json }}


# Prevents new guest accounts from being created. Guest registration is also # Prevents new guest accounts from being created. Guest registration is also
# disabled implicitly by setting 'registration_disabled' above. # disabled implicitly by setting 'registration_disabled' above.
@@ -183,10 +183,10 @@ client_api:


# If set, allows registration by anyone who knows the shared secret, regardless of # If set, allows registration by anyone who knows the shared secret, regardless of
# whether registration is otherwise disabled. # whether registration is otherwise disabled.
registration_shared_secret: {{ matrix_dendrite_registration_shared_secret | string|to_json }}
registration_shared_secret: {{ matrix_dendrite_client_api_registration_shared_secret | string|to_json }}


# Whether to require reCAPTCHA for registration. # Whether to require reCAPTCHA for registration.
enable_registration_captcha: {{ matrix_dendrite_enable_registration_captcha|to_json }}
enable_registration_captcha: {{ matrix_dendrite_client_api_enable_registration_captcha|to_json }}


# Settings for ReCAPTCHA. # Settings for ReCAPTCHA.
recaptcha_public_key: {{ matrix_dendrite_client_api_recaptcha_public_key|to_json }} recaptcha_public_key: {{ matrix_dendrite_client_api_recaptcha_public_key|to_json }}
@@ -200,8 +200,8 @@ client_api:
# TURN server information that this homeserver should send to clients. # TURN server information that this homeserver should send to clients.
turn: turn:
turn_user_lifetime: "" turn_user_lifetime: ""
turn_uris: {{ matrix_dendrite_turn_uris|to_json }}
turn_shared_secret: {{ matrix_dendrite_turn_shared_secret|to_json }}
turn_uris: {{ matrix_dendrite_client_api_turn_uris|to_json }}
turn_shared_secret: {{ matrix_dendrite_client_api_turn_shared_secret|to_json }}
turn_username: "" turn_username: ""
turn_password: "" turn_password: ""


@@ -209,9 +209,9 @@ client_api:
# threshold number of "slots" have been taken by requests from a specific # threshold number of "slots" have been taken by requests from a specific
# host. Each "slot" will be released after the cooloff time in milliseconds. # host. Each "slot" will be released after the cooloff time in milliseconds.
rate_limiting: rate_limiting:
enabled: {{ matrix_dendrite_rate_limiting_enabled|to_json }}
threshold: {{ matrix_dendrite_rate_limiting_threshold|to_json }}
cooloff_ms: {{ matrix_dendrite_rate_limiting_cooloff_ms|to_json }}
enabled: {{ matrix_dendrite_client_api_rate_limiting_enabled|to_json }}
threshold: {{ matrix_dendrite_client_api_rate_limiting_threshold|to_json }}
cooloff_ms: {{ matrix_dendrite_client_api_rate_limiting_cooloff_ms|to_json }}
exempt_user_ids: exempt_user_ids:
# - "@user:domain.com" # - "@user:domain.com"


@@ -223,7 +223,7 @@ federation_api:
external_api: external_api:
listen: http://0.0.0.0:8072 listen: http://0.0.0.0:8072
database: database:
connection_string: {{ matrix_dendrite_database_str }}/{{ matrix_dendrite_federationapi_database }}?sslmode=disable
connection_string: {{ matrix_dendrite_client_api_database_str }}/{{ matrix_dendrite_client_api_federationapi_database }}?sslmode=disable
max_open_conns: 10 max_open_conns: 10
max_idle_conns: 2 max_idle_conns: 2
conn_max_lifetime: -1 conn_max_lifetime: -1
@@ -234,7 +234,7 @@ federation_api:


# Disable the validation of TLS certificates of remote federated homeservers. Do not # Disable the validation of TLS certificates of remote federated homeservers. Do not
# enable this option in production as it presents a security risk! # enable this option in production as it presents a security risk!
disable_tls_validation: {{ matrix_dendrite_disable_tls_validation|to_json }}
disable_tls_validation: {{ matrix_dendrite_client_api_disable_tls_validation|to_json }}


# Not in dendrite-config.yaml, but is in build/docker/config/dendrite.yaml # Not in dendrite-config.yaml, but is in build/docker/config/dendrite.yaml
# Use the following proxy server for outbound federation traffic. # Use the following proxy server for outbound federation traffic.
@@ -266,7 +266,7 @@ key_server:
listen: http://0.0.0.0:7779 listen: http://0.0.0.0:7779
connect: http://key_server:7779 connect: http://key_server:7779
database: database:
connection_string: {{ matrix_dendrite_database_str }}/{{ matrix_dendrite_keyserver_database }}?sslmode=disable
connection_string: {{ matrix_dendrite_client_api_database_str }}/{{ matrix_dendrite_client_api_keyserver_database }}?sslmode=disable
max_open_conns: 10 max_open_conns: 10
max_idle_conns: 2 max_idle_conns: 2
conn_max_lifetime: -1 conn_max_lifetime: -1
@@ -279,7 +279,7 @@ media_api:
external_api: external_api:
listen: http://0.0.0.0:8074 listen: http://0.0.0.0:8074
database: database:
connection_string: {{ matrix_dendrite_database_str }}/{{ matrix_dendrite_mediaapi_database }}?sslmode=disable
connection_string: {{ matrix_dendrite_client_api_database_str }}/{{ matrix_dendrite_mediaapi_database }}?sslmode=disable
max_open_conns: 10 max_open_conns: 10
max_idle_conns: 2 max_idle_conns: 2
conn_max_lifetime: -1 conn_max_lifetime: -1
@@ -318,7 +318,7 @@ mscs:
# - msc2946 (Spaces Summary, see https://github.com/matrix-org/matrix-doc/pull/2946) # - msc2946 (Spaces Summary, see https://github.com/matrix-org/matrix-doc/pull/2946)
mscs: [] mscs: []
database: database:
connection_string: {{ matrix_dendrite_database_str }}/{{ matrix_dendrite_mscs_database }}?sslmode=disable
connection_string: {{ matrix_dendrite_client_api_database_str }}/{{ matrix_dendrite_mscs_database }}?sslmode=disable
max_open_conns: 5 max_open_conns: 5
max_idle_conns: 2 max_idle_conns: 2
conn_max_lifetime: -1 conn_max_lifetime: -1
@@ -329,7 +329,7 @@ room_server:
listen: http://0.0.0.0:7770 listen: http://0.0.0.0:7770
connect: http://room_server:7770 connect: http://room_server:7770
database: database:
connection_string: {{ matrix_dendrite_database_str }}/{{ matrix_dendrite_room_database }}?sslmode=disable
connection_string: {{ matrix_dendrite_client_api_database_str }}/{{ matrix_dendrite_room_database }}?sslmode=disable
max_open_conns: 10 max_open_conns: 10
max_idle_conns: 2 max_idle_conns: 2
conn_max_lifetime: -1 conn_max_lifetime: -1
@@ -342,7 +342,7 @@ sync_api:
external_api: external_api:
listen: http://0.0.0.0:8073 listen: http://0.0.0.0:8073
database: database:
connection_string: {{ matrix_dendrite_database_str }}/{{ matrix_dendrite_syncapi_database }}?sslmode=disable
connection_string: {{ matrix_dendrite_client_api_database_str }}/{{ matrix_dendrite_syncapi_database }}?sslmode=disable
max_open_conns: 10 max_open_conns: 10
max_idle_conns: 2 max_idle_conns: 2
conn_max_lifetime: -1 conn_max_lifetime: -1
@@ -376,7 +376,7 @@ user_api:
listen: http://0.0.0.0:7781 listen: http://0.0.0.0:7781
connect: http://user_api:7781 connect: http://user_api:7781
account_database: account_database:
connection_string: {{ matrix_dendrite_database_str }}/{{ matrix_dendrite_userapi_database }}?sslmode=disable
connection_string: {{ matrix_dendrite_client_api_database_str }}/{{ matrix_dendrite_userapi_database }}?sslmode=disable
max_open_conns: 10 max_open_conns: 10
max_idle_conns: 2 max_idle_conns: 2
conn_max_lifetime: -1 conn_max_lifetime: -1
@@ -394,7 +394,7 @@ push_server:
listen: http://localhost:7782 listen: http://localhost:7782
connect: http://localhost:7782 connect: http://localhost:7782
database: database:
connection_string: {{ matrix_dendrite_database_str }}/{{ matrix_dendrite_pushserver_database }}?sslmode=disable
connection_string: {{ matrix_dendrite_client_api_database_str }}/{{ matrix_dendrite_pushserver_database }}?sslmode=disable
max_open_conns: 10 max_open_conns: 10
max_idle_conns: 2 max_idle_conns: 2
conn_max_lifetime: -1 conn_max_lifetime: -1


Загрузка…
Отмена
Сохранить