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

Unified Diff: modules/geoip/manifests/init.pp

Issue 29783596: #11294 - Include Python packages for GeoIP version 1 and 2 (Closed)
Patch Set: Created May 16, 2018, 12:05 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: modules/geoip/manifests/init.pp
diff --git a/modules/geoip/manifests/init.pp b/modules/geoip/manifests/init.pp
index dcf018ef89c29f719a82ed4a39ba6e9313b5c6be..0f3930890ea5ed422aafa2c9bb4804e95590ba51 100644
--- a/modules/geoip/manifests/init.pp
+++ b/modules/geoip/manifests/init.pp
@@ -34,7 +34,10 @@ class geoip (
$cron = {},
$ensure = 'present',
$hook = undef,
- $packages = ['geoip-database'],
+ $packages = [
+ 'geoip-database',
+ 'python-geoip',
+ ],
$script = '/usr/local/sbin/update-geoip-database',
) {
@@ -42,6 +45,13 @@ class geoip (
ensure => $ensure,
})
+ ensure_resource('package', 'python-geoip2', {
+ ensure => $ensure,
+ name => 'geoip2',
+ provider => 'pip',
+ require => Package['python-pip'],
+ })
+
create_resources('cron', {geoip => $cron}, {
command => $hook ? {undef => $script, default => "$script && $hook"},
ensure => $ensure ? {/^(absent|purged)$/ => 'absent', default => 'present'},
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld