bundles/systemd: configure journald
All checks were successful
bundlewrap/pipeline/head This commit looks good

This commit is contained in:
Franzi 2020-12-12 10:39:57 +01:00
parent 2c062761e3
commit 58d99eb402
Signed by: kunsi
GPG key ID: 12E3D2136B818350
3 changed files with 43 additions and 0 deletions

View file

@ -20,4 +20,11 @@ defaults = {
'net.ifnames=0',
},
},
'systemd': {
'journal': {
'storage': 'volatile',
'maxuse': '100M',
'keepfree': '100M',
},
},
}

View file

@ -0,0 +1,16 @@
[Journal]
Storage=${journal.get('storage', 'persistent')}
Compress=yes
SplitMode=uid
# Disable rate limiting.
RateLimitIntervalSec=0
RateLimitBurst=0
SystemMaxUse=${journal.get('maxuse', '500M')}
SystemKeepFree=${journal.get('keepfree', '2G')}
SystemMaxFileSize=100M
MaxFileSec=0
# Disable auditing
Audit=no

View file

@ -24,3 +24,23 @@ actions = {
'unless': 'timedatectl status | grep -Fi \'ntp service\' | grep -i \'active\'',
},
}
files = {
'/etc/systemd/journald.conf': {
'content_type': 'mako',
'context': {
'journal': node.metadata.get('systemd', {}).get('journal', {}),
},
'triggers': {
'svc_systemd:systemd-journald:restart',
},
},
}
svc_systemd = {
'systemd-journald': {
'needs': {
'file:/etc/systemd/journald.conf',
},
},
}