Skip to content

Commit

Permalink
A MassiveApp module and a logrotate script
Browse files Browse the repository at this point in the history
  • Loading branch information
Tom Copeland committed May 13, 2011
1 parent 656f789 commit 9fb5925
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 1 deletion.
3 changes: 2 additions & 1 deletion manifests/nodes.pp
Expand Up @@ -7,7 +7,8 @@

node "vagrantup" {
include apache
include ganglia
include massiveapp
include memcached
include nagios::server
include ganglia
}
12 changes: 12 additions & 0 deletions modules/massiveapp/manifests/init.pp
@@ -0,0 +1,12 @@
class massiveapp {

$current_path = "/home/massiveapp/current"

file {
"/etc/logrotate.d/massiveapp.conf":
owner => root,
group => root,
mode => 755,
content => template("massiveapp/massiveapp.logrotate.conf.erb")
}
}
10 changes: 10 additions & 0 deletions modules/massiveapp/templates/massiveapp.logrotate.conf.erb
@@ -0,0 +1,10 @@
<%= current_path %>/log/production.log {
missingok
rotate 10
compress
delaycompress
postrotate
touch <%= current_path %>/tmp/restart.txt
endscript
}

0 comments on commit 9fb5925

Please sign in to comment.