puppet-standalone-mashup/shared/additional-modules/nginx-debian/manifests/init.pp

33 lines
656 B
ObjectPascal
Raw Normal View History

2012-02-14 12:11:25 +00:00
class nginx-debian {
$log_root = "/var/log/nginx"
file { $log_root:
owner => root,
group => web,
2012-02-28 20:07:55 +00:00
mode => 2775,
2012-04-25 22:14:41 +00:00
ensure => directory,
require => Group['web']
2012-02-14 12:11:25 +00:00
}
file { "$log_root/sites":
owner => root,
group => web,
mode => 2775,
2012-04-25 22:14:41 +00:00
require => [ File[$log_root], Group['web'] ],
2012-02-28 20:07:55 +00:00
ensure => directory
2012-02-14 12:11:25 +00:00
}
$pid_file = pid_path('nginx')
logrotate_d { 'nginx':
postrotate => "sudo /bin/kill -USR1 `cat ${pid_file}`",
pattern => "/var/log/nginx/*/access.log /var/log/nginx/*/error.log",
require => Class['nginx']
}
2012-04-25 22:14:41 +00:00
bash_rc_d { 'nginx':
ensure => present,
path => $base::local_path
}
2012-02-14 12:11:25 +00:00
}