From: Tom Hughes Date: Thu, 25 Aug 2016 20:19:55 +0000 (+0100) Subject: Avoid cloning directory resources in the tile recipe X-Git-Url: https://git.openstreetmap.org./chef.git/commitdiff_plain/5484f64dfab168ab94af4c077e9ce178b659f6a2?hp=4a78565948891c672bfdd5fc720a2395a547543f Avoid cloning directory resources in the tile recipe --- diff --git a/cookbooks/tile/recipes/default.rb b/cookbooks/tile/recipes/default.rb index c9f4d1371..0a703017c 100644 --- a/cookbooks/tile/recipes/default.rb +++ b/cookbooks/tile/recipes/default.rb @@ -158,12 +158,17 @@ package "mapnik-utils" 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]}" - directory directory do - owner "tile" - group "tile" - mode 0o755 + if data[:directory] + directory = "/srv/tile.openstreetmap.org/data/#{data[:directory]}" + + directory directory do + owner "tile" + group "tile" + mode 0o755 + end + else + directory = "/srv/tile.openstreetmap.org/data" end if file =~ /\.tgz$/