Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configure journald.conf anyway #320

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 0 additions & 34 deletions tasks/section_4/cis_4.2.2.x.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,40 +103,6 @@
- journald
- rule_4.2.2.2

- name: "4.2.2.3 | PATCH | Ensure journald is configured to compress large log files"
ansible.builtin.lineinfile:
path: /etc/systemd/journald.conf
regexp: 'Compress='
line: Compress=yes
insertafter: ^#Compress
validate: /usr/bin/bash -n %s
when:
- rhel8cis_rule_4_2_2_3
tags:
- level1-server
- level1-workstation
- automated
- patch
- journald
- rule_4.2.2.3

- name: "4.2.2.4 | PATCH | Ensure journald is configured to write logfiles to persistent disk"
ansible.builtin.lineinfile:
path: /etc/systemd/journald.conf
regexp: 'Storage='
line: Storage=persistent
state: present
insertafter: ^#Storage
validate: /usr/bin/bash -n %s
when:
- rhel8cis_rule_4_2_2_4
tags:
- level1-server
- level1-workstation
- automated
- patch
- journald
- rule_4.2.2.4

# This is counter to control 4.2.1.3??
- name: "4.2.2.5 | PATCH | Ensure journald is not configured to send logs to rsyslog"
Expand Down
35 changes: 35 additions & 0 deletions tasks/section_4/cis_4.2.extra.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
- name: "4.2.2.3 | PATCH | Ensure journald is configured to compress large log files"
ansible.builtin.lineinfile:
path: /etc/systemd/journald.conf
regexp: 'Compress='
line: Compress=yes
insertafter: ^#Compress
validate: /usr/bin/bash -n %s
when:
- rhel8cis_rule_4_2_2_3
tags:
- level1-server
- level1-workstation
- automated
- patch
- journald
- rule_4.2.2.3

- name: "4.2.2.4 | PATCH | Ensure journald is configured to write logfiles to persistent disk"
ansible.builtin.lineinfile:
path: /etc/systemd/journald.conf
regexp: 'Storage='
line: Storage=persistent
state: present
insertafter: ^#Storage
validate: /usr/bin/bash -n %s
when:
- rhel8cis_rule_4_2_2_4
tags:
- level1-server
- level1-workstation
- automated
- patch
- journald
- rule_4.2.2.4
3 changes: 3 additions & 0 deletions tasks/section_4/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@
ansible.builtin.import_tasks: cis_4.2.2.x.yml
when: rhel8cis_syslog == 'journald'

- name: "SECTION | 4.2.1.x| Configure journald.conf"
ansible.builtin.import_tasks: cis_4.2.extra.yml

- name: "SECTION | 4.2.3 | Configure logile perms"
ansible.builtin.import_tasks: cis_4.2.3.yml

Expand Down