Compare commits

..

2 Commits

Author SHA1 Message Date
Greg Karekinian
49b636305e Update mastodon-3 node file after Chef run 2025-05-21 11:36:15 +02:00
Greg Karekinian
3e2ee30334 Configure maximum size and timespan of journald logs
Closes #506
2025-05-21 11:36:15 +02:00
2 changed files with 23 additions and 0 deletions

View File

@ -0,0 +1,17 @@
#
# Cookbook Name:: kosmos-base
# Recipe:: journald_conf
#
template "/etc/systemd/journald.conf" do
source "journald.conf.erb"
variables system_max_use: "256M",
max_retention_sec: "7d"
# Restarting journald is required
notifies :run, "execute[systemctl restart systemd-journald.service]", :delayed
end
execute "systemctl restart systemd-journald.service" do
command "systemctl restart systemd-journald.service"
action :nothing
end

View File

@ -0,0 +1,6 @@
[Journal]
# Set the maximum size of the journal logs in bytes
SystemMaxUse=<%= @system_max_use %>
# Set the number of days after which logs will be deleted
MaxRetentionSec=<%= @max_retention_sec %>