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

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

Issue 29327575: Issue 3062 - Explicitly ensure user "nginx" is present (Closed)
Patch Set: Issue 3062 - Now without accidental inclusion of trac.ini.erb Created Sept. 12, 2015, 1:13 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « modules/filterserver/manifests/init.pp ('k') | modules/notificationserver/manifests/init.pp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 $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
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 }
OLDNEW
« no previous file with comments | « modules/filterserver/manifests/init.pp ('k') | modules/notificationserver/manifests/init.pp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld