X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/a615c8af6b389f613acf1c80a7b56da48d780cc0..ea0715b4be41a1d1600bba7a1f5d0b988708579f:/cookbooks/apache/providers/conf.rb diff --git a/cookbooks/apache/providers/conf.rb b/cookbooks/apache/providers/conf.rb index beef75ea5..489be8b84 100644 --- a/cookbooks/apache/providers/conf.rb +++ b/cookbooks/apache/providers/conf.rb @@ -21,13 +21,13 @@ def whyrun_supported? true end -action :create do +action :create do # ~FC017 if node[:lsb][:release].to_f >= 14.04 create_conf end end -action :enable do +action :enable do # ~FC017 if node[:lsb][:release].to_f >= 14.04 enable_conf else @@ -35,7 +35,7 @@ action :enable do end end -action :disable do +action :disable do # ~FC017 if node[:lsb][:release].to_f >= 14.04 disable_conf else @@ -43,7 +43,7 @@ action :disable do end end -action :delete do +action :delete do # ~FC017 if node[:lsb][:release].to_f >= 14.04 delete_conf end @@ -57,7 +57,7 @@ def create_conf 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?) @@ -93,7 +93,7 @@ end 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 @@ -101,12 +101,12 @@ end 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? - ::File.exists?(enabled_name) + ::File.exist?(enabled_name) end