directory site_directory do
owner node[:mediawiki][:user]
group node[:mediawiki][:group]
- mode 0775
+ mode 0o775
end
directory mediawiki_directory do
owner node[:mediawiki][:user]
group node[:mediawiki][:group]
- mode 0775
+ mode 0o775
end
mediawiki_reference = "REL#{new_resource.version}".tr(".", "_")
directory "#{mediawiki_directory}/images" do
owner "www-data"
group node[:mediawiki][:group]
- mode 0775
+ mode 0o775
end
directory "#{mediawiki_directory}/cache" do
owner "www-data"
group node[:mediawiki][:group]
- mode 0775
+ mode 0o775
end
directory "#{mediawiki_directory}/LocalSettings.d" do
user node[:mediawiki][:user]
group node[:mediawiki][:group]
- mode 0775
+ mode 0o775
end
template "#{mediawiki_directory}/LocalSettings.php" do
source "LocalSettings.php.erb"
owner node[:mediawiki][:user]
group node[:mediawiki][:group]
- mode 0664
+ mode 0o664
variables :name => new_resource.name,
:directory => mediawiki_directory,
:database_params => new_resource.database_params,
source "mediawiki.cron.erb"
owner "root"
group "root"
- mode 0644
+ mode 0o644
variables :name => new_resource.name, :directory => site_directory,
:user => node[:mediawiki][:user]
end
source "mediawiki-backup.cron.erb"
owner "root"
group "root"
- mode 0700
+ mode 0o700
variables :name => new_resource.name, :directory => site_directory,
:database_params => new_resource.database_params
end
update_site false
end
- mediawiki_extension "ConfirmEdit" do
- site new_resource.name
- template "mw-ext-ConfirmEdit.inc.php.erb"
- variables :public_key => new_resource.recaptcha_public_key,
- :private_key => new_resource.recaptcha_private_key
- update_site false
+ if new_resource.private_accounts || new_resource.private
+ mediawiki_extension "ConfirmEdit" do
+ site new_resource.name
+ update_site false
+ action :delete
+ end
+ else
+ mediawiki_extension "ConfirmEdit" do
+ site new_resource.name
+ template "mw-ext-ConfirmEdit.inc.php.erb"
+ variables :public_key => new_resource.recaptcha_public_key,
+ :private_key => new_resource.recaptcha_private_key
+ update_site false
+ end
end
mediawiki_extension "Gadgets" do
mediawiki_extension "osmtaginfo" do
site new_resource.name
+ template "mw-ext-osmtaginfo.inc.php.erb"
repository "git://github.com/Firefishy/osmtaginfo.git"
tag "live"
update_site false
- action :delete
end
mediawiki_extension "SimpleMap" do
site new_resource.name
+ template "mw-ext-SimpleMap.inc.php.erb"
repository "git://github.com/Firefishy/SimpleMap.git"
tag "live"
update_site false
- action :delete
end
mediawiki_extension "SlippyMap" do
site new_resource.name
+ template "mw-ext-SlippyMap.inc.php.erb"
repository "git://github.com/Firefishy/SlippyMap.git"
tag "live"
update_site false
- action :delete
end
mediawiki_extension "Mantle" do
update_site false
end
+ mediawiki_extension "VisualEditor" do
+ site new_resource.name
+ template "mw-ext-VisualEditor.inc.php.erb"
+ update_site false
+ end
+
cookbook_file "#{site_directory}/cc-wiki.png" do
cookbook "mediawiki"
owner node[:mediawiki][:user]
group node[:mediawiki][:group]
- mode 0644
+ mode 0o644
backup false
end
cookbook "mediawiki"
owner node[:mediawiki][:user]
group node[:mediawiki][:group]
- mode 0644
+ mode 0o644
backup false
end
cookbook "mediawiki"
owner node[:mediawiki][:user]
group node[:mediawiki][:group]
- mode 0644
+ mode 0o644
backup false
end
source "LocalSettings.php.erb"
owner node[:mediawiki][:user]
group node[:mediawiki][:group]
- mode 0664
+ mode 0o664
variables :name => new_resource.name,
:directory => mediawiki_directory,
:database_params => new_resource.database_params,