]> git.openstreetmap.org Git - chef.git/blob - cookbooks/donate/recipes/default.rb
donate: redirect to support.osm.org
[chef.git] / cookbooks / donate / recipes / default.rb
1 #
2 # Cookbook:: donate
3 # Recipe:: default
4 #
5 # Copyright:: 2016, OpenStreetMap Foundation
6 #
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
10 #
11 #     https://www.apache.org/licenses/LICENSE-2.0
12 #
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.
18 #
19
20 include_recipe "accounts"
21 include_recipe "apache"
22 include_recipe "php::fpm"
23
24 apache_module "headers"
25
26 ssl_certificate "donate.openstreetmap.org" do
27   domains ["donate.openstreetmap.org", "donate.openstreetmap.com",
28            "donate.openstreetmap.net", "donate.osm.org"]
29   notifies :reload, "service[apache2]"
30 end
31
32 php_fpm "donate.openstreetmap.org" do
33   action :delete
34 end
35
36 apache_site "donate.openstreetmap.org" do
37   template "apache.erb"
38 end
39
40 service "osmf-donate.timer" do
41   action [:stop, :disable]
42 end
43
44 systemd_service "osmf-donate" do
45   action :delete
46 end
47
48 file "/etc/cron.daily/osmf-donate-backup" do
49   action :delete
50 end