X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/812821485c08e929115abf90da068ecf21da78ec..a3ccfefb246b6dc5999d2f8ce34b9eb37dcfae5d:/cookbooks/imagery/resources/layer.rb?ds=sidebyside diff --git a/cookbooks/imagery/resources/layer.rb b/cookbooks/imagery/resources/layer.rb index 86e514cd2..b9ffd6772 100644 --- a/cookbooks/imagery/resources/layer.rb +++ b/cookbooks/imagery/resources/layer.rb @@ -40,12 +40,11 @@ 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" @@ -57,7 +56,7 @@ action :create do 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