From 8652390bebfc84ab8707ef5cdac2b2d6c8646226 Mon Sep 17 00:00:00 2001 From: rjacobs1990 Date: Mon, 12 Feb 2024 15:55:42 +0100 Subject: [PATCH] fix: idempotency molecule issue fixed for logfiles and prevent skipping 0600 #173 Signed-off-by: rjacobs1990 --- tasks/section_4/cis_4.2.3.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/section_4/cis_4.2.3.yml b/tasks/section_4/cis_4.2.3.yml index 867b253..bebd40f 100644 --- a/tasks/section_4/cis_4.2.3.yml +++ b/tasks/section_4/cis_4.2.3.yml @@ -13,7 +13,7 @@ - name: "4.2.3 | PATCH | Ensure permissions on all logfiles are configured | change permissions" ansible.builtin.file: path: "{{ item.path }}" - mode: "{% if item.mode != '0600' %}0640{% endif %}" + mode: "{{ '0640' if item.mode != '0600' else '0600' }}" loop: "{{ logfiles.files }}" loop_control: label: "{{ item.path }}"