Improve block tasks indentation to make yamllint happy

Related to https://github.com/spantaleev/matrix-docker-ansible-deploy/pull/2392
This commit is contained in:
Slavi Pantaleev 2023-01-13 18:17:52 +02:00
parent 4c5d945ad3
commit ae1ad3baf6
2 changed files with 36 additions and 36 deletions

View File

@ -2,25 +2,25 @@
- when: matrix_backup_borg_postgresql_enabled | bool and matrix_backup_borg_version == '' - when: matrix_backup_borg_postgresql_enabled | bool and matrix_backup_borg_version == ''
block: block:
- name: Fail with matrix_backup_borg_version advice if Postgres not enabled - name: Fail with matrix_backup_borg_version advice if Postgres not enabled
ansible.builtin.fail: ansible.builtin.fail:
msg: >- 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. 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. Consider setting `matrix_backup_borg_version` to your Postgres version manually.
when: not devture_postgres_enabled when: not devture_postgres_enabled
- ansible.builtin.include_role: - ansible.builtin.include_role:
name: galaxy/com.devture.ansible.role.postgres name: galaxy/com.devture.ansible.role.postgres
tasks_from: detect_existing_postgres_version tasks_from: detect_existing_postgres_version
- name: Fail if detected Postgres version is unsupported - name: Fail if detected Postgres version is unsupported
ansible.builtin.fail: 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" 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" when: "devture_postgres_detected_version not in matrix_backup_borg_supported_postgres_versions"
- name: Set the correct borg backup version to use - name: Set the correct borg backup version to use
ansible.builtin.set_fact: ansible.builtin.set_fact:
matrix_backup_borg_version: "{{ devture_postgres_detected_version }}" matrix_backup_borg_version: "{{ devture_postgres_detected_version }}"
- name: Ensure borg paths exist - name: Ensure borg paths exist
ansible.builtin.file: ansible.builtin.file:

View File

@ -9,29 +9,29 @@
delegate_to: 127.0.0.1 delegate_to: 127.0.0.1
become: false become: false
block: block:
- name: Ensure Element themes repository is pulled - name: Ensure Element themes repository is pulled
ansible.builtin.git: ansible.builtin.git:
repo: "{{ matrix_client_element_themes_repository_url }}" repo: "{{ matrix_client_element_themes_repository_url }}"
version: "{{ matrix_client_element_themes_repository_version }}" version: "{{ matrix_client_element_themes_repository_version }}"
dest: "{{ role_path }}/files/scratchpad/themes" dest: "{{ role_path }}/files/scratchpad/themes"
- name: Find all Element theme files - name: Find all Element theme files
ansible.builtin.find: ansible.builtin.find:
paths: "{{ role_path }}/files/scratchpad/themes" paths: "{{ role_path }}/files/scratchpad/themes"
patterns: "*.json" patterns: "*.json"
recurse: true recurse: true
register: matrix_client_element_theme_file_list register: matrix_client_element_theme_file_list
- name: Read Element theme - name: Read Element theme
ansible.builtin.slurp: ansible.builtin.slurp:
path: "{{ item.path }}" path: "{{ item.path }}"
register: "matrix_client_element_theme_file_contents" register: "matrix_client_element_theme_file_contents"
with_items: "{{ matrix_client_element_theme_file_list.files }}" with_items: "{{ matrix_client_element_theme_file_list.files }}"
- name: Load Element theme - name: Load Element theme
ansible.builtin.set_fact: ansible.builtin.set_fact:
matrix_client_element_settingDefaults_custom_themes: "{{ matrix_client_element_settingDefaults_custom_themes + [item['content'] | b64decode | from_json] }}" # noqa var-naming 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 }}" with_items: "{{ matrix_client_element_theme_file_contents.results }}"
# #
# Tasks related to getting rid of Element themes (if it was previously enabled) # Tasks related to getting rid of Element themes (if it was previously enabled)