Add logrotated config for nomad log files.
```
--- /dev/null
+++ b/cookbooks/nomad/files/etc/logrotate.d/nomad
@@ -0,0 +1,13 @@
+/var/log/nomad.log
+{
+ rotate 4
+ weekly
+ missingok
+ notifempty
+ compress
+ delaycompress
+ sharedscripts
+ postrotate
+ /usr/lib/rsyslog/rsyslog-rotate
+ endscript
+}
```
This commit is contained in:
parent
dffb57e2fc
commit
de06f5575c
13
cookbooks/nomad/files/etc/logrotate.d/nomad
Normal file
13
cookbooks/nomad/files/etc/logrotate.d/nomad
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
/var/log/nomad.log
|
||||||
|
{
|
||||||
|
rotate 4
|
||||||
|
weekly
|
||||||
|
missingok
|
||||||
|
notifempty
|
||||||
|
compress
|
||||||
|
delaycompress
|
||||||
|
sharedscripts
|
||||||
|
postrotate
|
||||||
|
/usr/lib/rsyslog/rsyslog-rotate
|
||||||
|
endscript
|
||||||
|
}
|
||||||
@ -103,3 +103,10 @@ end
|
|||||||
service 'rsyslog' do
|
service 'rsyslog' do
|
||||||
action [ :nothing ]
|
action [ :nothing ]
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# Deploy the `logrotated` configuration:
|
||||||
|
remote_file '/etc/logrotate.d/nomad' do
|
||||||
|
owner 'root'
|
||||||
|
group 'root'
|
||||||
|
mode '644'
|
||||||
|
end
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user