diff --git a/tasks/section_4/cis_4.2.3.yml b/tasks/section_4/cis_4.2.3.yml index 8a7ae83..a391254 100644 --- a/tasks/section_4/cis_4.2.3.yml +++ b/tasks/section_4/cis_4.2.3.yml @@ -9,13 +9,17 @@ recurse: true register: logfiles - - name: "4.2.3 | AUDIT | Ensure permissions on all logfiles are configured | find files" + - name: "4.2.3 | PATCH | Ensure permissions on all logfiles are configured | change permissions" ansible.builtin.file: path: "{{ item.path }}" mode: 0640 loop: "{{ logfiles.files }}" loop_control: label: "{{ item.path }}" + when: + - item.path != "/var/log/btmp" + - item.path != "/var/log/utmp" + - item.path != "/var/log/wtmp" when: - rhel9cis_rule_4_2_3 tags: