From: Tom Hughes Date: Mon, 6 Apr 2020 18:05:34 +0000 (+0100) Subject: Avoid template error when no tile siblings are defined X-Git-Url: https://git.openstreetmap.org./chef.git/commitdiff_plain/63927aa614a2259487982cbe94e2189edc2de206?ds=inline;hp=89344ae0c4f9114d07522330882b1b38da80d5c5 Avoid template error when no tile siblings are defined --- diff --git a/cookbooks/tilecache/templates/default/nginx_tile.conf.erb b/cookbooks/tilecache/templates/default/nginx_tile.conf.erb index 9202bf3e5..5c4183820 100644 --- a/cookbooks/tilecache/templates/default/nginx_tile.conf.erb +++ b/cookbooks/tilecache/templates/default/nginx_tile.conf.erb @@ -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] -%>