Fix some ansible-lint-reported warnings
This mostly fixes `key-order` warnings around `block` statements.
This commit is contained in:
@ -26,7 +26,8 @@
|
||||
matrix_systemd_services_list: "{{ matrix_systemd_services_list + ['matrix-goofys.service'] }}"
|
||||
when: matrix_s3_media_store_enabled | bool
|
||||
|
||||
- block:
|
||||
- when: matrix_synapse_enabled | bool and matrix_synapse_metrics_proxying_enabled | bool
|
||||
block:
|
||||
- name: Fail if matrix-nginx-proxy role already executed
|
||||
ansible.builtin.fail:
|
||||
msg: >-
|
||||
@ -84,4 +85,3 @@
|
||||
[matrix_synapse_worker_nginx_metrics_configuration_block]
|
||||
}}
|
||||
when: matrix_synapse_workers_enabled_list | length > 0
|
||||
when: matrix_synapse_enabled | bool and matrix_synapse_metrics_proxying_enabled | bool
|
||||
|
@ -85,16 +85,17 @@
|
||||
#
|
||||
# Row 3 contains a space when there's no result.
|
||||
|
||||
- block:
|
||||
- when: "matrix_synapse_rust_synapse_compress_state_find_rooms_command_result.failed or matrix_synapse_rust_synapse_compress_state_find_rooms_command_result.stdout_lines | length != 4"
|
||||
block:
|
||||
- ansible.builtin.debug: var="matrix_synapse_rust_synapse_compress_state_find_rooms_command_result"
|
||||
|
||||
- name: Fail if room find result is not what we expect
|
||||
ansible.builtin.fail:
|
||||
msg: >-
|
||||
Expecting 4 lines in the "find rooms" result.
|
||||
when: "matrix_synapse_rust_synapse_compress_state_find_rooms_command_result.failed or matrix_synapse_rust_synapse_compress_state_find_rooms_command_result.stdout_lines | length != 4"
|
||||
|
||||
- block:
|
||||
- when: "matrix_synapse_rust_synapse_compress_state_find_rooms_command_result.stdout_lines[2] != ' '"
|
||||
block:
|
||||
# matrix_synapse_rust_synapse_compress_state_eligible_rooms is a list
|
||||
# of dictionaries like this: {'room_id': '!some-id', 'count': 2461329}
|
||||
- ansible.builtin.set_fact:
|
||||
@ -113,7 +114,6 @@
|
||||
with_items: "{{ matrix_synapse_rust_synapse_compress_state_eligible_rooms }}"
|
||||
loop_control:
|
||||
loop_var: room_details
|
||||
when: "matrix_synapse_rust_synapse_compress_state_find_rooms_command_result.stdout_lines[2] != ' '"
|
||||
|
||||
- name: Show notice about lack of rooms to compress
|
||||
ansible.builtin.debug:
|
||||
|
@ -18,7 +18,8 @@
|
||||
group: "{{ matrix_user_groupname }}"
|
||||
when: "not local_path_media_store_stat.failed and not local_path_media_store_stat.stat.exists"
|
||||
|
||||
- block:
|
||||
- when: "matrix_synapse_container_image_self_build | bool"
|
||||
block:
|
||||
- name: Ensure Synapse repository is present on self-build
|
||||
ansible.builtin.git:
|
||||
repo: "{{ matrix_synapse_container_image_self_build_repo }}"
|
||||
@ -48,7 +49,6 @@
|
||||
environment:
|
||||
DOCKER_BUILDKIT: 1
|
||||
when: "matrix_synapse_git_pull_results.changed | bool or matrix_synapse_docker_image_check_result.stdout == ''"
|
||||
when: "matrix_synapse_container_image_self_build | bool"
|
||||
|
||||
- name: Ensure Synapse Docker image is pulled
|
||||
docker_image:
|
||||
|
@ -37,7 +37,8 @@
|
||||
msg: "Unrecognized Synapse worker `app`: `{{ matrix_synapse_worker_details.app }}`. Supported types are: {{ matrix_synapse_workers_avail_list | join(', ') }}"
|
||||
when: "matrix_synapse_worker_details.app not in matrix_synapse_workers_avail_list"
|
||||
|
||||
- block:
|
||||
- when: "matrix_synapse_worker_details.type == 'stream_writer'"
|
||||
block:
|
||||
- name: Fail if stream_writer_stream not defined for stream_writer worker
|
||||
ansible.builtin.fail:
|
||||
msg: >-
|
||||
@ -50,7 +51,6 @@
|
||||
ansible.builtin.fail:
|
||||
msg: "Synapse background workers of type stream_writer (such as {{ item }}) need to define a valid `replication_port` property"
|
||||
when: "'replication_port' not in matrix_synapse_worker_details"
|
||||
when: "matrix_synapse_worker_details.type == 'stream_writer'"
|
||||
|
||||
- ansible.builtin.set_fact:
|
||||
matrix_systemd_services_list: "{{ matrix_systemd_services_list + [matrix_synapse_worker_details.name + '.service'] }}"
|
||||
|
@ -34,7 +34,7 @@ matrix_synapse_workers_generic_worker_client_server_endpoints: "{{ matrix_synaps
|
||||
matrix_synapse_workers_generic_worker_federation_endpoints: "{{ matrix_synapse_workers_generic_worker_endpoints | default([]) | map('regex_search', matrix_synapse_workers_generic_worker_federation_endpoints_regex) | list | difference([none]) }}"
|
||||
|
||||
# matrix_synapse_workers_generic_worker_federation_endpoints_regex contains the regex used in matrix_synapse_workers_generic_worker_federation_endpoints.
|
||||
# It's intentionally put in a separate variable, to avoid tripping ansible-lint's var-spacing rule.
|
||||
# It's intentionally put in a separate variable, to avoid tripping ansible-lint's jinja[spacing] rule.
|
||||
matrix_synapse_workers_generic_worker_federation_endpoints_regex: '.*(/_matrix/federation|/_matrix/key).*'
|
||||
|
||||
# matrix_synapse_workers_stream_writer_typing_stream_worker_client_server_endpoints contains the endpoints serviced by the `typing` stream writer.
|
||||
|
Reference in New Issue
Block a user