From 6d24931ebf66ec9f5382a0fd9b12f766b77a912c Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Mon, 30 Mar 2015 09:00:24 +0100 Subject: [PATCH] Delay compression of shorewall log files --- cookbooks/networking/recipes/default.rb | 16 ++++++++++++++++ .../templates/default/logrotate.shorewall.erb | 10 ++++++++++ 2 files changed, 26 insertions(+) create mode 100644 cookbooks/networking/templates/default/logrotate.shorewall.erb diff --git a/cookbooks/networking/recipes/default.rb b/cookbooks/networking/recipes/default.rb index 5cb43e807..fe01c04e5 100644 --- a/cookbooks/networking/recipes/default.rb +++ b/cookbooks/networking/recipes/default.rb @@ -189,6 +189,14 @@ template "/etc/shorewall/rules" do notifies :restart, "service[shorewall]" end +template "/etc/logrotate.d/shorewall" do + source "logrotate.shorewall.erb" + owner "root" + group "root" + mode 0644 + variables :name => "shorewall" +end + firewall_rule "limit-icmp-echo" do action :accept family :inet @@ -294,6 +302,14 @@ unless node.interfaces(:family => :inet6).empty? notifies :restart, "service[shorewall6]" end + template "/etc/logrotate.d/shorewall6" do + source "logrotate.shorewall.erb" + owner "root" + group "root" + mode 0644 + variables :name => "shorewall6" + end + firewall_rule "limit-icmp6-echo" do action :accept family :inet6 diff --git a/cookbooks/networking/templates/default/logrotate.shorewall.erb b/cookbooks/networking/templates/default/logrotate.shorewall.erb new file mode 100644 index 000000000..c95ba7496 --- /dev/null +++ b/cookbooks/networking/templates/default/logrotate.shorewall.erb @@ -0,0 +1,10 @@ +# DO NOT EDIT - This file is being maintained by Chef + +/var/log/<%= @name %>-init.log { + weekly + rotate 4 + compress + delaycompress + missingok + create 0640 root adm +} -- 2.43.2