Left: | ||
Right: |
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 ) inherits nginx::params { | 5 ) inherits nginx::params { |
6 | 6 |
7 apt::source {'nginx': | 7 apt::source {'nginx': |
8 location => "http://nginx.org/packages/ubuntu", | 8 location => "http://nginx.org/packages/ubuntu", |
9 repos => "nginx", | 9 repos => "nginx", |
10 key => "7BD9BF62", | 10 key => "7BD9BF62", |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
112 require => File["/etc/nginx/sites-available/${domain}"], | 112 require => File["/etc/nginx/sites-available/${domain}"], |
113 content => template('nginx/logrotate.erb') | 113 content => template('nginx/logrotate.erb') |
114 } | 114 } |
115 } | 115 } |
116 | 116 |
117 file {'/etc/logrotate.d/nginx': | 117 file {'/etc/logrotate.d/nginx': |
118 source => 'puppet:///modules/nginx/logrotate', | 118 source => 'puppet:///modules/nginx/logrotate', |
119 require => Package['nginx'] | 119 require => Package['nginx'] |
120 } | 120 } |
121 | 121 |
122 exec {"set_logfiles_owner_and_permissions": | |
123 command => '/bin/chown www-data.adm /var/log/nginx/* && /bin/chmod 0640 /var /log/nginx/*', | |
mathias
2015/07/03 13:51:04
Except for intermediate fixes, please do not use s
Fred
2015/07/06 16:11:52
Acknowledged.
| |
124 # this should all be provided by package nginx: | |
125 # require => [File['/var/log/nginx'], User['www-data'], Group['adm']] | |
mathias
2015/07/03 13:51:04
This comment is both wrong (neither User['www-data
Fred
2015/07/06 16:11:52
Acknowledged.
| |
126 require => Package['nginx'] | |
mathias
2015/07/03 13:51:04
Please always use trailing commas, even when defin
Fred
2015/07/06 16:11:52
Acknowledged.
| |
127 } | |
128 | |
122 service {'nginx': | 129 service {'nginx': |
123 ensure => running, | 130 ensure => running, |
124 enable => true, | 131 enable => true, |
125 restart => '/etc/init.d/nginx reload', | 132 restart => '/etc/init.d/nginx reload', |
126 hasstatus => true, | 133 hasstatus => true, |
127 require => File['/etc/nginx/nginx.conf'] | 134 require => File['/etc/nginx/nginx.conf'] |
128 } | 135 } |
129 } | 136 } |
OLD | NEW |