mirror of
https://github.com/ansible-lockdown/RHEL9-CIS.git
synced 2025-12-24 22:23:06 +00:00
improve authselect logic
Signed-off-by: Mark Bolwell <mark.bollyuk@gmail.com>
This commit is contained in:
parent
8cd7d765c5
commit
5a612675e2
2 changed files with 2 additions and 10 deletions
|
|
@ -116,17 +116,11 @@
|
|||
fail_msg: "You still have the default name for your authselect profile"
|
||||
|
||||
- name: "Check authselect profile is selected | Check current profile"
|
||||
ansible.builtin.shell: authselect current | head -1 | awk '{print $NF}'
|
||||
ansible.builtin.shell: authselect list
|
||||
changed_when: false
|
||||
failed_when: prelim_authselect_current_profile.rc not in [ 0, 1 ]
|
||||
register: prelim_authselect_current_profile
|
||||
|
||||
- name: "Check authselect profile is selected | Ensure profile name is set"
|
||||
ansible.builtin.assert:
|
||||
that: prelim_authselect_current_profile is defined
|
||||
success_msg: "Authselect is running and profile is selected"
|
||||
fail_msg: Authselect updates have been selected there are issues with profile selection"
|
||||
|
||||
- name: "Ensure root password is set"
|
||||
when: rhel9cis_rule_5_4_2_4
|
||||
tags:
|
||||
|
|
|
|||
|
|
@ -14,9 +14,7 @@
|
|||
- rule_5.3.2.1
|
||||
block:
|
||||
- name: "5.3.2.1 | PATCH | Ensure active authselect profile includes pam modules | Create custom profiles"
|
||||
when:
|
||||
- rhel9cis_authselect_custom_profile_name not in prelim_authselect_current_profile.stdout or
|
||||
prelim_authselect_current_profile.stdout is not defined
|
||||
when: rhel9cis_authselect_custom_profile_name not in prelim_authselect_current_profile.stdout
|
||||
ansible.builtin.command: "/usr/bin/authselect create-profile {{ rhel9cis_authselect_custom_profile_name }} -b {{ rhel9cis_authselect_default_profile_to_copy }}"
|
||||
changed_when: false
|
||||
args:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue