Add Debian 13 and Ubuntu 26.04 CIS-inspired hardening playbook
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
---
|
||||
- name: Ensure rsyslog is installed
|
||||
ansible.builtin.apt:
|
||||
name: rsyslog
|
||||
state: present
|
||||
update_cache: true
|
||||
cache_valid_time: 3600
|
||||
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
|
||||
- not cis_container_detected | default(false) | 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