OLD | NEW |
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 # Class['ssh'] is assumed to handle SSL-related quirks and therefore | 9 # Class['ssh'] is assumed to handle SSL-related quirks and therefore |
10 # the inclusion here became necessary. | 10 # the inclusion here became necessary. |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 owner => root, | 59 owner => root, |
60 group => root, | 60 group => root, |
61 mode => '0644', | 61 mode => '0644', |
62 } | 62 } |
63 | 63 |
64 Exec { | 64 Exec { |
65 path => '/usr/bin:/bin', | 65 path => '/usr/bin:/bin', |
66 logoutput => 'on_failure', | 66 logoutput => 'on_failure', |
67 } | 67 } |
68 | 68 |
| 69 concat {'/etc/nginx/nginx.conf': |
| 70 require => Package['nginx'], |
| 71 } |
69 | 72 |
70 file {'/etc/nginx/nginx.conf': | 73 concat::fragment {'nginx.conf#main': |
71 content => template('nginx/nginx.conf.erb'), | 74 content => template('nginx/nginx.conf.erb'), |
72 require => Package['nginx'], | 75 notify => Service['nginx'], |
73 notify => Service['nginx'] | 76 order => '10', |
| 77 target => '/etc/nginx/nginx.conf', |
74 } | 78 } |
75 | 79 |
| 80 $modules = hiera_hash('nginx::modules', {}) |
| 81 create_resources('nginx::module', $modules) |
| 82 |
76 file {'/etc/nginx/sites-available': | 83 file {'/etc/nginx/sites-available': |
77 ensure => directory, | 84 ensure => directory, |
78 require => Package['nginx'] | 85 require => Package['nginx'] |
79 } | 86 } |
80 | 87 |
81 file {'/etc/nginx/sites-enabled': | 88 file {'/etc/nginx/sites-enabled': |
82 ensure => directory, | 89 ensure => directory, |
83 require => Package['nginx'] | 90 require => Package['nginx'] |
84 } | 91 } |
85 | 92 |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
235 | 242 |
236 Service['nginx'] <~ Class['ssh'] | 243 Service['nginx'] <~ Class['ssh'] |
237 | 244 |
238 file {'/usr/share/nginx/html/50x.html': | 245 file {'/usr/share/nginx/html/50x.html': |
239 mode => '0644', | 246 mode => '0644', |
240 owner => 'root', | 247 owner => 'root', |
241 require => Package['nginx'], | 248 require => Package['nginx'], |
242 source => 'puppet:///modules/nginx/50x.html', | 249 source => 'puppet:///modules/nginx/50x.html', |
243 } | 250 } |
244 } | 251 } |
OLD | NEW |