| 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 apt::ppa {'ppa:nginx/stable': | 9 apt::ppa {'ppa:nginx/stable': |
| 10 } | 10 } |
| 11 | 11 |
| 12 apt::source {'nginx': | 12 apt::source {'nginx': |
| 13 ensure => 'absent', | 13 ensure => 'absent', |
| 14 } | 14 } |
| 15 | 15 |
| 16 exec {'purge-nginx': | 16 exec {'purge-nginx': |
| 17 command => '/usr/bin/apt-get -y purge nginx', | 17 command => '/usr/bin/apt-get -y purge nginx', |
| 18 logoutput => true, | 18 logoutput => true, |
| 19 path => '/usr/sbin:/usr/bin:/sbin:/bin', | 19 path => '/usr/sbin:/usr/bin:/sbin:/bin', |
| 20 refreshonly => true, | 20 refreshonly => true, |
| 21 returns => [0, 100], | 21 returns => [0, 100], |
| 22 subscribe => Apt::Ppa['ppa:nginx/stable'], | 22 subscribe => Apt::Ppa['ppa:nginx/stable'], |
| 23 } | 23 } |
| 24 | 24 |
| 25 package {'nginx': | 25 package {'nginx': |
| 26 ensure => '1.8.0-1+precise1', | 26 ensure => '1.8.0-1+precise1', |
| 27 require => Exec['purge-nginx'], | 27 require => Exec['purge-nginx'], |
| 28 } | 28 } |
| 29 | 29 |
| 30 user {'nginx': |
| 31 ensure => 'present', |
| 32 require => Package['nginx'], |
| 33 } |
| 34 |
| 30 File { | 35 File { |
| 31 owner => root, | 36 owner => root, |
| 32 group => root, | 37 group => root, |
| 33 mode => 0644, | 38 mode => 0644, |
| 34 } | 39 } |
| 35 | 40 |
| 36 Exec { | 41 Exec { |
| 37 path => '/usr/bin:/bin', | 42 path => '/usr/bin:/bin', |
| 38 logoutput => 'on_failure', | 43 logoutput => 'on_failure', |
| 39 } | 44 } |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 176 } | 181 } |
| 177 | 182 |
| 178 service {'nginx': | 183 service {'nginx': |
| 179 ensure => running, | 184 ensure => running, |
| 180 enable => true, | 185 enable => true, |
| 181 restart => '/etc/init.d/nginx reload', | 186 restart => '/etc/init.d/nginx reload', |
| 182 hasstatus => true, | 187 hasstatus => true, |
| 183 require => File['/etc/nginx/nginx.conf'] | 188 require => File['/etc/nginx/nginx.conf'] |
| 184 } | 189 } |
| 185 } | 190 } |
| OLD | NEW |