]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/geoipupdate/attributes/default.rb
Make the GeoIP database directory vary with the OS version
[chef.git] / cookbooks / geoipupdate / attributes / default.rb
index 3165aa1153feb31f32a821ca74d81f17bd27e317..315dfe1463f207195966e4a3156f5bf1e856296c 100644 (file)
@@ -1,4 +1,9 @@
 default[:geoipupdate][:account] = "149244"
 default[:geoipupdate][:editions] = %w[GeoLite2-ASN GeoLite2-City GeoLite2-Country]
+default[:geoipupdate][:directory] = if node[:lsb][:release].to_f < 22.04
+                                      "/usr/share/GeoIP"
+                                    else
+                                      "/var/lib/GeoIP"
+                                    end
 
 default[:apt][:sources] |= ["maxmind"]