]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/apache/providers/conf.rb
More rubocop cleanup
[chef.git] / cookbooks / apache / providers / conf.rb
index beef75ea55952b42c9e2cfdbcf86469e69177254..da339b955098f9d74b87e2e3c97c0e0322d10f17 100644 (file)
@@ -57,7 +57,7 @@ def create_conf
     group "root"
     mode 0644
     variables new_resource.variables
     group "root"
     mode 0644
     variables new_resource.variables
-    notifies :reload, "service[apache2]" if enabled? or available_name == enabled_name
+    notifies :reload, "service[apache2]" if enabled? || available_name == enabled_name
   end
 
   new_resource.updated_by_last_action(t.updated_by_last_action?)
   end
 
   new_resource.updated_by_last_action(t.updated_by_last_action?)
@@ -93,7 +93,7 @@ end
 
 def available_name
   if node[:lsb][:release].to_f >= 14.04
 
 def available_name
   if node[:lsb][:release].to_f >= 14.04
-    "/etc/apache2/conf-available/#{new_resource.name}"
+    "/etc/apache2/conf-available/#{new_resource.name}.conf"
   else
     "/etc/apache2/conf.d/#{new_resource.name}"
   end
   else
     "/etc/apache2/conf.d/#{new_resource.name}"
   end
@@ -101,12 +101,12 @@ end
 
 def enabled_name
   if node[:lsb][:release].to_f >= 14.04
 
 def enabled_name
   if node[:lsb][:release].to_f >= 14.04
-    "/etc/apache2/conf-enabled/#{new_resource.name}"
+    "/etc/apache2/conf-enabled/#{new_resource.name}.conf"
   else
     "/etc/apache2/conf.d/#{new_resource.name}"
   end
 end
 
 def enabled?
   else
     "/etc/apache2/conf.d/#{new_resource.name}"
   end
 end
 
 def enabled?
-  ::File.exists?(enabled_name)
+  ::File.exist?(enabled_name)
 end
 end