X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/8f8cacc7c0d8e4eb82abb33d9a536a7382e435a6..ea0715b4be41a1d1600bba7a1f5d0b988708579f:/cookbooks/apache/providers/module.rb diff --git a/cookbooks/apache/providers/module.rb b/cookbooks/apache/providers/module.rb index 17008371e..0a85f7ee4 100644 --- a/cookbooks/apache/providers/module.rb +++ b/cookbooks/apache/providers/module.rb @@ -22,7 +22,7 @@ def whyrun_supported? end action :install do - if not installed? + if !installed? package package_name updated = true @@ -40,14 +40,14 @@ action :install do notifies :reload, "service[apache2]" if enabled? end - updated = updated || t.updated_by_last_action? + updated ||= t.updated_by_last_action? end new_resource.updated_by_last_action(updated) end action :enable do - if not enabled? + unless enabled? link enabled_name("load") do to available_name("load") owner "root" @@ -60,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) @@ -106,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