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

Side by Side Diff: modules/web/manifests/server.pp

Issue 29329120: Issue 123 - Integrate website cron::envrionment with Hiera (Closed)
Patch Set: Created Oct. 14, 2015, 4:55 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 | « modules/sitescripts/manifests/init.pp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 class web::server( 1 class web::server(
2 $vhost, 2 $vhost,
3 $repository, 3 $repository,
4 $certificate = hiera('web::server::certificate', 'undef'), 4 $certificate = hiera('web::server::certificate', 'undef'),
5 $private_key = hiera('web::server::private_key', 'undef'), 5 $private_key = hiera('web::server::private_key', 'undef'),
6 $is_default = false, 6 $is_default = false,
7 $aliases = undef, 7 $aliases = undef,
8 $custom_config = undef, 8 $custom_config = undef,
9 $multiplexer_locations = undef, 9 $multiplexer_locations = undef,
10 $geoip = false, 10 $geoip = false,
11 ) { 11 ) {
12 12
13 # Ensure there is at least one character in the respective strings; 13 # Ensure there is at least one character in the respective strings;
14 # see https://codereview.adblockplus.org/29329028/#msg3 14 # see https://codereview.adblockplus.org/29329028/#msg3
15 validate_re($vhost, '.+') 15 validate_re($vhost, '.+')
16 validate_re($repository, '.+') 16 validate_re($repository, '.+')
17 17
18 File { 18 File {
19 owner => 'root', 19 owner => 'root',
20 group => 'root', 20 group => 'root',
21 mode => 0644, 21 mode => 0644,
22 } 22 }
23 23
24 Cron { 24 Cron {
25 environment => ['MAILTO=admins@adblockplus.org', 'PYTHONPATH=/opt/cms:/opt/s itescripts'], 25 environment => concat(hiera('cron::environment', []), [
26 'PYTHONPATH=/opt/cms:/opt/sitescripts',
27 ]),
26 } 28 }
27 29
28 class {'nginx': 30 class {'nginx':
29 geoip_country => $geoip ? { 31 geoip_country => $geoip ? {
30 false => undef, 32 false => undef,
31 default => '/usr/share/GeoIP/GeoIPv6.dat', 33 default => '/usr/share/GeoIP/GeoIPv6.dat',
32 }, 34 },
33 } 35 }
34 36
35 class {'geoip': 37 class {'geoip':
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 minute => '5-55/10', 116 minute => '5-55/10',
115 } 117 }
116 118
117 cron {'update_repo': 119 cron {'update_repo':
118 ensure => present, 120 ensure => present,
119 command => "hg pull -q -R /home/www/${repository} && python -m cms.bin.gener ate_static_pages /home/www/${repository} /var/www/${vhost}", 121 command => "hg pull -q -R /home/www/${repository} && python -m cms.bin.gener ate_static_pages /home/www/${repository} /var/www/${vhost}",
120 user => www, 122 user => www,
121 minute => '*/10', 123 minute => '*/10',
122 } 124 }
123 } 125 }
OLDNEW
« no previous file with comments | « modules/sitescripts/manifests/init.pp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld