LEFT | RIGHT |
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 29 matching lines...) Expand all Loading... |
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 => 'puppet:///modules/nginx/logrotate', | 49 source => 'puppet:///modules/nginx/logrotate', |
50 require => File['/etc/nginx/nginx.conf'] | 50 require => Package['nginx'] |
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 } |
LEFT | RIGHT |