]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/geoipupdate/recipes/default.rb
Allow geoipupdate to access /var/lib/GeoIP
[chef.git] / cookbooks / geoipupdate / recipes / default.rb
index fedae00113522c473890d8cb8d19c16a77e2817f..2b2c23632c1bc97ce1ed2e10766f20b089374556 100644 (file)
@@ -35,7 +35,7 @@ execute "geoipupdate" do
   command "geoipupdate"
   user "root"
   group "root"
-  not_if { ENV.key?("TEST_KITCHEN") || node[:geoipupdate][:editions].all? { |edition| ::File.exist?("/usr/share/GeoIP/#{edition}.mmdb") } }
+  not_if { kitchen? || node[:geoipupdate][:editions].all? { |edition| ::File.exist?("/usr/share/GeoIP/#{edition}.mmdb") } }
 end
 
 systemd_service "geoipupdate" do
@@ -46,7 +46,7 @@ systemd_service "geoipupdate" do
   private_devices true
   protect_system "strict"
   protect_home true
-  read_write_paths "/usr/share/GeoIP"
+  read_write_paths %w[/usr/share/GeoIP /var/lib/GeoIP]
 end
 
 systemd_timer "geoipupdate" do