]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/geoipupdate/recipes/default.rb
Use strings for file modes
[chef.git] / cookbooks / geoipupdate / recipes / default.rb
index 0c4a84c9cc1eb11297b12ba8668ffda10a1d9884..b27b439b6da53a9e921e5175735a541ce7ae5aa9 100644 (file)
@@ -21,15 +21,13 @@ include_recipe "apt"
 
 license_keys = data_bag_item("geoipupdate", "license-keys")
 
-package "geoipupdate" do
-  action [:install, :upgrade]
-end
+package "geoipupdate"
 
 template "/etc/GeoIP.conf" do
   source "GeoIP.conf.erb"
   owner "root"
   group "root"
-  mode 0o644
+  mode "644"
   variables :license_keys => license_keys
 end
 
@@ -37,7 +35,7 @@ execute "geoipdate" do
   command "geoipupdate"
   user "root"
   group "root"
-  not_if { node[:geoipupdate][:editions].all? { |edition| ::File.exist?("/usr/share/GeoIP/#{edition}.mmdb") } }
+  not_if { ENV.key?("TEST_KITCHEN") || node[:geoipupdate][:editions].all? { |edition| ::File.exist?("/usr/share/GeoIP/#{edition}.mmdb") } }
 end
 
 directory "/var/lib/GeoIP" do