changeset 69:565b788f7ac1

Allow for specifying extra PHP packages (e.g. to enable Posix)
author IBBoard <dev@ibboard.co.uk>
date Sat, 17 Oct 2015 15:03:45 +0000
parents 8a1ea9fdf5b2
children 33682e5b34fc aad92dbc0efc
files manifests/templates.pp modules/website/manifests/php.pp
diffstat 2 files changed, 11 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/manifests/templates.pp	Sun Oct 11 19:03:30 2015 +0000
+++ b/manifests/templates.pp	Sat Oct 17 15:03:45 2015 +0000
@@ -224,6 +224,7 @@
 	class { 'website::php':
 		suffix => '55ibb', #IBBoard's rebuild of Webtatic's PHP 5.5
 		opcache => 'opcache',
+		extras => [ 'process' ],
 	}
 	#Setup MySQL, using (private) templates to make sure that we set non-std passwords and a default user
 	class { 'website::mysql':
--- a/modules/website/manifests/php.pp	Sun Oct 11 19:03:30 2015 +0000
+++ b/modules/website/manifests/php.pp	Sat Oct 17 15:03:45 2015 +0000
@@ -1,6 +1,7 @@
 class website::php(
     $suffix = '',
     $opcache = undef,
+    $extras = [],
     ) {
   File {
       notify => Service['httpd'],
@@ -8,6 +9,15 @@
   Package {
       notify => Service['httpd'],
   }
+
+  define website::php::extra_php ($pkg = $title) {
+    package { "php${website::php::suffix}-${pkg}":
+      ensure => latest,
+    }
+  }
+
+  website::php::extra_php { $extras: }
+
   $packages = [ "php${suffix}", "php${suffix}-mcrypt", "php${suffix}-mbstring", "php${suffix}-xml", "php${suffix}-gd" ]
   package { $packages:
     ensure => latest,