From 63927aa614a2259487982cbe94e2189edc2de206 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Mon, 6 Apr 2020 19:05:34 +0100 Subject: [PATCH 1/1] Avoid template error when no tile siblings are defined --- cookbooks/tilecache/templates/default/nginx_tile.conf.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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] -%> -- 2.39.5