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

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

Issue 9321092: Make sure nginx is properly restarted when the configuration changes (Closed)
Patch Set: Created Feb. 6, 2013, 9:50 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
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 ) inherits nginx::params { 4 ) inherits nginx::params {
5 5
6 package {'nginx': 6 package {'nginx':
7 ensure => present 7 ensure => present
8 } 8 }
9 9
10 File { 10 File {
11 owner => root, 11 owner => root,
12 group => root, 12 group => root,
13 mode => 0644, 13 mode => 0644,
14 } 14 }
15 15
16 file {'/etc/nginx/nginx.conf': 16 file {'/etc/nginx/nginx.conf':
17 content => template('nginx/nginx.conf.erb'), 17 content => template('nginx/nginx.conf.erb'),
18 require => Package['nginx'] 18 require => Package['nginx'],
19 notify => Service['nginx']
19 } 20 }
20 21
21 file {'/etc/nginx/sites-available/default': 22 file {'/etc/nginx/sites-available/default':
22 ensure => absent, 23 ensure => absent,
23 require => Package['nginx'] 24 require => Package['nginx']
24 } 25 }
25 26
26 # file {'/etc/nginx/sites-enabled/default': 27 # file {'/etc/nginx/sites-enabled/default':
27 # ensure => absent, 28 # ensure => absent,
28 # } 29 # }
(...skipping 20 matching lines...) Expand all
49 # require => File['/etc/nginx/nginx.conf'] 50 # require => File['/etc/nginx/nginx.conf']
50 # } 51 # }
51 52
52 service {'nginx': 53 service {'nginx':
53 ensure => running, 54 ensure => running,
54 enable => true, 55 enable => true,
55 hasrestart => true, 56 hasrestart => true,
56 hasstatus => true, 57 hasstatus => true,
57 require => File['/etc/nginx/nginx.conf'] 58 require => File['/etc/nginx/nginx.conf']
58 } 59 }
59
60 anchor {'nginx::begin':
61 before => Package['nginx']
62 }
63
64 anchor {'nginx::end':
65 require => Package['nginx'],
66 notify => Service['nginx']
67 }
68
69 } 60 }
OLDNEW
« modules/filterserver/manifests/init.pp ('K') | « modules/filterserver/manifests/init.pp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld