X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/1a971cb3bac5bfc65c837b143cff3e5bfdd64a12..a3ccfefb246b6dc5999d2f8ce34b9eb37dcfae5d:/cookbooks/imagery/resources/layer.rb diff --git a/cookbooks/imagery/resources/layer.rb b/cookbooks/imagery/resources/layer.rb index d2aa62a34..b9ffd6772 100644 --- a/cookbooks/imagery/resources/layer.rb +++ b/cookbooks/imagery/resources/layer.rb @@ -40,24 +40,23 @@ property :revision, Fixnum, :default => 1 property :overlay, [TrueClass, FalseClass], :default => false action :create do - file "create layer yaml definition" do owner "root" group "root" mode 0644 - if @overlay + if new_resource.overlay path "/srv/imagery/overlays/#{site}/#{layer}.yml" else path "/srv/imagery/layers/#{site}/#{layer}.yml" end content YAML.dump(:name => layer, - :url => "http://#{site}/layer/#{layer}/{z}/{x}/{y}.#{extension}", + :url => "http://#{site}/layer/#{layer}/{z}/{x}/{y}.png", :attribution => copyright, :maxZoom => max_zoom) end file "remove old layer yaml" do - if @overlay + if new_resource.overlay path "/srv/imagery/layers/#{site}/#{layer}.yml" # remove layer if overlay else path "/srv/imagery/overlays/#{site}/#{layer}.yml" # remove overlay if layer