| OLD | NEW |
| 1 class nginx ( | 1 class nginx ( |
| 2 $worker_processes = $nginx::params::worker_processes, | 2 $worker_processes = $nginx::params::worker_processes, |
| 3 $worker_connections = $nginx::params::worker_connections, | 3 $worker_connections = $nginx::params::worker_connections, |
| 4 $ssl_session_cache = $nginx::params::ssl_session_cache, | 4 $ssl_session_cache = $nginx::params::ssl_session_cache, |
| 5 $geoip_country = undef, | 5 $geoip_country = undef, |
| 6 $geoip_city = undef, | 6 $geoip_city = undef, |
| 7 ) inherits nginx::params { | 7 ) inherits nginx::params { |
| 8 | 8 |
| 9 apt::ppa {'ppa:nginx/stable': | 9 apt::ppa {'ppa:nginx/stable': |
| 10 } | 10 } |
| (...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 189 | 189 |
| 190 $find_chmod_base = [$find_cmd_base, '-not', '-perm', '0640'] | 190 $find_chmod_base = [$find_cmd_base, '-not', '-perm', '0640'] |
| 191 $find_chmod_exec = ['-ls', '-exec', 'chmod', '0640', '{}', ';'] | 191 $find_chmod_exec = ['-ls', '-exec', 'chmod', '0640', '{}', ';'] |
| 192 | 192 |
| 193 exec {"set_logfiles_permissions": | 193 exec {"set_logfiles_permissions": |
| 194 command => shellquote($find_chmod_base, $find_chmod_exec), | 194 command => shellquote($find_chmod_base, $find_chmod_exec), |
| 195 unless => shellquote($find_chmod_base, $find_kill_exec), | 195 unless => shellquote($find_chmod_base, $find_kill_exec), |
| 196 subscribe => Service['nginx'], | 196 subscribe => Service['nginx'], |
| 197 } | 197 } |
| 198 | 198 |
| 199 $restart_command = join([ |
| 200 'set -e', |
| 201 'pid=`cat /var/run/nginx.pid`', |
| 202 'kill -USR2 "$pid"', |
| 203 'sleep 2', |
| 204 'kill -QUIT "$pid"', |
| 205 ], "\n") |
| 206 |
| 199 service {'nginx': | 207 service {'nginx': |
| 200 ensure => running, | 208 ensure => running, |
| 201 enable => true, | 209 enable => true, |
| 202 restart => '/etc/init.d/nginx reload', | 210 restart => $restart_command, |
| 203 hasstatus => true, | 211 hasstatus => true, |
| 204 require => File['/etc/nginx/nginx.conf'] | 212 require => Package['nginx'], |
| 205 } | 213 } |
| 206 | 214 |
| 207 file {'/usr/share/nginx/html/50x.html': | 215 file {'/usr/share/nginx/html/50x.html': |
| 208 mode => 0644, | 216 mode => 0644, |
| 209 owner => 'root', | 217 owner => 'root', |
| 210 require => Package['nginx'], | 218 require => Package['nginx'], |
| 211 source => 'puppet:///modules/nginx/50x.html', | 219 source => 'puppet:///modules/nginx/50x.html', |
| 212 } | 220 } |
| 213 } | 221 } |
| OLD | NEW |