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 $ssl_session_cache = $nginx::params::ssl_session_cache, | 4 $ssl_session_cache = $nginx::params::ssl_session_cache, |
5 $fragment_directory = "/etc/nginx/fragments", | 5 $fragment_directory = "/etc/nginx/fragments", |
6 ) inherits nginx::params { | 6 ) inherits nginx::params { |
7 | 7 |
8 apt::source {'nginx': | 8 apt::source {'nginx': |
9 location => "http://nginx.org/packages/ubuntu", | 9 location => "http://nginx.org/packages/ubuntu", |
10 repos => "nginx", | 10 repos => "nginx", |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 | 52 |
53 define hostconfig-fragment ( | 53 define hostconfig-fragment ( |
54 $domain, | 54 $domain, |
55 $content = undef, | 55 $content = undef, |
56 $ensure = 'present') { | 56 $ensure = 'present') { |
57 | 57 |
58 file {"${$nginx::fragment_directory}/${domain}/${name}.conf": | 58 file {"${$nginx::fragment_directory}/${domain}/${name}.conf": |
59 content => $content, | 59 content => $content, |
60 ensure => $ensure, | 60 ensure => $ensure, |
61 require => File["${nginx::fragment_directory}/${domain}"], | 61 require => File["${nginx::fragment_directory}/${domain}"], |
| 62 notify => Service['nginx'], |
62 } | 63 } |
63 } | 64 } |
64 | 65 |
65 define hostconfig ( | 66 define hostconfig ( |
66 $domain = $title, | 67 $domain = $title, |
67 $alt_names = [], | 68 $alt_names = [], |
68 $log, | 69 $log, |
69 $is_default = false, | 70 $is_default = false, |
70 $source = undef, | 71 $source = undef, |
71 $content = undef, | 72 $content = undef, |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
144 } | 145 } |
145 | 146 |
146 service {'nginx': | 147 service {'nginx': |
147 ensure => running, | 148 ensure => running, |
148 enable => true, | 149 enable => true, |
149 restart => '/etc/init.d/nginx reload', | 150 restart => '/etc/init.d/nginx reload', |
150 hasstatus => true, | 151 hasstatus => true, |
151 require => File['/etc/nginx/nginx.conf'] | 152 require => File['/etc/nginx/nginx.conf'] |
152 } | 153 } |
153 } | 154 } |
LEFT | RIGHT |