]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/apache/providers/module.rb
Ignore spacing in metadata.rb files.
[chef.git] / cookbooks / apache / providers / module.rb
index 31910ed077a919672f5a209ba2dd0ab6311b2ec0..d8072bc6ef84b1e28caaa75f1d80c7af389183aa 100644 (file)
@@ -22,10 +22,8 @@ def whyrun_supported?
 end
 
 action :install do
-  if not installed?
-    package package_name do
-      version new_resource.version
-    end
+  if !installed?
+    package package_name
 
     updated = true
   else
@@ -49,7 +47,7 @@ action :install do
 end
 
 action :enable do
-  if not enabled?
+  unless enabled?
     link enabled_name("load") do
       to available_name("load")
       owner "root"
@@ -62,7 +60,7 @@ action :enable do
       owner "root"
       group "root"
       notifies :reload, "service[apache2]"
-      only_if { ::File.exists?(available_name("conf")) }
+      only_if { ::File.exist?(available_name("conf")) }
     end
 
     new_resource.updated_by_last_action(true)
@@ -108,9 +106,9 @@ def enabled_name(extension)
 end
 
 def installed?
-  ::File.exists?(available_name("load"))
+  ::File.exist?(available_name("load"))
 end
 
 def enabled?
-  ::File.exists?(enabled_name("load"))
+  ::File.exist?(enabled_name("load"))
 end