]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/mediawiki/recipes/default.rb
Move common PHP setup logic to a new cookbook
[chef.git] / cookbooks / mediawiki / recipes / default.rb
index 568ca2d72d6a0742542eb2342148c316b510e0e5..f6cea2d269bdd4626972b21b36fb8f952ab7cafb 100644 (file)
@@ -1,14 +1,14 @@
 #
-# Cookbook Name:: mediawiki
+# Cookbook:: mediawiki
 # Recipe:: default
 #
-# Copyright 2013, OpenStreetMap Foundation
+# Copyright:: 2013, OpenStreetMap Foundation
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
 # You may obtain a copy of the License at
 #
-#     http://www.apache.org/licenses/LICENSE-2.0
+#     https://www.apache.org/licenses/LICENSE-2.0
 #
 # Unless required by applicable law or agreed to in writing, software
 # distributed under the License is distributed on an "AS IS" BASIS,
 # limitations under the License.
 #
 
-include_recipe "memcached"
+include_recipe "accounts"
 include_recipe "apache"
-include_recipe "mysql"
+include_recipe "apt"
 include_recipe "git"
+include_recipe "memcached"
+include_recipe "mysql"
+include_recipe "php::apache"
 
 # Mediawiki Base Requirements
 package %w[
-  php
   php-cli
   php-curl
   php-gd
@@ -32,6 +34,8 @@ package %w[
   php-mbstring
   php-mysql
   php-xml
+  php-zip
+  composer
 ]
 
 # Mediawiki enhanced difference engine
@@ -82,9 +86,7 @@ service "parsoid" do
   subscribes :restart, "template[/etc/mediawiki/parsoid/config.yaml]"
 end
 
-apache_module "php7.0"
-
-link "/etc/php/7.0/apache2/conf.d/20-wikidiff2.ini" do
+link "/etc/php/#{node[:php][:version]}/apache2/conf.d/20-wikidiff2.ini" do
   to "../../mods-available/wikidiff2.ini"
 end