Skip to content

Commit 5e85d38

Browse files
author
Sebastian Gumprich
committed
fix tests for os_hardening_vm
Signed-off-by: Sebastian Gumprich <sebastian.gumprich@t-systems.com>
1 parent 0bd06c7 commit 5e85d38

File tree

1 file changed

+6
-4
lines changed
  • molecule/os_hardening_vm/verify_tasks

1 file changed

+6
-4
lines changed

molecule/os_hardening_vm/verify_tasks/pam.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
---
2+
23
- name: install pip
34
package:
45
name:
@@ -10,6 +11,7 @@
1011
ansible.builtin.pip:
1112
name: pam-tester
1213
state: present
14+
executable: /usr/bin/pip3
1315

1416
- name: set password for test
1517
set_fact:
@@ -29,15 +31,15 @@
2931

3032
- name: check successful login with correct password
3133
shell:
32-
cmd: "pam-tester --user testuser --password {{ test_pw }}"
34+
cmd: "/usr/local/bin/pam-tester --user testuser --password {{ test_pw }}"
3335
environment:
3436
TMPDIR: /var/tmp
3537
LC_ALL: "{{ locale | default('C.UTF-8') }}"
3638
LANG: "{{ locale | default('C.UTF-8') }}"
3739

3840
- name: check unsuccessful login with incorrect password
3941
shell:
40-
cmd: "pam-tester --user testuser --password {{ test_pw }}fail --expectfail"
42+
cmd: "/usr/local/bin/pam-tester --user testuser --password {{ test_pw }}fail --expectfail"
4143
environment:
4244
TMPDIR: /var/tmp
4345
LC_ALL: "{{ locale | default('C.UTF-8') }}"
@@ -46,7 +48,7 @@
4648

4749
- name: check unsuccessful login, with correct password (lockout)
4850
shell:
49-
cmd: "pam-tester --user testuser --password {{ test_pw }} --expectfail"
51+
cmd: "/usr/local/bin/pam-tester --user testuser --password {{ test_pw }} --expectfail"
5052
environment:
5153
TMPDIR: /var/tmp
5254
LC_ALL: "{{ locale | default('C.UTF-8') }}"
@@ -58,7 +60,7 @@
5860

5961
- name: check successful login
6062
shell:
61-
cmd: "pam-tester --user testuser --password {{ test_pw }}"
63+
cmd: "/usr/local/bin/pam-tester --user testuser --password {{ test_pw }}"
6264
environment:
6365
TMPDIR: /var/tmp
6466
LC_ALL: "{{ locale | default('C.UTF-8') }}"

0 commit comments

Comments
 (0)