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

Unified Diff: modules/web/manifests/server.pp

Issue 29326153: Issue 3011 - Integrate GeoIP with Nginx configuration (Closed)
Patch Set: Created Sept. 8, 2015, 6:19 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « modules/nginx/templates/nginx.conf.erb ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: modules/web/manifests/server.pp
diff --git a/modules/web/manifests/server.pp b/modules/web/manifests/server.pp
index b56264d75f8b17ee441a9b88aa6ebb6c396a4a17..ac1b45b40696fd60fae92a670f4d8a4efd0f1db1 100644
--- a/modules/web/manifests/server.pp
+++ b/modules/web/manifests/server.pp
@@ -6,7 +6,10 @@ class web::server(
$is_default = false,
$aliases = undef,
$custom_config = undef,
- $multiplexer_locations = undef) {
+ $multiplexer_locations = undef,
+ $geoip = false,
+) {
+
File {
owner => 'root',
group => 'root',
@@ -17,7 +20,17 @@ class web::server(
environment => ['MAILTO=admins@adblockplus.org', 'PYTHONPATH=/opt/cms:/opt/sitescripts'],
}
- include nginx
+ class {'nginx':
+ geoip_country => $geoip ? {
+ false => undef,
+ default => '/usr/share/GeoIP/GeoIPv6.dat',
+ },
+ }
+
+ class {'geoip':
+ cron => {hour => 0, minute => 8, monthday => 15},
+ ensure => $geoip ? {false => 'absent', default => 'present'},
+ }
package {['python-jinja2', 'python-markdown']:}
« no previous file with comments | « modules/nginx/templates/nginx.conf.erb ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld