From 172edcb7f3a66da7b3b5d9e1f78bf44ed89d3508 Mon Sep 17 00:00:00 2001 From: Cyril Jouve Date: Mon, 26 Aug 2024 14:42:30 +0200 Subject: [PATCH] manage skipped result Signed-off-by: Cyril Jouve --- tasks/section_6/cis_6.1.x.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tasks/section_6/cis_6.1.x.yml b/tasks/section_6/cis_6.1.x.yml index 956d6ab..503ea46 100644 --- a/tasks/section_6/cis_6.1.x.yml +++ b/tasks/section_6/cis_6.1.x.yml @@ -234,7 +234,7 @@ - name: "6.1.11 | AUDIT | Ensure no unowned or ungrouped files or directories exist | Displaying any unowned files or directories" ansible.builtin.debug: - msg: "Warning!! Missing owner on items in {{ amzn2023cis_6_1_11_audit.results | map(attribute='stdout_lines') | flatten }}" # noqa jinja[invalid] + msg: "Warning!! Missing owner on items in {{ amzn2023cis_6_1_11_audit.results | map(attribute='stdout_lines', default=[]) | flatten }}" # noqa jinja[invalid] when: amzn2023cis_6_1_11_unowned_files_found - name: "6.1.11 | AUDIT | Ensure no unowned or ungrouped files or directories exist | Finding all ungrouped files or directories" @@ -261,7 +261,7 @@ - name: "6.1.11 | AUDIT | Ensure no unowned or ungrouped files or directories exist | Displaying all ungrouped files or directories" ansible.builtin.debug: - msg: "Warning!! Missing group on items in {{ amzn2023cis_6_1_11_audit.results | map(attribute='stdout_lines') | flatten }}" # noqa jinja[invalid] + msg: "Warning!! Missing group on items in {{ amzn2023cis_6_1_11_audit.results | map(attribute='stdout_lines', default=[]) | flatten }}" # noqa jinja[invalid] when: amzn2023cis_6_1_11_ungrouped_files_found - name: "6.1.11 | AUDIT | Ensure no unowned or ungrouped files or directories exist | warning"