X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/c128753dfeff2ccd6fd0361f3e17e5fccc8841f7..74b8ce4c5490377bd6d8443fef1ae7ffc7e2848c:/cookbooks/mediawiki/providers/site.rb?ds=sidebyside diff --git a/cookbooks/mediawiki/providers/site.rb b/cookbooks/mediawiki/providers/site.rb index 30e8c8d54..1548da5c1 100644 --- a/cookbooks/mediawiki/providers/site.rb +++ b/cookbooks/mediawiki/providers/site.rb @@ -87,7 +87,7 @@ action :create do mediawiki_reference = "REL#{new_resource.version}".tr(".", "_") - git site_directory do + git mediawiki_directory do action :sync repository "git://github.com/wikimedia/mediawiki" revision mediawiki_reference @@ -160,6 +160,26 @@ action :create do :database_params => new_resource.database_params end + mediawiki_skin "CologneBlue" do # ~FC005 + site new_resource.name + update_site false + end + + mediawiki_skin "Modern" do + site new_resource.name + update_site false + end + + mediawiki_skin "MonoBook" do + site new_resource.name + update_site false + end + + mediawiki_skin "Vector" do + site new_resource.name + update_site false + end + mediawiki_extension "Cite" do site new_resource.name template "mw-ext-Cite.inc.php.erb" @@ -402,6 +422,31 @@ action :create do end end +action :update do + mediawiki_directory = "#{site_directory}/w" + + template "#{mediawiki_directory}/LocalSettings.php" do + cookbook "mediawiki" + source "LocalSettings.php.erb" + owner node[:mediawiki][:user] + group node[:mediawiki][:group] + mode 0664 + variables :name => new_resource.name, + :directory => mediawiki_directory, + :database_params => new_resource.database_params, + :mediawiki => new_resource.mediawiki_params + notifies :run, "execute[#{mediawiki_directory}/maintenance/update.php]" + end + + execute "#{mediawiki_directory}/maintenance/update.php" do + action :run + command "php maintenance/update.php --quick" + cwd mediawiki_directory + user node[:mediawiki][:user] + group node[:mediawiki][:group] + end +end + action :delete do apache_site new_resource.name do action :delete