File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change 29
29
os_filesystem_whitelist : []
30
30
os_yum_repo_file_whitelist : ['foo.repo']
31
31
os_users_without_password_ageing : ['pw_no_ageing']
32
+ os_auth_pw_warn_age : 7
32
33
os_netrc_enabled : false
33
34
os_ignore_users : ["shell_sys_acc"]
34
35
os_ignore_home_folder_users : ["user_with_777_home"]
Original file line number Diff line number Diff line change 14
14
changed_when : false
15
15
register : expiry_date
16
16
17
- - name : Check that the expiry date of pw_ageing is 30 days
17
+ - name : Check that the expiry date of pw_ageing is 60 days
18
18
ansible.builtin.assert :
19
19
# this uses the date from the expire_date variable and subtracts the current date.
20
20
# it should be bigger that the password_expire_min of the user "pw_no_ageing"
21
21
that :
22
22
- " {{ ( expiry_date.stdout | trim | to_datetime('%b %d, %Y') - ansible_date_time.date | to_datetime('%Y-%m-%d')).days }} == 60"
23
+
24
+ - name : Get Password Expiry warning days for pw_ageing
25
+ ansible.builtin.shell : chage -l pw_ageing | grep "warning before password expires" | cut -d ":" -f 2
26
+ changed_when : false
27
+ register : expiry_warndays
28
+
29
+ - name : Check that number of days of warning before password expires is 7 days
30
+ ansible.builtin.assert :
31
+ that :
32
+ - " expiry_warndays.stdout | trim == '7'"
You can’t perform that action at this time.
0 commit comments