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

Fix some ansible-lint-reported warnings

pull/2194/head
Slavi Pantaleev 3 лет назад
Родитель
Сommit
cb2fecbea9
7 измененных файлов: 16 добавлений и 11 удалений
  1. +2
    -1
      roles/matrix-base/tasks/server_base/setup.yml
  2. +2
    -1
      roles/matrix-bridge-appservice-discord/tasks/validate_config.yml
  3. +4
    -5
      roles/matrix-ldap-registration-proxy/tasks/init.yml
  4. +2
    -1
      roles/matrix-postgres/tasks/import_generic_sqlite_db.yml
  5. +2
    -1
      roles/matrix-postgres/tasks/run_vacuum.yml
  6. +2
    -1
      roles/matrix-synapse/tasks/rust-synapse-compress-state/compress_room.yml
  7. +2
    -1
      roles/matrix-synapse/tasks/rust-synapse-compress-state/main.yml

+ 2
- 1
roles/matrix-base/tasks/server_base/setup.yml Просмотреть файл

@@ -21,7 +21,8 @@
register: lsb_release_installation_result

- name: Reread ansible_lsb facts if lsb-release got installed
ansible.builtin.setup: filter=ansible_lsb*
ansible.builtin.setup:
filter: ansible_lsb*
when: lsb_release_installation_result.changed

- ansible.builtin.include_tasks: "{{ role_path }}/tasks/server_base/setup_debian.yml"


+ 2
- 1
roles/matrix-bridge-appservice-discord/tasks/validate_config.yml Просмотреть файл

@@ -22,5 +22,6 @@
- {'old': 'matrix_appservice_discord_container_expose_client_server_api_port', 'new': '<superseded by matrix_appservice_discord_container_http_host_bind_port>'}

- name: Require a valid database engine
ansible.builtin.fail: msg="`matrix_appservice_discord_database_engine` needs to be either 'sqlite' or 'postgres'"
ansible.builtin.fail:
msg: "`matrix_appservice_discord_database_engine` needs to be either 'sqlite' or 'postgres'"
when: "matrix_appservice_discord_database_engine not in ['sqlite', 'postgres']"

+ 4
- 5
roles/matrix-ldap-registration-proxy/tasks/init.yml Просмотреть файл

@@ -10,7 +10,10 @@
matrix_systemd_services_list: "{{ matrix_systemd_services_list + ['matrix-ldap-registration-proxy.service'] }}"
when: matrix_ldap_registration_proxy_enabled | bool

- block:
- when: matrix_ldap_registration_proxy_enabled | bool
tags:
- always
block:
- name: Fail if matrix-nginx-proxy role already executed
ansible.builtin.fail:
msg: >-
@@ -52,7 +55,3 @@
URL endpoint to the matrix-ldap-proxy container.
You can expose the container's port using the `matrix_ldap_registration_proxy_container_http_host_bind_port` variable.
when: "not matrix_nginx_proxy_enabled | default(False) | bool"

tags:
- always
when: matrix_ldap_registration_proxy_enabled | bool

+ 2
- 1
roles/matrix-postgres/tasks/import_generic_sqlite_db.yml Просмотреть файл

@@ -28,7 +28,8 @@
- when: 'postgres_connection_string_variable_name is defined'
block:
- name: Fail if postgres_connection_string_variable_name points to an undefined variable
ansible.builtin.fail: msg="postgres_connection_string_variable_name is defined, but there is no variable with the name `{{ postgres_connection_string_variable_name }}`"
ansible.builtin.fail:
msg: "postgres_connection_string_variable_name is defined, but there is no variable with the name `{{ postgres_connection_string_variable_name }}`"
when: "postgres_connection_string_variable_name not in vars"

- name: Get Postgres connection string from variable


+ 2
- 1
roles/matrix-postgres/tasks/run_vacuum.yml Просмотреть файл

@@ -82,7 +82,8 @@
changed_when: matrix_postgres_synapse_vacuum_result.finished and matrix_postgres_synapse_vacuum_result.rc == 0

# Intentionally show the results
- ansible.builtin.debug: var="matrix_postgres_synapse_vacuum_result"
- ansible.builtin.debug:
var: "matrix_postgres_synapse_vacuum_result"

- name: Ensure matrix-synapse is started, if it previously was
ansible.builtin.service:


+ 2
- 1
roles/matrix-synapse/tasks/rust-synapse-compress-state/compress_room.yml Просмотреть файл

@@ -24,7 +24,8 @@
failed_when: not matrix_synapse_rust_synapse_compress_state_compress_room_command_result.finished
changed_when: matrix_synapse_rust_synapse_compress_state_compress_room_command_result.finished and 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"
- ansible.builtin.debug:
var: "matrix_synapse_rust_synapse_compress_state_compress_room_command_result"

- name: Generate Postgres compression SQL import command
ansible.builtin.set_fact:


+ 2
- 1
roles/matrix-synapse/tasks/rust-synapse-compress-state/main.yml Просмотреть файл

@@ -88,7 +88,8 @@

- 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"
- 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:


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