ansible-playbooks/roles/systemd
2025-11-15 00:18:35 +01:00
..
defaults feat: introduce systemd config 2025-11-15 00:18:35 +01:00
handlers feat: introduce systemd config 2025-11-15 00:18:35 +01:00
tasks feat: introduce systemd config 2025-11-15 00:18:35 +01:00
templates feat: introduce systemd config 2025-11-15 00:18:35 +01:00
README.md feat: introduce systemd config 2025-11-15 00:18:35 +01:00

Systemd Role

Manages systemd-journald configuration for efficient log management and storage control.

Overview

This role configures systemd's journal daemon (systemd-journald) to control log storage, retention, and rotation. It's designed to prevent excessive disk usage from system logs while maintaining sufficient logging for troubleshooting.

Hands-on commands

# Disk usage
sudo journalctl --disk-usage

# Current configuration
systemctl show systemd-journald

# Verify configuration
sudo journalctl --verify

# Manual cleanup by time
sudo journalctl --vacuum-time=2weeks

# Manual cleanup by size
sudo journalctl --vacuum-size=500M

# Manual cleanup by file count
sudo journalctl --vacuum-files=10

References