From 742165cd726ff8238a0e6bc569259ae35fd726a6 Mon Sep 17 00:00:00 2001 From: rjacobs1990 Date: Mon, 12 Feb 2024 16:21:31 +0100 Subject: [PATCH] fix: more readable condition 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 bebd40f..823975a 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: "{{ '0640' if item.mode != '0600' else '0600' }}" + mode: "{{ '0600' if item.mode == '0600' else '0640' }}" loop: "{{ logfiles.files }}" loop_control: label: "{{ item.path }}"