Add RHEL 9 CIS-inspired hardening playbook
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
---
|
||||
- name: Ensure rsyslog is installed
|
||||
ansible.builtin.package:
|
||||
name: rsyslog
|
||||
state: present
|
||||
when: cis_enable_rsyslog | bool
|
||||
|
||||
- name: Ensure rsyslog is enabled and running
|
||||
ansible.builtin.systemd:
|
||||
name: rsyslog
|
||||
enabled: true
|
||||
state: started
|
||||
when: cis_enable_rsyslog | bool
|
||||
|
||||
- name: Validate journald configuration file presence
|
||||
ansible.builtin.stat:
|
||||
path: /etc/systemd/journald.conf
|
||||
register: cis_journald_conf
|
||||
|
||||
- name: Report journald configuration status
|
||||
ansible.builtin.debug:
|
||||
msg: >-
|
||||
{{ 'OK: /etc/systemd/journald.conf is present.'
|
||||
if cis_journald_conf.stat.exists else 'WARNING: /etc/systemd/journald.conf was not found.' }}
|
||||
Reference in New Issue
Block a user