]> git.openstreetmap.org Git - chef.git/commitdiff
Avoid template error when no tile siblings are defined
authorTom Hughes <tom@compton.nu>
Mon, 6 Apr 2020 18:05:34 +0000 (19:05 +0100)
committerTom Hughes <tom@compton.nu>
Mon, 6 Apr 2020 18:05:34 +0000 (19:05 +0100)
cookbooks/tilecache/templates/default/nginx_tile.conf.erb

index 9202bf3e5b239b5118a6adae66795cbcd9212fd8..5c4183820526a4e16709e559779386641e21b24f 100644 (file)
@@ -7,7 +7,7 @@ upstream tile_cache_backend {
   # Add the tile_siblings caches to relieve pressure if local squid failing
   # Balancer: round-robin
 <% server_weight = 1000 -%>
-<% @node[:tilecache][:tile_siblings].each do |cache_peer| -%>
+<% Array(@node[:tilecache][:tile_siblings]).each do |cache_peer| -%>
 <% @caches.each do |cache| -%>
 <% if cache_peer == cache[:fqdn] -%>
 <% if cache[:hostname] != node[:hostname] -%>