X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/32ded0c2d4fe1519cbc94a6f4ae70452b6d3d6f3..bd2c6e857ae00b3df208280e81f4f7e7a9a503dd:/cookbooks/imagery/resources/site.rb diff --git a/cookbooks/imagery/resources/site.rb b/cookbooks/imagery/resources/site.rb index 6478faa52..84151ae66 100644 --- a/cookbooks/imagery/resources/site.rb +++ b/cookbooks/imagery/resources/site.rb @@ -22,6 +22,7 @@ require "yaml" default_action :create property :name, String +property :title, String, :required => true property :aliases, [String, Array], :default => [] property :bbox, Array, :required => true @@ -51,7 +52,7 @@ action :create do user "root" group "root" mode 0644 - variables :title => name + variables :title => title end cookbook_file "/srv/#{name}/imagery.css" do @@ -61,11 +62,21 @@ action :create do mode 0644 end - layers = Dir.glob("/srv/imagery/layers/#{name}/*.yml").collect do |path| - YAML.load(::File.read(path)) + cookbook_file "/srv/#{name}/clientaccesspolicy.xml" do + source "clientaccesspolicy.xml" + user "root" + group "root" + mode 0644 end - overlays = Dir.glob("/srv/imagery/overlays/#{name}/*.yml").collect do |path| + cookbook_file "/srv/#{name}/crossdomain.xml" do + source "crossdomain.xml" + user "root" + group "root" + mode 0644 + end + + layers = Dir.glob("/srv/imagery/layers/#{name}/*.yml").collect do |path| YAML.load(::File.read(path)) end @@ -74,7 +85,7 @@ action :create do user "root" group "root" mode 0644 - variables :bbox => bbox, :layers => layers, :overlays => overlays + variables :bbox => bbox, :layers => layers end nginx_site name do @@ -86,5 +97,5 @@ action :create do end def after_created - notifies :restart, "service[nginx]" + notifies :reload, "service[nginx]" end