2022-01-07 09:06:18 +00:00
|
|
|
---
|
|
|
|
|
|
2022-03-30 16:18:11 +01:00
|
|
|
- name: "5.4.1 | PATCH | Ensure custom authselect profile is used"
|
2022-01-07 09:06:18 +00:00
|
|
|
block:
|
2022-03-30 16:18:11 +01:00
|
|
|
- name: "5.4.1 | AUDIT | Ensure custom authselect profile is used | Gather profiles"
|
2023-01-12 15:01:17 +00:00
|
|
|
ansible.builtin.shell: 'authselect current | grep "Profile ID: custom/"'
|
2022-03-30 16:18:11 +01:00
|
|
|
failed_when: false
|
|
|
|
|
changed_when: false
|
2022-09-16 11:34:42 +01:00
|
|
|
check_mode: false
|
2022-03-30 16:18:11 +01:00
|
|
|
register: rhel9cis_5_4_1_profiles
|
|
|
|
|
|
|
|
|
|
- name: "5.4.1 | AUDIT | Ensure custom authselect profile is used | Show profiles"
|
2023-01-12 15:01:17 +00:00
|
|
|
ansible.builtin.debug:
|
2022-03-30 16:18:11 +01:00
|
|
|
msg:
|
|
|
|
|
- "Below are the current custom profiles"
|
|
|
|
|
- "{{ rhel9cis_5_4_1_profiles.stdout_lines }}"
|
|
|
|
|
|
|
|
|
|
- name: "5.4.1 | PATCH | Ensure custom authselect profile is used | Create custom profiles"
|
2023-01-12 15:01:17 +00:00
|
|
|
ansible.builtin.shell: authselect create-profile {{ rhel9cis_authselect['custom_profile_name'] }} -b {{ rhel9cis_authselect['default_file_to_copy'] }}
|
2022-03-30 16:18:11 +01:00
|
|
|
when: rhel9cis_authselect_custom_profile_create
|
2022-01-07 09:06:18 +00:00
|
|
|
when:
|
2022-03-30 16:18:11 +01:00
|
|
|
- rhel9cis_rule_5_4_1
|
2022-01-07 09:06:18 +00:00
|
|
|
tags:
|
|
|
|
|
- level1-server
|
|
|
|
|
- level1-workstation
|
2022-03-30 16:18:11 +01:00
|
|
|
- manual
|
2022-01-07 09:06:18 +00:00
|
|
|
- patch
|
2022-03-30 16:18:11 +01:00
|
|
|
- authselect
|
2022-01-07 09:06:18 +00:00
|
|
|
- rule_5.4.1
|
2022-03-30 16:18:11 +01:00
|
|
|
|
|
|
|
|
- name: "5.4.2 | PATCH | Ensure authselect includes with-faillock"
|
|
|
|
|
block:
|
|
|
|
|
- name: "5.4.2 | AUDIT | Ensure authselect includes with-faillock | Gather profiles and enabled features"
|
2023-01-12 15:01:17 +00:00
|
|
|
ansible.builtin.shell: "authselect current | grep with-faillock"
|
2022-03-30 16:18:11 +01:00
|
|
|
failed_when: false
|
|
|
|
|
changed_when: false
|
2022-09-16 11:34:42 +01:00
|
|
|
check_mode: false
|
2022-03-30 16:18:11 +01:00
|
|
|
register: rhel9cis_5_4_2_profiles_faillock
|
|
|
|
|
|
|
|
|
|
- name: "5.4.2 | AUDIT | Ensure authselect includes with-faillock| Show profiles"
|
2023-01-12 15:01:17 +00:00
|
|
|
ansible.builtin.debug:
|
2022-03-30 16:18:11 +01:00
|
|
|
msg:
|
|
|
|
|
- "Below are the current custom profiles"
|
|
|
|
|
- "{{ rhel9cis_5_4_2_profiles_faillock.stdout_lines }}"
|
|
|
|
|
|
|
|
|
|
- name: "5.4.2 | PATCH | Ensure authselect includes with-faillock | Create custom profiles"
|
2023-01-12 15:01:17 +00:00
|
|
|
ansible.builtin.shell: "authselect select custom/{{ rhel9cis_authselect['custom_profile_name'] }} with-faillock"
|
2022-03-30 16:18:11 +01:00
|
|
|
when: rhel9cis_authselect_custom_profile_select
|
|
|
|
|
when:
|
|
|
|
|
- rhel9cis_rule_5_4_2
|
|
|
|
|
tags:
|
|
|
|
|
- level1-server
|
|
|
|
|
- level1-workstation
|
|
|
|
|
- automated
|
|
|
|
|
- patch
|
|
|
|
|
- authselect
|
2022-01-07 09:06:18 +00:00
|
|
|
- rule_5.4.2
|