From ae1ad3baf6aa20ad353920d05b2dcbba0a9d3ff3 Mon Sep 17 00:00:00 2001 From: Slavi Pantaleev Date: Fri, 13 Jan 2023 18:17:52 +0200 Subject: [PATCH] Improve block tasks indentation to make yamllint happy Related to https://github.com/spantaleev/matrix-docker-ansible-deploy/pull/2392 --- .../tasks/setup_install.yml | 32 +++++++-------- .../tasks/prepare_themes.yml | 40 +++++++++---------- 2 files changed, 36 insertions(+), 36 deletions(-) diff --git a/roles/custom/matrix-backup-borg/tasks/setup_install.yml b/roles/custom/matrix-backup-borg/tasks/setup_install.yml index 647aabf4..307542f7 100644 --- a/roles/custom/matrix-backup-borg/tasks/setup_install.yml +++ b/roles/custom/matrix-backup-borg/tasks/setup_install.yml @@ -2,25 +2,25 @@ - when: matrix_backup_borg_postgresql_enabled | bool and matrix_backup_borg_version == '' block: - - name: Fail with matrix_backup_borg_version advice if Postgres not enabled - ansible.builtin.fail: - msg: >- - You are not running a built-in Postgres server (`devture_postgres_enabled: false`), so auto-detecting its version and setting `matrix_backup_borg_version` automatically based on that cannot happen. - Consider setting `matrix_backup_borg_version` to your Postgres version manually. - when: not devture_postgres_enabled + - name: Fail with matrix_backup_borg_version advice if Postgres not enabled + ansible.builtin.fail: + msg: >- + You are not running a built-in Postgres server (`devture_postgres_enabled: false`), so auto-detecting its version and setting `matrix_backup_borg_version` automatically based on that cannot happen. + Consider setting `matrix_backup_borg_version` to your Postgres version manually. + when: not devture_postgres_enabled - - ansible.builtin.include_role: - name: galaxy/com.devture.ansible.role.postgres - tasks_from: detect_existing_postgres_version + - ansible.builtin.include_role: + name: galaxy/com.devture.ansible.role.postgres + tasks_from: detect_existing_postgres_version - - name: Fail if detected Postgres version is unsupported - ansible.builtin.fail: - msg: "You cannot use borg backup with such an old version ({{ devture_postgres_detected_version }}) of Postgres. Consider upgrading - link to docs for upgrading Postgres: docs/maintenance-postgres.md#upgrading-postgresql" - when: "devture_postgres_detected_version not in matrix_backup_borg_supported_postgres_versions" + - name: Fail if detected Postgres version is unsupported + ansible.builtin.fail: + msg: "You cannot use borg backup with such an old version ({{ devture_postgres_detected_version }}) of Postgres. Consider upgrading - link to docs for upgrading Postgres: docs/maintenance-postgres.md#upgrading-postgresql" + when: "devture_postgres_detected_version not in matrix_backup_borg_supported_postgres_versions" - - name: Set the correct borg backup version to use - ansible.builtin.set_fact: - matrix_backup_borg_version: "{{ devture_postgres_detected_version }}" + - name: Set the correct borg backup version to use + ansible.builtin.set_fact: + matrix_backup_borg_version: "{{ devture_postgres_detected_version }}" - name: Ensure borg paths exist ansible.builtin.file: diff --git a/roles/custom/matrix-client-element/tasks/prepare_themes.yml b/roles/custom/matrix-client-element/tasks/prepare_themes.yml index 3f5c9783..70646c94 100644 --- a/roles/custom/matrix-client-element/tasks/prepare_themes.yml +++ b/roles/custom/matrix-client-element/tasks/prepare_themes.yml @@ -9,29 +9,29 @@ delegate_to: 127.0.0.1 become: false block: - - name: Ensure Element themes repository is pulled - ansible.builtin.git: - repo: "{{ matrix_client_element_themes_repository_url }}" - version: "{{ matrix_client_element_themes_repository_version }}" - dest: "{{ role_path }}/files/scratchpad/themes" + - name: Ensure Element themes repository is pulled + ansible.builtin.git: + repo: "{{ matrix_client_element_themes_repository_url }}" + version: "{{ matrix_client_element_themes_repository_version }}" + dest: "{{ role_path }}/files/scratchpad/themes" - - name: Find all Element theme files - ansible.builtin.find: - paths: "{{ role_path }}/files/scratchpad/themes" - patterns: "*.json" - recurse: true - register: matrix_client_element_theme_file_list + - name: Find all Element theme files + ansible.builtin.find: + paths: "{{ role_path }}/files/scratchpad/themes" + patterns: "*.json" + recurse: true + register: matrix_client_element_theme_file_list - - name: Read Element theme - ansible.builtin.slurp: - path: "{{ item.path }}" - register: "matrix_client_element_theme_file_contents" - with_items: "{{ matrix_client_element_theme_file_list.files }}" + - name: Read Element theme + ansible.builtin.slurp: + path: "{{ item.path }}" + register: "matrix_client_element_theme_file_contents" + with_items: "{{ matrix_client_element_theme_file_list.files }}" - - name: Load Element theme - ansible.builtin.set_fact: - matrix_client_element_settingDefaults_custom_themes: "{{ matrix_client_element_settingDefaults_custom_themes + [item['content'] | b64decode | from_json] }}" # noqa var-naming - with_items: "{{ matrix_client_element_theme_file_contents.results }}" + - name: Load Element theme + ansible.builtin.set_fact: + matrix_client_element_settingDefaults_custom_themes: "{{ matrix_client_element_settingDefaults_custom_themes + [item['content'] | b64decode | from_json] }}" # noqa var-naming + with_items: "{{ matrix_client_element_theme_file_contents.results }}" # # Tasks related to getting rid of Element themes (if it was previously enabled)