X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/e050b6df164ed5daf4c90115d65cd1700858cc1c..37c0446fb32977edfa5647799a62bde3256a6d32:/cookbooks/apache/providers/site.rb diff --git a/cookbooks/apache/providers/site.rb b/cookbooks/apache/providers/site.rb index a8c903449..4deae2782 100644 --- a/cookbooks/apache/providers/site.rb +++ b/cookbooks/apache/providers/site.rb @@ -29,7 +29,7 @@ action :create do source new_resource.template owner "root" group "root" - mode 0644 + mode 0o644 variables new_resource.variables.merge(:name => new_resource.name, :directory => site_directory) end end @@ -59,27 +59,14 @@ def site_directory end def available_name - if node[:lsb][:release].to_f >= 14.04 - "/etc/apache2/sites-available/#{new_resource.name}.conf" - else - "/etc/apache2/sites-available/#{new_resource.name}" - end + "/etc/apache2/sites-available/#{new_resource.name}.conf" end def enabled_name - if node[:lsb][:release].to_f >= 14.04 - case new_resource.name - when "default" - "/etc/apache2/sites-enabled/000-default.conf" - else - "/etc/apache2/sites-enabled/#{new_resource.name}.conf" - end + case new_resource.name + when "default" + "/etc/apache2/sites-enabled/000-default.conf" else - case new_resource.name - when "default" - "/etc/apache2/sites-enabled/000-default" - else - "/etc/apache2/sites-enabled/#{new_resource.name}" - end + "/etc/apache2/sites-enabled/#{new_resource.name}.conf" end end