Skip to content

Commit e53b7ac

Browse files
authored
Merge pull request #514 from bol7742/patch-1
4.5.1.3 not idempotent
2 parents 60d836b + 2dcb306 commit e53b7ac

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tasks/section_4/cis_4.5.1.x.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@
9292

9393
- name: "4.5.1.3 | AUDIT | Ensure password expiration warning days is 7 or more | capture users not matching"
9494
ansible.builtin.shell: >
95-
awk -F: '/^[^:\n\r]+:[^!*xX\n\r]/ {print $1}' /etc/shadow
95+
awk -F: '/^[^:]+:[^!*]/ && $6< {{ rhel8cis_pam_pass_warn_age }} {print $1}' /etc/shadow
9696
changed_when: false
9797
failed_when: discovered_users_warn_days.rc not in [ 0, 1 ]
9898
check_mode: false

0 commit comments

Comments
 (0)