]> git.openstreetmap.org Git - chef.git/commitdiff
Update coastline data when it changes
authorTom Hughes <tom@compton.nu>
Tue, 27 Aug 2013 18:09:25 +0000 (19:09 +0100)
committerTom Hughes <tom@compton.nu>
Tue, 27 Aug 2013 18:09:25 +0000 (19:09 +0100)
cookbooks/tile/recipes/default.rb
roles/tile.rb

index 3ad897448ca803c7568446fd408d058037564108..cd88e91ceb3c779b81c2be54c7bb809f5c292ae2 100644 (file)
@@ -199,7 +199,13 @@ node[:tile][:data].each do |name,data|
   end
 
   remote_file file do
-    action :create_if_missing 
+    if data[:refresh]
+      action :create
+      use_conditional_get true
+    else
+      action :create_if_missing 
+    end
+
     source url
     owner "tile"
     group "tile"
index ffd69239d1d5fc504273007a2aaee573cb01e054..eda39b1c307e7bd32d7b988588c990d8f7c462fc 100644 (file)
@@ -55,7 +55,8 @@ default_attributes(
         :url => "http://planet.openstreetmap.org/historical-shapefiles/world_boundaries-spherical.tgz"
       },
       :simplified_land_polygons => {
-        :url => "http://data.openstreetmapdata.com/simplified-land-polygons-complete-3857.zip"
+        :url => "http://data.openstreetmapdata.com/simplified-land-polygons-complete-3857.zip",
+        :refresh => true
       },
       :admin_boundaries => {
         :url => "http://www.naturalearthdata.com/http//www.naturalearthdata.com/download/110m/cultural/ne_110m_admin_0_boundary_lines_land.zip",
@@ -68,7 +69,8 @@ default_attributes(
         :processed => "ne_10m_populated_places_fixed.shp"
       },
       :land_polygons => {
-        :url => "http://data.openstreetmapdata.com/land-polygons-split-3857.zip"
+        :url => "http://data.openstreetmapdata.com/land-polygons-split-3857.zip",
+        :refresh => true
       }
     },
     :styles => {