From 985c2fc143fde1f5c74b587a617baf79e8c58db1 Mon Sep 17 00:00:00 2001 From: Grant Slater Date: Thu, 20 Jun 2013 17:25:06 +0100 Subject: [PATCH 1/1] Teach tilecache cookbook to return caches sorted (deterministic) --- cookbooks/tilecache/recipes/default.rb | 2 +- cookbooks/tilecache/templates/default/squid.conf.erb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cookbooks/tilecache/recipes/default.rb b/cookbooks/tilecache/recipes/default.rb index 23edf0155..5b44be21f 100644 --- a/cookbooks/tilecache/recipes/default.rb +++ b/cookbooks/tilecache/recipes/default.rb @@ -19,7 +19,7 @@ include_recipe "squid" -tilecaches = search(:node, "roles:tilecache") +tilecaches = search(:node, "roles:tilecache").sort_by { |n| n[:hostname] } squid_fragment "tilecache" do template "squid.conf.erb" diff --git a/cookbooks/tilecache/templates/default/squid.conf.erb b/cookbooks/tilecache/templates/default/squid.conf.erb index aac9a45bc..e2f74b6e8 100644 --- a/cookbooks/tilecache/templates/default/squid.conf.erb +++ b/cookbooks/tilecache/templates/default/squid.conf.erb @@ -20,7 +20,7 @@ cache_peer_access osmtileFileAccel deny all acl pool_unlimited src 127.0.0.1 <% @caches.each do |cache| -%> <% cache.ipaddresses(:family => :inet, :role => :external) do |address| -%> - acl pool_unlimited src <%= address %> +acl pool_unlimited src <%= address %> <% end -%> <% end -%> -- 2.43.2