mirror of
https://github.com/ansible-lockdown/RHEL9-CIS.git
synced 2025-12-27 15:33:06 +00:00
4.2.2.3/4 journald compress & persistent.
This commit is contained in:
parent
3525cb6aab
commit
d4177e98f6
2 changed files with 23 additions and 0 deletions
|
|
@ -214,3 +214,19 @@
|
|||
- patch
|
||||
- rsyslog
|
||||
- rule_4.2.1.7
|
||||
- name: "4.2.2.3/4 | PATCH | Ensure journald is configured to compress large log files into persistent storage."
|
||||
ansible.builtin.template:
|
||||
src: "etc/systemd/{{ item }}.j2"
|
||||
dest: "/etc/systemd/{{ item }}"
|
||||
owner: root
|
||||
group: root
|
||||
mode: '0644'
|
||||
register: sysctl_updated
|
||||
notify: Reload sysctl
|
||||
loop:
|
||||
- journald.conf
|
||||
when:
|
||||
- rhel9cis_sysctl_update
|
||||
- not system_is_container
|
||||
- "'procps-ng' in ansible_facts.packages"
|
||||
|
||||
|
|
|
|||
7
templates/etc/systemd/journald.conf.j2
Normal file
7
templates/etc/systemd/journald.conf.j2
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
# journald configure.
|
||||
|
||||
{% if rhel9cis_rule_4_2_2_3 %}
|
||||
# CIS 4.2.2.3/4
|
||||
Compress=yes
|
||||
Storage=persistent
|
||||
{% endif %}
|
||||
Loading…
Add table
Add a link
Reference in a new issue