]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/geodns/recipes/default.rb
Add support for distributing gdnsd configuration via rsync
[chef.git] / cookbooks / geodns / recipes / default.rb
index 925b47c4297fd95010165e2e18b1517a55d5b415..9f7c100c5b6b0f8eff17db8f455b6564b7442383 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
+
+directory "/etc/gdnsd/config.d" do
+  owner "nobody"
+  group "nogroup"
+  mode 0o755
+end
+
 template "/etc/gdnsd/config" do
   source "config.erb"
   owner "root"