2 # Cookbook Name:: mediawiki
3 # Resource:: mediawiki_site
5 # Copyright 2015, 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.
20 actions :create, :update, :delete
21 default_action :create
23 attribute :name, :kind_of => String, :name_attribute => true
24 attribute :aliases, :kind_of => [String, Array]
25 attribute :directory, :kind_of => String
26 attribute :version, :kind_of => String, :default => "1.26"
27 attribute :database_name, :kind_of => String, :required => true
28 attribute :database_user, :kind_of => String, :required => true
29 attribute :database_password, :kind_of => String, :required => true
30 attribute :sitename, :kind_of => String, :default => "OpenStreetMap Wiki"
31 attribute :metanamespace, :kind_of => String, :default => "OpenStreetMap"
32 attribute :logo, :kind_of => String, :default => "$wgStylePath/common/images/wiki.png"
33 attribute :email_contact, :kind_of => String, :default => ""
34 attribute :email_sender, :kind_of => String, :default => ""
35 attribute :email_sender_name, :kind_of => String, :default => "MediaWiki Mail"
36 attribute :commons, :kind_of => [TrueClass, FalseClass], :default => true
37 attribute :skin, :kind_of => String, :default => "vector"
38 attribute :site_notice, :kind_of => [String, TrueClass, FalseClass], :default => false
39 attribute :site_readonly, :kind_of => [String, TrueClass, FalseClass], :default => false
40 attribute :admin_user, :kind_of => String, :default => "Admin"
41 attribute :admin_password, :kind_of => String, :required => true
42 attribute :ssl_enabled, :kind_of => [TrueClass, FalseClass], :default => false
43 attribute :ssl_certificate, :kind_of => String
44 attribute :ssl_certificate_chain, :kind_of => String
45 attribute :private_accounts, :kind_of => [TrueClass, FalseClass], :default => false
46 attribute :private, :kind_of => [TrueClass, FalseClass], :default => false
47 attribute :recaptcha_public_key, :kind_of => String
48 attribute :recaptcha_private_key, :kind_of => String
49 attribute :extra_file_extensions, :kind_of => [String, Array], :default => []
50 attribute :reload_apache, :kind_of => [TrueClass, FalseClass], :default => true
53 notifies :reload, "service[apache2]" if reload_apache
59 :name => database_name,
60 :username => database_user,
61 :password => database_password
67 :sitename => sitename,
68 :metanamespace => metanamespace,
70 :email_contact => email_contact,
71 :email_sender => email_sender,
72 :email_sender_name => email_sender_name,
75 :site_notice => site_notice,
76 :site_readonly => site_readonly,
77 :ssl_enabled => ssl_enabled,
78 :extra_file_extensions => extra_file_extensions,
79 :private_accounts => private_accounts,