Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Delta Between Two Patch Sets: modules/nginx/manifests/init.pp

Issue 29344646: Issue 4073 - Improve Nginx integration with "upstart" service provider (Closed)
Left Patch Set: Issue 4073 - Address feedback from code-review Created May 27, 2016, 3:32 p.m.
Right Patch Set: Issue 4073 - Address feedback from code-review Created May 27, 2016, 4:03 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « no previous file | no next file » | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
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 29 matching lines...) Expand all
40 40
41 Exec { 41 Exec {
42 path => '/usr/bin:/bin', 42 path => '/usr/bin:/bin',
43 logoutput => 'on_failure', 43 logoutput => 'on_failure',
44 } 44 }
45 45
46 46
47 file {'/etc/nginx/nginx.conf': 47 file {'/etc/nginx/nginx.conf':
48 content => template('nginx/nginx.conf.erb'), 48 content => template('nginx/nginx.conf.erb'),
49 require => Package['nginx'], 49 require => Package['nginx'],
50 notify => Service['nginx']
50 } 51 }
51 52
52 file {'/etc/nginx/sites-available': 53 file {'/etc/nginx/sites-available':
53 ensure => directory, 54 ensure => directory,
54 require => Package['nginx'] 55 require => Package['nginx']
55 } 56 }
56 57
57 file {'/etc/nginx/sites-enabled': 58 file {'/etc/nginx/sites-enabled':
58 ensure => directory, 59 ensure => directory,
59 require => Package['nginx'] 60 require => Package['nginx']
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 exec {"set_logfiles_permissions": 193 exec {"set_logfiles_permissions":
193 command => shellquote($find_chmod_base, $find_chmod_exec), 194 command => shellquote($find_chmod_base, $find_chmod_exec),
194 unless => shellquote($find_chmod_base, $find_kill_exec), 195 unless => shellquote($find_chmod_base, $find_kill_exec),
195 subscribe => Service['nginx'], 196 subscribe => Service['nginx'],
196 } 197 }
197 198
198 $restart_command = join([ 199 $restart_command = join([
199 'set -e', 200 'set -e',
200 'pid=`cat /var/run/nginx.pid`', 201 'pid=`cat /var/run/nginx.pid`',
201 'kill -USR2 "$pid"', 202 'kill -USR2 "$pid"',
202 'sleep 1', 203 'sleep 2',
203 'kill -QUIT "$pid"', 204 'kill -QUIT "$pid"',
204 ], "\n") 205 ], "\n")
205 206
206 service {'nginx': 207 service {'nginx':
207 ensure => running, 208 ensure => running,
208 enable => true, 209 enable => true,
210 restart => $restart_command,
209 hasstatus => true, 211 hasstatus => true,
210 require => Package['nginx'], 212 require => Package['nginx'],
211 restart => $restart_command,
212 subscribe => File['/etc/nginx/nginx.conf'],
213 } 213 }
214 214
215 file {'/usr/share/nginx/html/50x.html': 215 file {'/usr/share/nginx/html/50x.html':
216 mode => 0644, 216 mode => 0644,
217 owner => 'root', 217 owner => 'root',
218 require => Package['nginx'], 218 require => Package['nginx'],
219 source => 'puppet:///modules/nginx/50x.html', 219 source => 'puppet:///modules/nginx/50x.html',
220 } 220 }
221 } 221 }
LEFTRIGHT
« no previous file | no next file » | Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Toggle Comments ('s')

Powered by Google App Engine
This is Rietveld