Last active
October 19, 2017 09:38
-
-
Save hiroki-uchida/f387ad0192a45eb7ffe9a26e161088d4 to your computer and use it in GitHub Desktop.
itamae cookbook logrotate examples.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# cookbooks/logrotate/default.rb | |
package 'crontabs' | |
package 'logrotate' | |
service 'crond' do | |
action %i[start enable] | |
end | |
file '/etc/logrotate.d/rails' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# cookbooks/logrotate/files/etc/logrotate.d/rails | |
/var/apps/rails-app/shared/log/*log { | |
create 0644 ruby ruby | |
daily | |
rotate 365 | |
missingok | |
notifempty | |
copytruncate | |
compress | |
sharedscripts | |
postrotate | |
endscript | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment