From: Grant Slater Date: Wed, 1 Jun 2016 21:48:28 +0000 (+0100) Subject: imagery: let templates expand [abc]. domain X-Git-Url: https://git.openstreetmap.org./chef.git/commitdiff_plain/98ecb8199d04234e3db39ec751aa7b342fcc93c1 imagery: let templates expand [abc]. domain --- diff --git a/cookbooks/imagery/recipes/au_agri.rb b/cookbooks/imagery/recipes/au_agri.rb index e3cc9fce8..fd1606173 100644 --- a/cookbooks/imagery/recipes/au_agri.rb +++ b/cookbooks/imagery/recipes/au_agri.rb @@ -21,7 +21,6 @@ include_recipe "imagery" imagery_site "agri.openstreetmap.org" do title "OpenStreetMap - The Australian Geographic Reference Image" - aliases ["a.agri.openstreetmap.org", "b.agri.openstreetmap.org", "c.agri.openstreetmap.org"] bbox [[-44.74673, 111.5332], [-9.75237, 154.6875]] end diff --git a/cookbooks/imagery/recipes/gb_hampshire_aerial.rb b/cookbooks/imagery/recipes/gb_hampshire_aerial.rb index 99f381d51..8f304c88b 100644 --- a/cookbooks/imagery/recipes/gb_hampshire_aerial.rb +++ b/cookbooks/imagery/recipes/gb_hampshire_aerial.rb @@ -21,7 +21,6 @@ include_recipe "imagery" imagery_site "hampshire.aerial.openstreetmap.org.uk" do title "OpenStreetMap - Hampshire Hub Aerial" - aliases ["a.hampshire.aerial.openstreetmap.org.uk", "b.hampshire.aerial.openstreetmap.org.uk", "c.hampshire.aerial.openstreetmap.org.uk"] bbox [[50.68993, -1.97823], [51.39492, -0.70724]] end diff --git a/cookbooks/imagery/recipes/gb_os_sv.rb b/cookbooks/imagery/recipes/gb_os_sv.rb index 7b99213ad..83b4de210 100644 --- a/cookbooks/imagery/recipes/gb_os_sv.rb +++ b/cookbooks/imagery/recipes/gb_os_sv.rb @@ -43,7 +43,7 @@ end imagery_site "os.openstreetmap.org" do title "OpenStreetMap - Ordnance Survey OpenData - Street View" - aliases ["os.openstreetmap.org", "a.os.openstreetmap.org", "b.os.openstreetmap.org", "c.os.openstreetmap.org", "os.openstreetmap.org.uk", "a.os.openstreetmap.org.uk", "b.os.openstreetmap.org.uk", "c.os.openstreetmap.org.uk"] + aliases ["os.openstreetmap.org.uk"] bbox [[49.85, -10.5], [58.75, 1.9]] end diff --git a/cookbooks/imagery/recipes/gb_surrey_aerial.rb b/cookbooks/imagery/recipes/gb_surrey_aerial.rb index 1608dd93c..1ea762715 100644 --- a/cookbooks/imagery/recipes/gb_surrey_aerial.rb +++ b/cookbooks/imagery/recipes/gb_surrey_aerial.rb @@ -21,7 +21,6 @@ include_recipe "imagery" imagery_site "surrey.aerial.openstreetmap.org.uk" do title "OpenStreetMap - Surrey Air Survey - 2009" - aliases ["a.surrey.aerial.openstreetmap.org.uk", "b.surrey.aerial.openstreetmap.org.uk", "c.surrey.aerial.openstreetmap.org.uk"] bbox [[51.06686, -0.85762], [51.47753, 0.06592]] end diff --git a/cookbooks/imagery/resources/layer.rb b/cookbooks/imagery/resources/layer.rb index d66440b93..46b584e1d 100644 --- a/cookbooks/imagery/resources/layer.rb +++ b/cookbooks/imagery/resources/layer.rb @@ -52,7 +52,7 @@ action :create do end content YAML.dump(:name => layer, :title => title || layer, - :url => "http://#{site}/layer/#{layer}/{z}/{x}/{y}.png", + :url => "http://{s}.#{site}/layer/#{layer}/{z}/{x}/{y}.png", :attribution => copyright, :default => default_layer, :maxZoom => max_zoom) diff --git a/cookbooks/imagery/templates/default/nginx_imagery.conf.erb b/cookbooks/imagery/templates/default/nginx_imagery.conf.erb index 42994a6fc..1e9415825 100644 --- a/cookbooks/imagery/templates/default/nginx_imagery.conf.erb +++ b/cookbooks/imagery/templates/default/nginx_imagery.conf.erb @@ -1,6 +1,6 @@ server { listen 80; - server_name <%= @name %> a.<%= @name %> b.<%= @name %> c.<%= @name %><% @aliases.each do |alias_name| %> <%= alias_name %><%- end -%>; + server_name <%= @name %> a.<%= @name %> b.<%= @name %> c.<%= @name %><% @aliases.each do |alias_name| %> <%= alias_name %> a.<%= alias_name %> b.<%= alias_name %> c.<%= alias_name %><%- end -%>; root "/srv/<%= @name %>";