Ansible Role systemd_journald
This role configures Systemd’s logging service „journald“.
From man journald.conf:
- SystemKeepFree=control how much disk space systemd-journald shall leave free for other uses.
- SystemMaxUse=control how much disk space the journal may use up at most.
- systemd-journaldwill respect both limits and use the smaller of the two values.
Example with numbers on a 100G disk:
- SystemKeepFree=10Gmeans that journald may use at most- 100G - 10G = 90G
- SystemMaxUse=20G
Whenever journald needs to free space, it computes min(90G, 20G), and then deletes archived journal files until usage <= that value. Here, journald will grow the journal up to about 20G, then start deleting archived files to stay under that cap.
Optional Role Variables
| Variable | Description | Default Value | 
|---|---|---|
| 
 | Controls where to store journal data. Have a look at  | 
 | 
| 
 | Controls how much disk space systemd-journald shall leave free for other uses. Unlike in  | 
 | 
| 
 | Controls how much disk space the journal may use up at most. Unlike in  | 
 | 
| 
 | Enables or disables the service, analogous to  | 
 | 
| 
 | Changes the state of the service, analogous to  | 
 | 
Example:
# optional
systemd_journald__conf_storage: 'persistent'
systemd_journald__conf_system_keep_free: '20%'
systemd_journald__conf_system_max_use: '5G'
systemd_journald__service_enabled: true
systemd_journald__service_state: 'started'