Merge pull request 'Deploy `logrotate` config for `consul-template`.' (#17) from log-rotation-for-consul-template into master

Reviewed-on: #17
This commit is contained in:
Kazuhiro MUSASHI 2022-08-06 12:35:42 +00:00
commit 907b2363ea
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 notifies :restart, 'service[rsyslog]', :immediately
end end
remote_file '/etc/logrotate.d/consul-template' do
owner 'root'
group 'root'
mode '0644'
end
service 'rsyslog' do service 'rsyslog' do
action [ :nothing ] action [ :nothing ]
end end