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
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