X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/f7dd2ecd3757cdad257cda9a292b441d0a3f7b58..3a4b1c2078cd515e93a5f1bf8967f380fbd1646f:/cookbooks/tile/recipes/default.rb diff --git a/cookbooks/tile/recipes/default.rb b/cookbooks/tile/recipes/default.rb index 6cb1b9acb..fc4feb0b6 100644 --- a/cookbooks/tile/recipes/default.rb +++ b/cookbooks/tile/recipes/default.rb @@ -145,7 +145,7 @@ directory "/srv/tile.openstreetmap.org/data" do mode 0755 end -node[:tile][:data].each do |name,data| +node[:tile][:data].each_value do |data| url = data[:url] file = "/srv/tile.openstreetmap.org/data/#{File.basename(url)}" directory = "/srv/tile.openstreetmap.org/data/#{data[:directory]}" @@ -213,7 +213,7 @@ node[:tile][:data].each do |name,data| action :create use_conditional_get true else - action :create_if_missing + action :create_if_missing end source url @@ -235,7 +235,7 @@ directory "/srv/tile.openstreetmap.org/styles" do mode 0755 end -node[:tile][:styles].each do |name,details| +node[:tile][:styles].each do |name, details| style_directory = "/srv/tile.openstreetmap.org/styles/#{name}" tile_directory = "/srv/tile.openstreetmap.org/tiles/#{name}" @@ -355,8 +355,8 @@ end "planet_osm_nodes", "planet_osm_rels", "planet_osm_ways", - "raster_columns", - "raster_overviews", + "raster_columns", + "raster_overviews", "spatial_ref_sys" ].each do |table| postgresql_table table do cluster node[:tile][:database][:cluster] @@ -366,10 +366,10 @@ end end end -[ "geometry_columns", - "planet_osm_line", - "planet_osm_point", - "planet_osm_polygon", +[ "geometry_columns", + "planet_osm_line", + "planet_osm_point", + "planet_osm_polygon", "planet_osm_roads" ].each do |table| postgresql_table table do cluster node[:tile][:database][:cluster] @@ -513,7 +513,7 @@ template "/usr/local/bin/cleanup-tiles" do mode 0755 end -tile_directories = node[:tile][:styles].collect do |name,style| +tile_directories = node[:tile][:styles].collect do |_, style| style[:tile_directories].collect { |directory| directory[:name] } end.flatten.sort.uniq