From: Grant Slater Date: Thu, 20 Jun 2013 16:25:06 +0000 (+0100) Subject: Teach tilecache cookbook to return caches sorted (deterministic) X-Git-Url: https://git.openstreetmap.org/chef.git/commitdiff_plain/985c2fc143fde1f5c74b587a617baf79e8c58db1 Teach tilecache cookbook to return caches sorted (deterministic) --- 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 -%>