Compare commits
2 Commits
a5d09ec6cd
...
49b636305e
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
49b636305e | ||
|
|
3e2ee30334 |
@@ -37,6 +37,7 @@
|
|||||||
"timezone_iii::debian",
|
"timezone_iii::debian",
|
||||||
"ntp::default",
|
"ntp::default",
|
||||||
"ntp::apparmor",
|
"ntp::apparmor",
|
||||||
|
"kosmos-base::journald_conf",
|
||||||
"kosmos-base::systemd_emails",
|
"kosmos-base::systemd_emails",
|
||||||
"apt::unattended-upgrades",
|
"apt::unattended-upgrades",
|
||||||
"kosmos-base::firewall",
|
"kosmos-base::firewall",
|
||||||
|
|||||||
@@ -27,6 +27,7 @@
|
|||||||
include_recipe 'apt'
|
include_recipe 'apt'
|
||||||
include_recipe 'timezone_iii'
|
include_recipe 'timezone_iii'
|
||||||
include_recipe 'ntp'
|
include_recipe 'ntp'
|
||||||
|
include_recipe 'kosmos-base::journald_conf'
|
||||||
include_recipe 'kosmos-base::systemd_emails'
|
include_recipe 'kosmos-base::systemd_emails'
|
||||||
|
|
||||||
node.override["apt"]["unattended_upgrades"]["allowed_origins"] = [
|
node.override["apt"]["unattended_upgrades"]["allowed_origins"] = [
|
||||||
|
|||||||
17
site-cookbooks/kosmos-base/recipes/journald_conf.rb
Normal file
17
site-cookbooks/kosmos-base/recipes/journald_conf.rb
Normal 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
|
||||||
@@ -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 %>
|
||||||
Reference in New Issue
Block a user