body common control { bundlesequence => { "garbage_collection" }; inputs => { "cfengine_stdlib.cf" }; } bundle agent garbage_collection { files: Sunday:: "$(sys.workdir)/nova_repair.log" comment => "Rotate the promises repaired logs each week", rename => rotate("7"), action => if_elapsed("10000"); "$(sys.workdir)/nova_notkept.log" comment => "Rotate the promises not kept logs each week", rename => rotate("7"), action => if_elapsed("10000"); "$(sys.workdir)/promise.log" comment => "Rotate the promises not kept logs each week", rename => rotate("7"), action => if_elapsed("10000"); any:: "$(sys.workdir)/outputs" comment => "Garbage collection of any output files", delete => tidy, file_select => days_old("3"), depth_search => recurse("inf"); "$(sys.workdir)/" comment => "Garbage collection of any output files", delete => tidy, file_select => days_old("14"), depth_search => recurse("inf"); # Other resources "/tmp" comment => "Garbage collection of any temporary files", delete => tidy, file_select => days_old("3"), depth_search => recurse("inf"); "/var/log/apache2/.*bz" comment => "Garbage collection of rotated log files", delete => tidy, file_select => days_old("30"), depth_search => recurse("inf"); "/var/log/apache2/.*gz" comment => "Garbage collection of rotated log files", delete => tidy, file_select => days_old("30"), depth_search => recurse("inf"); "/var/log/zypper.log" comment => "Prevent the zypper log from choking the disk", rename => rotate("0"), action => if_elapsed("10000"); }