Merge pull request 'Deploy `/etc/logrotate.d/vault`.' (#5) from vault-audit-log-rotation into master

Reviewed-on: #5
This commit is contained in:
Kazuhiro MUSASHI 2022-07-02 11:40:31 +00:00
commit cdbd937455
2 changed files with 22 additions and 0 deletions

View File

@ -0,0 +1,16 @@
/opt/vault/logs/audit.log {
rotate 30
daily
# Do not execute rotate if the log file is empty.
notifempty
missingok
compress
# Set compress on next rotate cycl to prevent entry loss when performing compression.
delaycompress
postrotate
/usr/bin/pkill -HUP vault
endscript
extension log
dateext
dateformat %Y-%m-%d.
}

View File

@ -20,3 +20,9 @@ end
mode '644'
end
end
remote_file '/etc/logrotate.d/vault' do
owner 'root'
group 'root'
mode '644'
end