2 # Cookbook Name:: apache
3 # Provider:: apache_conf
5 # Copyright 2014, OpenStreetMap Foundation
7 # Licensed under the Apache License, Version 2.0 (the "License");
8 # you may not use this file except in compliance with the License.
9 # You may obtain a copy of the License at
11 # http://www.apache.org/licenses/LICENSE-2.0
13 # Unless required by applicable law or agreed to in writing, software
14 # distributed under the License is distributed on an "AS IS" BASIS,
15 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 # See the License for the specific language governing permissions and
17 # limitations under the License.
26 action :create do # ~FC017
27 if node[:lsb][:release].to_f >= 14.04
32 action :enable do # ~FC017
33 if node[:lsb][:release].to_f >= 14.04
40 action :disable do # ~FC017
41 if node[:lsb][:release].to_f >= 14.04
48 action :delete do # ~FC017
49 if node[:lsb][:release].to_f >= 14.04
55 template available_name do
56 cookbook new_resource.cookbook
57 source new_resource.template
61 variables new_resource.variables
80 file available_name do
86 if node[:lsb][:release].to_f >= 14.04
87 "/etc/apache2/conf-available/#{new_resource.name}.conf"
89 "/etc/apache2/conf.d/#{new_resource.name}"
94 if node[:lsb][:release].to_f >= 14.04
95 "/etc/apache2/conf-enabled/#{new_resource.name}.conf"
97 "/etc/apache2/conf.d/#{new_resource.name}"