File tree Expand file tree Collapse file tree 1 file changed +24
-1
lines changed
molecule/os_hardening/verify_tasks Expand file tree Collapse file tree 1 file changed +24
-1
lines changed Original file line number Diff line number Diff line change 1515
1616- name : set password for test
1717 set_fact :
18- test_pw : " myTest§pw"
18+ test_pw : " myTest!pw"
19+
20+ - name : set locale for test
21+ set_fact :
22+ locale : " en_US.UTF-8"
23+ when :
24+ - ansible_facts.os_family == 'RedHat'
25+ - ansible_facts.distribution_major_version < '8'
1926
2027- name : create testuser
2128 user :
2532- name : check successful login with correct password
2633 shell :
2734 cmd : " /usr/local/bin/pam-tester --user testuser --password {{ test_pw }}"
35+ environment :
36+ TMPDIR : /var/tmp
37+ LC_ALL : " {{ locale | default('C.UTF-8') }}"
38+ LANG : " {{ locale | default('C.UTF-8') }}"
2839
2940- name : check unsuccessful login with incorrect password
3041 shell :
3142 cmd : " /usr/local/bin/pam-tester --user testuser --password {{ test_pw }}fail --expectfail"
43+ environment :
44+ TMPDIR : /var/tmp
45+ LC_ALL : " {{ locale | default('C.UTF-8') }}"
46+ LANG : " {{ locale | default('C.UTF-8') }}"
3247 with_sequence : count=6
3348
3449- name : check unsuccessful login, with correct password (lockout)
3550 shell :
3651 cmd : " /usr/local/bin/pam-tester --user testuser --password {{ test_pw }} --expectfail"
52+ environment :
53+ TMPDIR : /var/tmp
54+ LC_ALL : " {{ locale | default('C.UTF-8') }}"
55+ LANG : " {{ locale | default('C.UTF-8') }}"
3756
3857- name : wait for account to unlock
3958 pause :
4261- name : check successful login
4362 shell :
4463 cmd : " /usr/local/bin/pam-tester --user testuser --password {{ test_pw }}"
64+ environment :
65+ TMPDIR : /var/tmp
66+ LC_ALL : " {{ locale | default('C.UTF-8') }}"
67+ LANG : " {{ locale | default('C.UTF-8') }}"
You can’t perform that action at this time.
0 commit comments