Skip to content

Commit f12c93b

Browse files
author
Sebastian Gumprich
committed
test more fixes
Signed-off-by: Sebastian Gumprich <sebastian.gumprich@t-systems.com>
1 parent 6d4d502 commit f12c93b

File tree

1 file changed

+1
-24
lines changed
  • molecule/os_hardening/verify_tasks

1 file changed

+1
-24
lines changed

molecule/os_hardening/verify_tasks/pam.yml

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,7 @@
1515

1616
- name: set password for test
1717
set_fact:
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'
18+
test_pw: "myTest§pw"
2619

2720
- name: create testuser
2821
user:
@@ -32,27 +25,15 @@
3225
- name: check successful login with correct password
3326
shell:
3427
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') }}"
3928

4029
- name: check unsuccessful login with incorrect password
4130
shell:
4231
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') }}"
4732
with_sequence: count=6
4833

4934
- name: check unsuccessful login, with correct password (lockout)
5035
shell:
5136
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') }}"
5637

5738
- name: wait for account to unlock
5839
pause:
@@ -61,7 +42,3 @@
6142
- name: check successful login
6243
shell:
6344
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') }}"

0 commit comments

Comments
 (0)