Update rule 5.4.1.5 to use shell task which supports pipes instead of command task; previously this would silently fail
Signed-off-by: Shawn Hardwick <time4swim@gmail.com>
This commit is contained in:
parent
1cf3c4d58b
commit
4af134cd74
|
@ -130,13 +130,13 @@
|
||||||
- login
|
- login
|
||||||
block:
|
block:
|
||||||
- name: "5.4.1.5 | AUDIT | Ensure inactive password lock is configured | General setting"
|
- name: "5.4.1.5 | AUDIT | Ensure inactive password lock is configured | General setting"
|
||||||
ansible.builtin.command: useradd -D | grep INACTIVE | cut -d= -f2
|
ansible.builtin.shell: useradd -D | grep INACTIVE | cut -d= -f2
|
||||||
changed_when: false
|
changed_when: false
|
||||||
failed_when: false
|
failed_when: false
|
||||||
register: discovered_passwd_inactive_setting
|
register: discovered_passwd_inactive_setting
|
||||||
|
|
||||||
- name: "5.4.1.5 | PATCH | Ensure inactive password lock is configured| Set inactive period for new users"
|
- name: "5.4.1.5 | PATCH | Ensure inactive password lock is configured| Set inactive period for new users"
|
||||||
when: discovered_passwd_inactive_setting.stdout != ubtu24cis_pass_inactive | string
|
when: discovered_passwd_inactive_setting.stdout != (ubtu24cis_pass_inactive | string)
|
||||||
ansible.builtin.command: useradd -D -f {{ ubtu24cis_pass_inactive }}
|
ansible.builtin.command: useradd -D -f {{ ubtu24cis_pass_inactive }}
|
||||||
failed_when: false
|
failed_when: false
|
||||||
changed_when: true
|
changed_when: true
|
||||||
|
|
Loading…
Reference in New Issue