Import varnish.logrotate from current pkg-varnish git. This makes
varnishlog and varnishncsa log rotation be quiet.
--- /dev/null
+/var/log/varnish/varnish.log {
+ daily
+ rotate 7
+ missingok
+ compress
+ delaycompress
+ missingok
+ postrotate
+ if [ -d /run/systemd/system ]; then
+ systemctl -q is-active varnishlog.service || exit 0
+ fi
+ /usr/sbin/invoke-rc.d varnishlog reload > /dev/null
+ endscript
+}
+
+/var/log/varnish/varnishncsa.log {
+ daily
+ rotate 7
+ missingok
+ compress
+ delaycompress
+ missingok
+ postrotate
+ if [ -d /run/systemd/system ]; then
+ systemctl -q is-active varnishncsa.service || exit 0
+ fi
+ /usr/sbin/invoke-rc.d varnishncsa reload > /dev/null
+ endscript
+}
notify => Service['varnish'],
mode => '0444',
}
+
+ file { '/etc/logrotate.d/varnish':
+ source => 'puppet:///modules/varnish/varnish.logrotate',
+ require => Package['varnish'],
+ mode => '0444',
+ }
}