31 lines
555 B
CFEngine3
31 lines
555 B
CFEngine3
#
|
|
#
|
|
#
|
|
|
|
bundle agent logrot
|
|
{
|
|
vars:
|
|
"pkgs" slist => {
|
|
"logrotate"
|
|
};
|
|
freebsd::
|
|
"dir" string => "/usr/local/etc/logrotate.d";
|
|
"cmd" string => "/usr/local/sbin/logrotate";
|
|
"conf" string => "/usr/local/etc/logrotate.conf";
|
|
debian::
|
|
"dir" string => "/etc/logrotate.d";
|
|
centos::
|
|
"dir" string => "/etc/logrotate.d";
|
|
|
|
|
|
}
|
|
|
|
bundle agent install_logrot
|
|
{
|
|
methods:
|
|
"any" usebundle => wmde_install_packages(@(logrot.pkgs),"logrotate");
|
|
freebsd::
|
|
"any" usebundle => create_cron_job("logrotate","0 0 * * *","root $(logrot.cmd) $(logrot.conf)");
|
|
}
|
|
|