From a396f2b1f1da38d8f6bd3f7757cc496ae0b68d85 Mon Sep 17 00:00:00 2001 From: Robert de Bock Date: Thu, 12 May 2022 12:56:12 +0200 Subject: [PATCH] ansible-lint tag "# noqa" does not work for blocks in blocks. --- tasks/main.yml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/tasks/main.yml b/tasks/main.yml index febdfee..da8eb9f 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -69,18 +69,18 @@ when: - ansible_distribution_major_version == "6" - - name: configure 7 - block: - - name: update all software (yum/7) - ansible.builtin.yum: - name: "*" - state: latest # noqa package-latest This role is to update packages. - notify: - - reboot + - name: update all software (yum/7) + ansible.builtin.yum: + name: "*" + state: latest # noqa package-latest This role is to update packages. + notify: + - reboot + when: + - ansible_distribution_major_version == "7" - - name: install yum-utils - ansible.builtin.package: - name: yum-utils + - name: install yum-utils + ansible.builtin.package: + name: yum-utils when: - ansible_distribution_major_version == "7" when: