Deploy `logrotate` config for `consul-template`.

This commit is contained in:
Kazuhiro MUSASHI 2022-08-06 21:31:49 +09:00
parent f28d7eafc1
commit ecf50c2bbc
2 changed files with 19 additions and 0 deletions

View File

@ -0,0 +1,13 @@
/var/log/consul-template.log
{
rotate 4
weekly
missingok
notifempty
compress
delaycompress
sharedscripts
postrotate
/usr/lib/rsyslog/rsyslog-rotate
endscript
}

View File

@ -33,6 +33,12 @@ remote_file '/etc/rsyslog.d/30-consul-template.conf' do
notifies :restart, 'service[rsyslog]', :immediately
end
remote_file '/etc/logrotate.d/consul-template' do
owner 'root'
group 'root'
mode '0644'
end
service 'rsyslog' do
action [ :nothing ]
end