wmdeit-cf-wmdelib/logrot.cf

31 lines
555 B
CFEngine3
Raw Normal View History

2023-11-23 10:58:04 +00:00
#
#
#
bundle agent logrot
{
vars:
"pkgs" slist => {
"logrotate"
};
freebsd::
"dir" string => "/usr/local/etc/logrotate.d";
2023-12-07 12:04:45 +00:00
"cmd" string => "/usr/local/sbin/logrotate";
"conf" string => "/usr/local/etc/logrotate.conf";
2023-11-23 10:58:04 +00:00
debian::
"dir" string => "/etc/logrotate.d";
centos::
"dir" string => "/etc/logrotate.d";
2023-12-07 12:04:45 +00:00
2023-11-23 10:58:04 +00:00
}
bundle agent install_logrot
{
methods:
2023-12-07 12:04:45 +00:00
"any" usebundle => wmde_install_packages(@(logrot.pkgs),"logrotate");
freebsd::
"any" usebundle => create_cron_job("logrotate","0 0 * * *","root $(logrot.cmd) $(logrot.conf)");
2023-11-23 10:58:04 +00:00
}