forked from ansible-lockdown/RHEL9-CIS
added warning count
Signed-off-by: Mark Bolwell <mark.bollyuk@gmail.com>
This commit is contained in:
parent
c494559882
commit
6b6a4a32c8
17 changed files with 219 additions and 71 deletions
|
|
@ -25,7 +25,8 @@
|
|||
when:
|
||||
- rhel9cis_rule_1_2_2
|
||||
- ansible_distribution == "RedHat" or
|
||||
ansible_distribution == "Rocky"
|
||||
ansible_distribution == "Rocky" or
|
||||
ansible_distribution == "AlmaLinux"
|
||||
tags:
|
||||
- level1-server
|
||||
- level1-workstation
|
||||
|
|
@ -45,7 +46,7 @@
|
|||
- name: "1.2.3 | PATCH | Ensure gpgcheck is globally activated | Update yum.repos"
|
||||
replace:
|
||||
name: "{{ item.path }}"
|
||||
regexp: '^gpgcheck\s+=\s+0'
|
||||
regexp: "^gpgcheck=0"
|
||||
replace: "gpgcheck=1"
|
||||
with_items:
|
||||
- "{{ yum_repos.files }}"
|
||||
|
|
@ -74,8 +75,13 @@
|
|||
- name: "1.2.4 | AUDIT | Ensure package manager repositories are configured | Display repo list"
|
||||
debug:
|
||||
msg:
|
||||
- "Warning! Below are the configured repos. Please review and make sure all align with site policy"
|
||||
- "Warning!! Below are the configured repos. Please review and make sure all align with site policy"
|
||||
- "{{ dnf_configured.stdout_lines }}"
|
||||
|
||||
- name: "1.2.4 | AUDIT | Ensure package manager repositories are configured | Warn Count"
|
||||
set_fact:
|
||||
control_number: "{{ control_number }} + ['rule_1.2.4']"
|
||||
warn_count: "{{ warn_count|int + 1 }}"
|
||||
when:
|
||||
- rhel9cis_rule_1_2_4
|
||||
tags:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue