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]}"
action :create
use_conditional_get true
else
- action :create_if_missing
+ action :create_if_missing
end
source url
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}"
"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]
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]
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