Qualify property access
authorTom Hughes <tom@compton.nu>
Wed, 12 Sep 2018 18:43:24 +0000 (19:43 +0100)
committerTom Hughes <tom@compton.nu>
Wed, 12 Sep 2018 18:43:24 +0000 (19:43 +0100)
cookbooks/systemd/resources/service.rb

index c31b6d0..772999f 100644 (file)
@@ -97,7 +97,7 @@ end
 action :delete do
   file "/etc/default/#{new_resource.service}" do
     action :delete
-    only_if { environment_file.is_a?(Hash) }
+    only_if { new_resource.environment_file.is_a?(Hash) }
   end
 
   file "/etc/systemd/system/#{new_resource.service}.service" do