imagery: attempt fix for overlay
authorGrant Slater <git@firefishy.com>
Mon, 30 May 2016 22:44:40 +0000 (23:44 +0100)
committerGrant Slater <git@firefishy.com>
Mon, 30 May 2016 22:44:40 +0000 (23:44 +0100)
cookbooks/imagery/resources/layer.rb

index 86e514cd2842e16c419d47014169af01da9e3876..3ec9a0a7088c6c2bb512eefe86649c211ae369df 100644 (file)
@@ -45,7 +45,7 @@ action :create 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 +57,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