donate: support ubuntu 14.04
authorGrant Slater <git@firefishy.com>
Wed, 21 Sep 2016 21:49:27 +0000 (22:49 +0100)
committerGrant Slater <git@firefishy.com>
Wed, 21 Sep 2016 21:49:27 +0000 (22:49 +0100)
cookbooks/donate/recipes/default.rb

index e98e5c3..c5ab30e 100644 (file)
@@ -21,14 +21,22 @@ include_recipe "apache::ssl"
 include_recipe "mysql"
 include_recipe "git"
 
-package "php"
-package "php-cli"
-package "php-curl"
-package "php-mbstring"
-package "php-mysql"
-package "php-gd"
+if node[:lsb][:release].to_f >= 16.04
+  package "php"
+  package "php-cli"
+  package "php-mysql"
+  package "php-gd"
+
+  apache_module "php7.0"
+else
+  package "php5"
+  package "php5-cli"
+  package "php5-mysql"
+  package "php5-gd"
+
+  apache_module "php5"
+end
 
-apache_module "php7.0"
 apache_module "headers"
 
 passwords = data_bag_item("donate", "passwords")