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'}, |