]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/geodns/recipes/default.rb
Switch geodns to use GeoIP2
[chef.git] / cookbooks / geodns / recipes / default.rb
index da1acad067078940c85c594d9822c83581994b7c..a2134457ffab3fe5ba7fe3838a982c1c31f4de7b 100644 (file)
 #
 
 package %w[
-  geoip-database-contrib
+  geoipupdate
   gdnsd
 ]
 
+execute "geoipdate" do
+  command "geoipupdate"
+  user "root"
+  group "root"
+  not_if { ::File.exist?("/var/lib/GeoIP/GeoLite2-Country.mmdb") }
+end
+
 template "/etc/gdnsd/config" do
   source "config.erb"
   owner "root"