More ansible-lint fixes
This commit is contained in:
@ -523,7 +523,7 @@ matrix_synapse_ext_password_provider_shared_secret_auth_m_login_password_support
|
||||
matrix_synapse_ext_password_provider_shared_secret_auth_com_devture_shared_secret_auth_support_enabled: false
|
||||
matrix_synapse_ext_password_provider_shared_secret_config: "{{ matrix_synapse_ext_password_provider_shared_secret_config_yaml | from_yaml }}"
|
||||
matrix_synapse_ext_password_provider_shared_secret_config_yaml: |
|
||||
shared_secret: {{ matrix_synapse_ext_password_provider_shared_secret_auth_shared_secret|string | to_json }}
|
||||
shared_secret: {{ matrix_synapse_ext_password_provider_shared_secret_auth_shared_secret | string | to_json }}
|
||||
m_login_password_support_enabled: {{ matrix_synapse_ext_password_provider_shared_secret_auth_m_login_password_support_enabled | to_json }}
|
||||
com_devture_shared_secret_auth_support_enabled: {{ matrix_synapse_ext_password_provider_shared_secret_auth_com_devture_shared_secret_auth_support_enabled | to_json }}
|
||||
|
||||
@ -682,4 +682,4 @@ matrix_synapse_configuration_extension: "{{ matrix_synapse_configuration_extensi
|
||||
|
||||
# Holds the final Synapse configuration (a combination of the default and its extension).
|
||||
# You most likely don't need to touch this variable. Instead, see `matrix_synapse_configuration_yaml`.
|
||||
matrix_synapse_configuration: "{{ matrix_synapse_configuration_yaml | from_yaml|combine(matrix_synapse_configuration_extension, recursive=True) }}"
|
||||
matrix_synapse_configuration: "{{ matrix_synapse_configuration_yaml | from_yaml | combine(matrix_synapse_configuration_extension, recursive=True) }}"
|
||||
|
@ -29,3 +29,5 @@
|
||||
|
||||
- name: Register user
|
||||
ansible.builtin.command: "{{ matrix_local_bin_path }}/matrix-synapse-register-user {{ username|quote }} {{ password|quote }} {{ '1' if admin == 'yes' else '0' }}"
|
||||
register: matrix_synapse_register_user_result
|
||||
changed_when: matrix_synapse_register_user_result.rc == 0
|
||||
|
@ -21,6 +21,7 @@
|
||||
async: "{{ matrix_synapse_rust_synapse_compress_state_compress_room_time }}"
|
||||
poll: 10
|
||||
register: matrix_synapse_rust_synapse_compress_state_compress_room_command_result
|
||||
changed_when: matrix_synapse_rust_synapse_compress_state_compress_room_command_result.rc == 0
|
||||
|
||||
- ansible.builtin.debug: var="matrix_synapse_rust_synapse_compress_state_compress_room_command_result"
|
||||
|
||||
@ -43,6 +44,7 @@
|
||||
async: "{{ matrix_synapse_rust_synapse_compress_state_psql_import_time }}"
|
||||
poll: 10
|
||||
register: matrix_synapse_rust_synapse_compress_state_psql_import_command_result
|
||||
changed_when: matrix_synapse_rust_synapse_compress_state_psql_import_command_result.rc == 0
|
||||
|
||||
- name: Clean up
|
||||
ansible.builtin.file:
|
||||
|
@ -70,6 +70,7 @@
|
||||
async: "{{ matrix_synapse_rust_synapse_compress_state_find_rooms_command_wait_time }}"
|
||||
poll: 10
|
||||
register: matrix_synapse_rust_synapse_compress_state_find_rooms_command_result
|
||||
changed_when: false
|
||||
|
||||
# We expect the output to be like this:
|
||||
#
|
||||
|
@ -32,6 +32,7 @@
|
||||
- name: Check if Synapse Docker image exists
|
||||
ansible.builtin.command: "{{ matrix_host_command_docker }} images --quiet --filter 'reference={{ matrix_synapse_docker_image }}'"
|
||||
register: matrix_synapse_docker_image_check_result
|
||||
changed_when: false
|
||||
|
||||
# Invoking the `docker build` command here, instead of calling the `docker_image` Ansible module,
|
||||
# because the latter does not support BuildKit.
|
||||
|
@ -12,7 +12,7 @@
|
||||
port: "{{ matrix_synapse_workers_generic_workers_port_range_start + item }}"
|
||||
metrics_port: "{{ matrix_synapse_workers_generic_workers_metrics_range_start + item }}"
|
||||
register: "matrix_synapse_workers_list_results_generic_workers"
|
||||
loop: "{{ range(0, matrix_synapse_workers_generic_workers_count|int) | list }}"
|
||||
loop: "{{ range(0, matrix_synapse_workers_generic_workers_count | int) | list }}"
|
||||
|
||||
- name: Build federation sender workers
|
||||
ansible.builtin.set_fact:
|
||||
@ -22,7 +22,7 @@
|
||||
port: 0
|
||||
metrics_port: "{{ matrix_synapse_workers_federation_sender_workers_metrics_range_start + item }}"
|
||||
register: "matrix_synapse_workers_list_results_federation_sender_workers"
|
||||
loop: "{{ range(0, matrix_synapse_workers_federation_sender_workers_count|int) | list }}"
|
||||
loop: "{{ range(0, matrix_synapse_workers_federation_sender_workers_count | int) | list }}"
|
||||
|
||||
# This type of worker can only have a count of 1, at most
|
||||
- name: Build pusher workers
|
||||
@ -33,7 +33,7 @@
|
||||
port: 0
|
||||
metrics_port: "{{ matrix_synapse_workers_pusher_workers_metrics_range_start + item }}"
|
||||
register: "matrix_synapse_workers_list_results_pusher_workers"
|
||||
loop: "{{ range(0, matrix_synapse_workers_pusher_workers_count|int) | list }}"
|
||||
loop: "{{ range(0, matrix_synapse_workers_pusher_workers_count | int) | list }}"
|
||||
|
||||
# This type of worker can only have a count of 1, at most
|
||||
- name: Build appservice workers
|
||||
@ -44,7 +44,7 @@
|
||||
port: 0
|
||||
metrics_port: "{{ matrix_synapse_workers_appservice_workers_metrics_range_start + item }}"
|
||||
register: "matrix_synapse_workers_list_results_appservice_workers"
|
||||
loop: "{{ range(0, matrix_synapse_workers_appservice_workers_count|int) | list }}"
|
||||
loop: "{{ range(0, matrix_synapse_workers_appservice_workers_count | int) | list }}"
|
||||
|
||||
- name: Build media_repository workers
|
||||
ansible.builtin.set_fact:
|
||||
@ -54,7 +54,7 @@
|
||||
port: "{{ matrix_synapse_workers_media_repository_workers_port_range_start + item }}"
|
||||
metrics_port: "{{ matrix_synapse_workers_media_repository_workers_metrics_range_start + item }}"
|
||||
register: "matrix_synapse_workers_list_results_media_repository_workers"
|
||||
loop: "{{ range(0, matrix_synapse_workers_media_repository_workers_count|int) | list }}"
|
||||
loop: "{{ range(0, matrix_synapse_workers_media_repository_workers_count | int) | list }}"
|
||||
|
||||
- name: Build frontend_proxy workers
|
||||
ansible.builtin.set_fact:
|
||||
@ -64,7 +64,7 @@
|
||||
port: "{{ matrix_synapse_workers_frontend_proxy_workers_port_range_start + item }}"
|
||||
metrics_port: "{{ matrix_synapse_workers_frontend_proxy_workers_metrics_range_start + item }}"
|
||||
register: "matrix_synapse_workers_list_results_frontend_proxy_workers"
|
||||
loop: "{{ range(0, matrix_synapse_workers_frontend_proxy_workers_count|int) | list }}"
|
||||
loop: "{{ range(0, matrix_synapse_workers_frontend_proxy_workers_count | int) | list }}"
|
||||
|
||||
- ansible.builtin.set_fact:
|
||||
matrix_synapse_dynamic_workers_list: "{{ matrix_synapse_dynamic_workers_list | default([]) + [item.ansible_facts.worker] }}"
|
||||
|
@ -7,7 +7,7 @@
|
||||
ansible.builtin.service:
|
||||
name: "{{ item.key }}"
|
||||
state: stopped
|
||||
with_dict: "{{ ansible_facts.services | default({})|dict2items|selectattr('key', 'match', 'matrix-synapse-worker-.+\\.service')|list|items2dict }}"
|
||||
with_dict: "{{ ansible_facts.services | default({}) | dict2items | selectattr('key', 'match', 'matrix-synapse-worker-.+\\.service') | list | items2dict }}"
|
||||
when: "item.value['status'] != 'not-found'" # see https://github.com/spantaleev/matrix-docker-ansible-deploy/issues/1461
|
||||
|
||||
- name: Find worker configs to be cleaned
|
||||
|
@ -38,6 +38,9 @@
|
||||
- name: Generate password hash
|
||||
ansible.builtin.shell: "{{ matrix_host_command_docker }} exec matrix-synapse /usr/local/bin/hash_password -c /data/homeserver.yaml -p {{ password|quote }}"
|
||||
register: password_hash
|
||||
changed_when: false
|
||||
|
||||
- name: Update user password hash
|
||||
ansible.builtin.command: "{{ matrix_local_bin_path }}/matrix-postgres-update-user-password-hash {{ username|quote }} {{ password_hash.stdout|quote }}"
|
||||
register: matrix_synapse_update_user_password_result
|
||||
changed_when: matrix_synapse_update_user_password_result.rc == 0
|
||||
|
@ -352,13 +352,13 @@ worker_app: synapse.app.homeserver
|
||||
|
||||
# thx https://oznetnerd.com/2017/04/18/jinja2-selectattr-filter/
|
||||
# reduce the main worker's offerings to core homeserver business
|
||||
{% if matrix_synapse_workers_enabled_list|selectattr('type', 'equalto', 'federation_sender')|list %}
|
||||
{% if matrix_synapse_workers_enabled_list | selectattr('type', 'equalto', 'federation_sender') | list %}
|
||||
send_federation: false
|
||||
{% endif %}
|
||||
{% if matrix_synapse_workers_enabled_list|selectattr('type', 'equalto', 'media_repository')|list %}
|
||||
{% if matrix_synapse_workers_enabled_list | selectattr('type', 'equalto', 'media_repository') | list %}
|
||||
enable_media_repo: false
|
||||
{% endif %}
|
||||
{% if matrix_synapse_workers_enabled_list|selectattr('type', 'equalto', 'pusher')|list %}
|
||||
{% if matrix_synapse_workers_enabled_list | selectattr('type', 'equalto', 'pusher') | list %}
|
||||
start_pushers: false
|
||||
{% endif %}
|
||||
|
||||
@ -870,8 +870,8 @@ database:
|
||||
name: "psycopg2"
|
||||
txn_limit: {{ matrix_synapse_database_txn_limit }}
|
||||
args:
|
||||
user: {{ matrix_synapse_database_user|string|to_json }}
|
||||
password: {{ matrix_synapse_database_password|string|to_json }}
|
||||
user: {{ matrix_synapse_database_user | string|to_json }}
|
||||
password: {{ matrix_synapse_database_password | string|to_json }}
|
||||
database: "{{ matrix_synapse_database_database }}"
|
||||
host: "{{ matrix_synapse_database_host }}"
|
||||
port: {{ matrix_synapse_database_port }}
|
||||
@ -1256,7 +1256,7 @@ turn_uris: {{ matrix_synapse_turn_uris|to_json }}
|
||||
|
||||
# The shared secret used to compute passwords for the TURN server
|
||||
#
|
||||
turn_shared_secret: {{ matrix_synapse_turn_shared_secret|string|to_json }}
|
||||
turn_shared_secret: {{ matrix_synapse_turn_shared_secret | string|to_json }}
|
||||
|
||||
# The Username and password if the TURN server needs them and
|
||||
# does not use a token
|
||||
@ -1393,7 +1393,7 @@ registration_requires_token: {{ matrix_synapse_registration_requires_token|to_js
|
||||
# If set, allows registration of standard or admin accounts by anyone who
|
||||
# has the shared secret, even if registration is otherwise disabled.
|
||||
#
|
||||
registration_shared_secret: {{ matrix_synapse_registration_shared_secret|string|to_json }}
|
||||
registration_shared_secret: {{ matrix_synapse_registration_shared_secret | string|to_json }}
|
||||
|
||||
# Set the number of bcrypt rounds used to generate password hash.
|
||||
# Larger numbers increase the work factor needed to generate the hash.
|
||||
@ -1657,13 +1657,13 @@ app_service_config_files: {{ matrix_synapse_app_service_config_files|to_json }}
|
||||
# the registration_shared_secret is used, if one is given; otherwise,
|
||||
# a secret key is derived from the signing key.
|
||||
#
|
||||
macaroon_secret_key: {{ matrix_synapse_macaroon_secret_key|string|to_json }}
|
||||
macaroon_secret_key: {{ matrix_synapse_macaroon_secret_key | string|to_json }}
|
||||
|
||||
# a secret which is used to calculate HMACs for form values, to stop
|
||||
# falsification of values. Must be specified for the User Consent
|
||||
# forms to work.
|
||||
#
|
||||
form_secret: {{ matrix_synapse_form_secret|string|to_json }}
|
||||
form_secret: {{ matrix_synapse_form_secret | string|to_json }}
|
||||
|
||||
## Signing Keys ##
|
||||
|
||||
@ -2263,7 +2263,7 @@ password_config:
|
||||
# Uncomment and change to a secret random string for extra security.
|
||||
# DO NOT CHANGE THIS AFTER INITIAL SETUP!
|
||||
#
|
||||
pepper: {{ matrix_synapse_password_config_pepper|string|to_json }}
|
||||
pepper: {{ matrix_synapse_password_config_pepper | string|to_json }}
|
||||
|
||||
# Define and enforce a password policy. Each parameter is optional.
|
||||
# This is an implementation of MSC2000.
|
||||
@ -2330,7 +2330,7 @@ email:
|
||||
# The hostname of the outgoing SMTP server to use. Defaults to 'localhost'.
|
||||
#
|
||||
#smtp_host: mail.server
|
||||
smtp_host: {{ matrix_synapse_email_smtp_host|string|to_json }}
|
||||
smtp_host: {{ matrix_synapse_email_smtp_host | string|to_json }}
|
||||
|
||||
# The port on the mail server for outgoing SMTP. Defaults to 25.
|
||||
#
|
||||
@ -2340,8 +2340,8 @@ email:
|
||||
# Username/password for authentication to the SMTP server. By default, no
|
||||
# authentication is attempted.
|
||||
{% if matrix_synapse_email_smtp_user %}
|
||||
smtp_user: {{ matrix_synapse_email_smtp_user|string|to_json }}
|
||||
smtp_pass: {{ matrix_synapse_email_smtp_pass|string|to_json }}
|
||||
smtp_user: {{ matrix_synapse_email_smtp_user | string|to_json }}
|
||||
smtp_pass: {{ matrix_synapse_email_smtp_pass | string|to_json }}
|
||||
{% endif %}
|
||||
|
||||
# Uncomment the following to require TLS transport security for SMTP.
|
||||
@ -2371,7 +2371,7 @@ email:
|
||||
# trailing 's'.
|
||||
#
|
||||
#notif_from: "Your Friendly %(app)s homeserver <noreply@example.com>"
|
||||
notif_from: {{ matrix_synapse_email_notif_from|string|to_json }}
|
||||
notif_from: {{ matrix_synapse_email_notif_from | string|to_json }}
|
||||
|
||||
# app_name defines the default value for '%(app)s' in notif_from and email
|
||||
# subjects. It defaults to 'Matrix'.
|
||||
@ -2398,7 +2398,7 @@ email:
|
||||
# supported for backwards-compatibility but is now deprecated.)
|
||||
#
|
||||
#client_base_url: "http://localhost/riot"
|
||||
client_base_url: {{ matrix_synapse_email_client_base_url|string|to_json }}
|
||||
client_base_url: {{ matrix_synapse_email_client_base_url | string|to_json }}
|
||||
|
||||
# Configure the time that a validation email will expire after sending.
|
||||
# Defaults to 1h.
|
||||
@ -2409,7 +2409,7 @@ email:
|
||||
# to the identity server as the org.matrix.web_client_location key. Defaults
|
||||
# to unset, giving no guidance to the identity server.
|
||||
#
|
||||
invite_client_location: {{ matrix_synapse_email_invite_client_location|string|to_json }}
|
||||
invite_client_location: {{ matrix_synapse_email_invite_client_location | string|to_json }}
|
||||
|
||||
# Subjects to use when sending emails from Synapse.
|
||||
#
|
||||
@ -2510,7 +2510,7 @@ password_providers:
|
||||
{% if matrix_synapse_ext_password_provider_rest_auth_enabled %}
|
||||
- module: "rest_auth_provider.RestAuthProvider"
|
||||
config:
|
||||
endpoint: {{ matrix_synapse_ext_password_provider_rest_auth_endpoint|string|to_json }}
|
||||
endpoint: {{ matrix_synapse_ext_password_provider_rest_auth_endpoint | string|to_json }}
|
||||
policy:
|
||||
registration:
|
||||
username:
|
||||
@ -2525,20 +2525,20 @@ password_providers:
|
||||
- module: "ldap_auth_provider.LdapAuthProvider"
|
||||
config:
|
||||
enabled: true
|
||||
uri: {{ matrix_synapse_ext_password_provider_ldap_uri|string|to_json }}
|
||||
uri: {{ matrix_synapse_ext_password_provider_ldap_uri | string|to_json }}
|
||||
start_tls: {{ matrix_synapse_ext_password_provider_ldap_start_tls|to_json }}
|
||||
base: {{ matrix_synapse_ext_password_provider_ldap_base|string|to_json }}
|
||||
base: {{ matrix_synapse_ext_password_provider_ldap_base | string|to_json }}
|
||||
active_directory: {{ matrix_synapse_ext_password_provider_ldap_active_directory|to_json }}
|
||||
default_domain: {{ matrix_synapse_ext_password_provider_ldap_default_domain|string|to_json }}
|
||||
default_domain: {{ matrix_synapse_ext_password_provider_ldap_default_domain | string|to_json }}
|
||||
attributes:
|
||||
uid: {{ matrix_synapse_ext_password_provider_ldap_attributes_uid|string|to_json }}
|
||||
mail: {{ matrix_synapse_ext_password_provider_ldap_attributes_mail|string|to_json }}
|
||||
name: {{ matrix_synapse_ext_password_provider_ldap_attributes_name|string|to_json }}
|
||||
uid: {{ matrix_synapse_ext_password_provider_ldap_attributes_uid | string|to_json }}
|
||||
mail: {{ matrix_synapse_ext_password_provider_ldap_attributes_mail | string|to_json }}
|
||||
name: {{ matrix_synapse_ext_password_provider_ldap_attributes_name | string|to_json }}
|
||||
{% if matrix_synapse_ext_password_provider_ldap_bind_dn %}
|
||||
bind_dn: {{ matrix_synapse_ext_password_provider_ldap_bind_dn|string|to_json }}
|
||||
bind_password: {{ matrix_synapse_ext_password_provider_ldap_bind_password|string|to_json }}
|
||||
bind_dn: {{ matrix_synapse_ext_password_provider_ldap_bind_dn | string|to_json }}
|
||||
bind_password: {{ matrix_synapse_ext_password_provider_ldap_bind_password | string|to_json }}
|
||||
{% endif %}
|
||||
filter: {{ matrix_synapse_ext_password_provider_ldap_filter|string|to_json }}
|
||||
filter: {{ matrix_synapse_ext_password_provider_ldap_filter | string|to_json }}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
|
Reference in New Issue
Block a user