X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/e050b6df164ed5daf4c90115d65cd1700858cc1c..2db5972d9f9604f3c3d7b8167fa3a740e6db7e03:/cookbooks/apache/providers/conf.rb diff --git a/cookbooks/apache/providers/conf.rb b/cookbooks/apache/providers/conf.rb index d7eddc636..16759e86f 100644 --- a/cookbooks/apache/providers/conf.rb +++ b/cookbooks/apache/providers/conf.rb @@ -23,32 +23,20 @@ end use_inline_resources -action :create do # ~FC017 - if node[:lsb][:release].to_f >= 14.04 - create_conf - end +action :create do + create_conf end -action :enable do # ~FC017 - if node[:lsb][:release].to_f >= 14.04 - enable_conf - else - create_conf - end +action :enable do + enable_conf end -action :disable do # ~FC017 - if node[:lsb][:release].to_f >= 14.04 - disable_conf - else - delete_conf - end +action :disable do + disable_conf end -action :delete do # ~FC017 - if node[:lsb][:release].to_f >= 14.04 - delete_conf - end +action :delete do + delete_conf end def create_conf @@ -57,7 +45,7 @@ def create_conf source new_resource.template owner "root" group "root" - mode 0644 + mode 0o644 variables new_resource.variables end end @@ -83,17 +71,9 @@ def delete_conf end def available_name - if node[:lsb][:release].to_f >= 14.04 - "/etc/apache2/conf-available/#{new_resource.name}.conf" - else - "/etc/apache2/conf.d/#{new_resource.name}" - end + "/etc/apache2/conf-available/#{new_resource.name}.conf" end def enabled_name - if node[:lsb][:release].to_f >= 14.04 - "/etc/apache2/conf-enabled/#{new_resource.name}.conf" - else - "/etc/apache2/conf.d/#{new_resource.name}" - end + "/etc/apache2/conf-enabled/#{new_resource.name}.conf" end