Linuxfabrik / lfops

LFOps is an Ansible Collection of generic Roles, Playbooks and Plugins for managing Linux-based Cloud Infrastructures.
https://linuxfabrik.ch
The Unlicense
53 stars 13 forks source link

systemd-journald configuration could be modified using drop-in instead of editing journald.conf #121

Open Geertsky opened 1 year ago

Geertsky commented 1 year ago

The Role systemd_journald includes the deployment of /etc/systemd/journald.conf for setting Storage to persistent and SystemMaxUse to systemd_journald__conf_system_max_use. The manual page of journald.conf states files in /etc/systemd/ contain defaults as a guide to the administrator. This file can be edited to create local overrides.

This means the modification of journald.conf is functional and according to the docs. However, it would be better when /etc/systemd/journald.conf would remain untouched and changes to them would be overridden by journald drop-in snippets.

man journald.conf: Drop-ins have to be used to override package drop-ins, since the main configuration file has lower precedence. It is recommended to prefix all filenames in those subdirectories with a two-digit number and a dash, to simplify the ordering of the files.

I propose to move the changes made to journald.conf to a drop-in snippet under /etc/systemd/journald.conf.d