forked from ansible-lockdown/RHEL9-CIS
added warning count
Signed-off-by: Mark Bolwell <mark.bollyuk@gmail.com>
This commit is contained in:
parent
c494559882
commit
6b6a4a32c8
17 changed files with 219 additions and 71 deletions
|
|
@ -78,7 +78,7 @@
|
|||
- password
|
||||
- rule_5.6.1.4
|
||||
|
||||
- name: "5.6.1.5 | PATCH | Ensure all users last password change date is in the past"
|
||||
- name: "5.6.1.5 | PATCH | Ensure all users last password change date is in the past"
|
||||
block:
|
||||
- name: "5.6.1.5 | AUDIT | Ensure all users last password change date is in the past | Get current date in Unix Time"
|
||||
shell: echo $(($(date --utc --date "$1" +%s)/86400))
|
||||
|
|
@ -101,7 +101,15 @@
|
|||
|
||||
- name: "5.6.1.5 | AUDIT | Ensure all users last password change date is in the past | Alert on accounts with pw change in the future"
|
||||
debug:
|
||||
msg: "Warning! The following accounts have the last PW change date in the future: {{ rhel9cis_5_6_1_5_user_list.stdout_lines }}"
|
||||
msg: "Warning!! The following accounts have the last PW change date in the future: {{ rhel9cis_5_6_1_5_user_list.stdout_lines }}"
|
||||
when:
|
||||
- rhel9cis_5_6_1_5_user_list.stdout | length > 0
|
||||
- not rhel9cis_futurepwchgdate_autofix
|
||||
|
||||
- name: "5.6.1.5 | AUDIT | Ensure all users last password change date is in the past | warning count"
|
||||
set_fact:
|
||||
control_number: "{{ control_number }} + [ 'rule_5.6.1.5' ]"
|
||||
warn_count: "{{ warn_count|int + 1 }}"
|
||||
when:
|
||||
- rhel9cis_5_6_1_5_user_list.stdout | length > 0
|
||||
- not rhel9cis_futurepwchgdate_autofix
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue