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

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

Issue 9351014: Add logrotate cronjob to all servers, don`t run logrotate unnecessarily on provisioning and use con… (Closed)
Patch Set: Created Feb. 7, 2013, 3:06 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
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 {
(...skipping 27 matching lines...) Expand all
38 if $enabled == true { 38 if $enabled == true {
39 file {"/etc/nginx/sites-enabled/${file}": 39 file {"/etc/nginx/sites-enabled/${file}":
40 ensure => link, 40 ensure => link,
41 require => File["/etc/nginx/sites-available/${file}"], 41 require => File["/etc/nginx/sites-available/${file}"],
42 target => "/etc/nginx/sites-available/${file}", 42 target => "/etc/nginx/sites-available/${file}",
43 notify => Service['nginx'] 43 notify => Service['nginx']
44 } 44 }
45 } 45 }
46 } 46 }
47 47
48 # file {'/etc/logrotate.d/nginx': 48 file {'/etc/logrotate.d/nginx':
49 # source => 'nginx/logrotate', 49 source => 'puppet:///modules/nginx/logrotate',
50 # require => File['/etc/nginx/nginx.conf'] 50 require => File['/etc/nginx/nginx.conf']
Felix Dahlke 2013/02/07 15:38:41 Why require the file here? Either the package, if
51 # } 51 }
52 52
53 service {'nginx': 53 service {'nginx':
54 ensure => running, 54 ensure => running,
55 enable => true, 55 enable => true,
56 restart => '/etc/init.d/nginx reload', 56 restart => '/etc/init.d/nginx reload',
57 hasstatus => true, 57 hasstatus => true,
58 require => File['/etc/nginx/nginx.conf'] 58 require => File['/etc/nginx/nginx.conf']
59 } 59 }
60 } 60 }
OLDNEW
« modules/logrotate/manifests/init.pp ('K') | « modules/nginx/files/logrotate ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld