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

Side by Side Diff: modules/nginx/manifests/init.pp

Issue 29344646: Issue 4073 - Improve Nginx integration with "upstart" service provider (Closed)
Patch Set: Created May 26, 2016, 8:47 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 28 matching lines...) Expand all
39 } 39 }
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'],
Wladimir Palant 2016/05/27 11:15:08 If I see it correctly, you replaced notify here by
mathias 2016/05/27 11:43:53 Beside the notify for the service in this section
Wladimir Palant 2016/05/27 12:33:01 Well, you require the package now - it should inst
mathias 2016/05/27 14:16:16 I do forgive you, but again this is not the full p
Wladimir Palant 2016/05/27 14:41:34 You are free to remove unrelated changes from this
50 notify => Service['nginx']
51 } 50 }
52 51
53 file {'/etc/nginx/sites-available': 52 file {'/etc/nginx/sites-available':
54 ensure => directory, 53 ensure => directory,
55 require => Package['nginx'] 54 require => Package['nginx']
56 } 55 }
57 56
58 file {'/etc/nginx/sites-enabled': 57 file {'/etc/nginx/sites-enabled':
59 ensure => directory, 58 ensure => directory,
60 require => Package['nginx'] 59 require => Package['nginx']
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 181
183 exec {"set_logfiles_permissions": 182 exec {"set_logfiles_permissions":
184 command => shellquote($find_chmod_base, $find_chmod_exec), 183 command => shellquote($find_chmod_base, $find_chmod_exec),
185 unless => shellquote($find_chmod_base, $find_kill_exec), 184 unless => shellquote($find_chmod_base, $find_kill_exec),
186 subscribe => Service['nginx'], 185 subscribe => Service['nginx'],
187 } 186 }
188 187
189 service {'nginx': 188 service {'nginx':
190 ensure => running, 189 ensure => running,
191 enable => true, 190 enable => true,
192 restart => '/etc/init.d/nginx reload', 191 hasrestart => true,
Wladimir Palant 2016/05/27 11:15:08 Do I see it correctly that we will now restart Ngi
mathias 2016/05/27 11:43:53 No, not with Puppet, at least not without a custom
Wladimir Palant 2016/05/27 12:33:01 That's not how I think it works - the original pro
mathias 2016/05/27 14:16:16 Using the restart parameter for this approach is n
Wladimir Palant 2016/05/27 14:41:34 Thank you.
193 hasstatus => true, 192 hasstatus => true,
194 require => File['/etc/nginx/nginx.conf'] 193 require => Package['nginx'],
194 subscribe => File['/etc/nginx/nginx.conf'],
195 } 195 }
196 196
197 file {'/usr/share/nginx/html/50x.html': 197 file {'/usr/share/nginx/html/50x.html':
198 mode => 0644, 198 mode => 0644,
199 owner => 'root', 199 owner => 'root',
200 require => Package['nginx'], 200 require => Package['nginx'],
201 source => 'puppet:///modules/nginx/50x.html', 201 source => 'puppet:///modules/nginx/50x.html',
202 } 202 }
203 } 203 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld