diff --git a/tasks/section_4/cis_4.1.4.x.yml b/tasks/section_4/cis_4.1.4.x.yml index 60b4e9b..a2f8663 100644 --- a/tasks/section_4/cis_4.1.4.x.yml +++ b/tasks/section_4/cis_4.1.4.x.yml @@ -64,12 +64,11 @@ - name: "4.1.4.5 | PATCH | Ensure audit configuration files are 640 or more restrictive" ansible.builtin.file: path: "{{ item.path }}" - mode: '0640' + mode: "{{ '0600' if item.mode == '0600' else '0640' }}" loop: "{{ auditd_conf_files.files }}" loop_control: label: "{{ item.path }}" when: - - item.mode != '06(0|4)0' - rhel9cis_rule_4_1_4_5 tags: - level2-server