Configure custom logrotate rules
To help ensure that logs are pruned on a regular basis to conserve system space, you
can specify logrotate
rules.
The following example creates custom
logrotate
rules for the primary
Puppet server's puppetserver
logs.# control-repo/data/nodes/<your puppetserver>.yaml
---
cem_linux::config:
control_configs:
ensure_logrotate_is_configured:
rules:
puppetserver:
path:
- '/var/log/puppetlabs/puppetserver/puppetserver.log'
- '/var/log/puppetlabs/puppetserver/pcp-broker.log'
- '/var/log/puppetlabs/puppetserver/puppetserver-access.log'
- '/var/log/puppetlabs/puppetserver/puppetserver-daemon.log'
- '/var/log/puppetlabs/puppetserver/puppetserver-status.log'
- '/var/log/puppetlabs/puppetserver/code-manager-access.log'
- '/var/log/puppetlabs/puppetserver/file-sync-access.log'
- '/var/log/puppetlabs/puppetserver/masterhttp.log'
create_owner: 'puppet'
create_group: 'puppet'