Avoid duplicate resource names for wordpress plugins and themes
[chef.git] / cookbooks / switch2osm / recipes / default.rb
1 #
2 # Cookbook Name:: switch2osm
3 # Recipe:: default
4 #
5 # Copyright 2013, 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 #     http://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 "wordpress"
21
22 passwords = data_bag_item("switch2osm", "passwords")
23
24 wordpress_site "switch2osm.org" do
25   aliases ["www.switch2osm.org", "switch2osm.com", "www.switch2osm.com"]
26   directory "/srv/switch2osm.org"
27   ssl_enabled true
28   database_name "switch2osm-blog"
29   database_user "switch2osm-user"
30   database_password passwords["switch2osm-user"]
31 end
32
33 wordpress_theme "switch2osm.org-picolight" do
34   name "picolight"
35   site "switch2osm.org"
36   repository "git://github.com/Firefishy/picolight-s2o.git"
37   revision "master"
38 end
39
40 wordpress_plugin "switch2osm.org-sitepress-multilingual-cms" do
41   name "sitepress-multilingual-cms"
42   site "switch2osm.org"
43   repository "git://chef.openstreetmap.org/sitepress-multilingual-cms.git"
44 end
45
46 wordpress_plugin "switch2osm.org-wpml-cms-nav" do
47   name "wpml-cms-nav"
48   site "switch2osm.org"
49   repository "git://chef.openstreetmap.org/wpml-cms-nav.git"
50 end
51
52 wordpress_plugin "switch2osm.org-wpml-sticky-links" do
53   name "wpml-sticky-links"
54   site "switch2osm.org"
55   repository "git://chef.openstreetmap.org/wpml-sticky-links.git"
56 end
57
58 wordpress_plugin "switch2osm.org-wpml-string-translation" do
59   name "wpml-string-translation"
60   site "switch2osm.org"
61   repository "git://chef.openstreetmap.org/wpml-string-translation.git"
62 end
63
64 wordpress_plugin "switch2osm.org-wpml-translation-analytics" do
65   name "wpml-translation-analytics"
66   site "switch2osm.org"
67   repository "git://chef.openstreetmap.org/wpml-translation-analytics.git"
68 end
69
70 wordpress_plugin "switch2osm.org-wpml-translation-management" do
71   name "wpml-translation-management"
72   site "switch2osm.org"
73   repository "git://chef.openstreetmap.org/wpml-translation-management.git"
74 end
75
76 wordpress_plugin "switch2osm.org-wpml-xliff" do
77   name "wpml-xliff"
78   site "switch2osm.org"
79   repository "git://chef.openstreetmap.org/wpml-xliff.git"
80 end
81
82 template "/etc/cron.daily/switch2osm-backup" do
83   source "backup.cron.erb"
84   owner "root"
85   group "root"
86   mode 0o750
87   variables :passwords => passwords
88 end