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

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

Issue 29785567: #11294 - Generate and store anonymized HTTPd logs (Closed)
Patch Set: #11294 - Remove $adblockplus::web::server::geoip parameter Created June 5, 2018, 1:46 p.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 | « hiera/roles/web/adblockplus.yaml ('k') | modules/nginx/templates/logrotate.erb » ('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 # 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.
11 include ssh 11 include ssh
12 12
13 # Class['geoip'] is always required ever since we're archiving anonymized
14 # logs only, which requires querying the country database before the IP is
15 # removed from the record. See modules/nginx/templates/logrotate.erb --
16 include geoip
17
13 package {'nginx': 18 package {'nginx':
14 ensure => 'latest', 19 ensure => 'latest',
15 } 20 }
16 21
17 if $::lsbdistcodename == 'precise' { 22 if $::lsbdistcodename == 'precise' {
18 23
19 apt::ppa {'ppa:nginx/stable': 24 apt::ppa {'ppa:nginx/stable':
20 } 25 }
21 26
22 apt::source {'nginx': 27 apt::source {'nginx':
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 notify => Service['nginx'], 109 notify => Service['nginx'],
105 require => Package['nginx'], 110 require => Package['nginx'],
106 source => 'puppet:///modules/private/dhe_rsa_export.pem', 111 source => 'puppet:///modules/private/dhe_rsa_export.pem',
107 } 112 }
108 113
109 define hostconfig ( 114 define hostconfig (
110 $domain = $title, 115 $domain = $title,
111 $alt_names = [], 116 $alt_names = [],
112 $log, 117 $log,
113 $log_format = 'main', 118 $log_format = 'main',
119 $log_salt = hiera('adblockplus::log::salt', 'changeme'),
114 $is_default = false, 120 $is_default = false,
115 $source = undef, 121 $source = undef,
116 $content = undef, 122 $content = undef,
117 $global_config = undef, 123 $global_config = undef,
118 $certificate = undef, 124 $certificate = undef,
119 $private_key = undef, 125 $private_key = undef,
120 $enabled = true) { 126 $enabled = true) {
121 file {"/etc/nginx/sites-available/${domain}": 127 file {"/etc/nginx/sites-available/${domain}":
122 ensure => file, 128 ensure => file,
123 content => template('nginx/site.erb'), 129 content => template('nginx/site.erb'),
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 require => Package['nginx'], 256 require => Package['nginx'],
251 source => 'puppet:///modules/nginx/50x.html', 257 source => 'puppet:///modules/nginx/50x.html',
252 } 258 }
253 259
254 file {'/usr/local/bin/anonymize-access-log': 260 file {'/usr/local/bin/anonymize-access-log':
255 group => 'root', 261 group => 'root',
256 mode => '0755', 262 mode => '0755',
257 owner => 'root', 263 owner => 'root',
258 source => 'puppet:///modules/nginx/anonymize-access-log.py', 264 source => 'puppet:///modules/nginx/anonymize-access-log.py',
259 } 265 }
266
267 file {'/var/log/archive':
268 ensure => 'directory',
269 group => 'adm',
270 mode => '0750',
271 owner => 'root',
272 }
260 } 273 }
OLDNEW
« no previous file with comments | « hiera/roles/web/adblockplus.yaml ('k') | modules/nginx/templates/logrotate.erb » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld