mirror of
https://github.com/ansible-lockdown/RHEL9-CIS.git
synced 2025-12-24 22:23:06 +00:00
Initial
Signed-off-by: Mark Bolwell <mark.bollyuk@gmail.com>
This commit is contained in:
commit
a54b5216eb
87 changed files with 7693 additions and 0 deletions
24
tasks/section_4/cis_4.3.yml
Normal file
24
tasks/section_4/cis_4.3.yml
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
---
|
||||
|
||||
- name: "4.3 | L1 | PATCH | Ensure logrotate is configured"
|
||||
block:
|
||||
- name: "4.3 | L1 | AUDIT | Ensure logrotate is configured | Get logrotate settings"
|
||||
find:
|
||||
paths: /etc/logrotate.d/
|
||||
register: log_rotates
|
||||
|
||||
- name: "4.3 | L1 | PATCH | Ensure logrotate is configured"
|
||||
replace:
|
||||
path: "{{ item.path }}"
|
||||
regexp: '^(\s*)(daily|weekly|monthly|yearly)$'
|
||||
replace: "\\1{{ rhel9cis_logrotate }}"
|
||||
with_items:
|
||||
- "{{ log_rotates.files }}"
|
||||
- { path: "/etc/logrotate.conf" }
|
||||
when:
|
||||
- rhel9cis_rule_4_3
|
||||
tags:
|
||||
- level1-server
|
||||
- level1-workstation
|
||||
- patch
|
||||
- rule_4.3
|
||||
Loading…
Add table
Add a link
Reference in a new issue