mirror of
https://github.com/dev-sec/ansible-collection-hardening
synced 2024-11-10 09:14:18 +00:00
set locale for test
Signed-off-by: Martin Schurz <Martin.Schurz@t-systems.com>
This commit is contained in:
parent
26d84b5f84
commit
3334000b97
1 changed files with 9 additions and 0 deletions
|
@ -9,6 +9,11 @@
|
|||
set_fact:
|
||||
test_pw: "myTest!pw"
|
||||
|
||||
- name: set locale for test
|
||||
set_fact:
|
||||
locale: "C.UTF-8"
|
||||
when: ansible_facts.distribution in ['Debian', 'Ubuntu']
|
||||
|
||||
- name: create testuser
|
||||
user:
|
||||
name: testuser
|
||||
|
@ -19,12 +24,14 @@
|
|||
cmd: "pam-tester --user testuser --password {{ test_pw }}"
|
||||
environment:
|
||||
TMPDIR: /var/tmp
|
||||
LC_ALL: "{{ locale | default('en_US.utf-8') }}"
|
||||
|
||||
- name: check unsuccessfull login with incorrect password
|
||||
shell:
|
||||
cmd: "pam-tester --user testuser --password {{ test_pw }}fail --expectfail"
|
||||
environment:
|
||||
TMPDIR: /var/tmp
|
||||
LC_ALL: "{{ locale | default('en_US.utf-8') }}"
|
||||
with_sequence: count=6
|
||||
|
||||
- name: check ussuccessfull login, with orrect password (lockout)
|
||||
|
@ -32,6 +39,7 @@
|
|||
cmd: "pam-tester --user testuser --password {{ test_pw }} --expectfail"
|
||||
environment:
|
||||
TMPDIR: /var/tmp
|
||||
LC_ALL: "{{ locale | default('en_US.utf-8') }}"
|
||||
|
||||
- name: wait for account to unlock
|
||||
pause:
|
||||
|
@ -42,3 +50,4 @@
|
|||
cmd: "pam-tester --user testuser --password {{ test_pw }}"
|
||||
environment:
|
||||
TMPDIR: /var/tmp
|
||||
LC_ALL: "{{ locale | default('en_US.utf-8') }}"
|
||||
|
|
Loading…
Reference in a new issue