initial commit

This commit is contained in:
Charlie Root 2023-12-07 13:04:45 +01:00
parent 2e91b76747
commit 9e6956d9c0
2 changed files with 24 additions and 1 deletions

View File

@ -10,16 +10,21 @@ vars:
};
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),"logrot");
"any" usebundle => wmde_install_packages(@(logrot.pkgs),"logrotate");
freebsd::
"any" usebundle => create_cron_job("logrotate","0 0 * * *","root $(logrot.cmd) $(logrot.conf)");
}

View File

@ -0,0 +1,18 @@
{{vars.apache.log_dir}}/{{vars.apache_matomo.site.domain}}-access.log {
rotate 100
size 1024k
postrotate
service {{vars.apache.service_name}} restart ; {{{vars.apache_matomo.logger_script}}}
endscript
}
{{vars.apache.log_dir}}/{{vars.apache_matomo.site.domain}}-error.log {
rotate 100
size 100k
postrotate
service {{vars.apache.service_name}} restart
endscript
}