changeset 179:89cd717361fd puppet-3.6

Swap to PHP 7.2, since 7.0 is EOL now Note that Webtatic PHP 7.1+ has changed its core mod_php package. "mod_php[version]w" not provides mod_php, not the "php[version]w" package Manual replacement was required on the live system: yum replace php-common --replace-with=php72w-common https://webtatic.com/packages/php71/
author IBBoard <dev@ibboard.co.uk>
date Thu, 24 May 2018 20:38:26 +0100
parents 808462de684a
children 83885499c093
files manifests/templates.pp modules/website/manifests/php.pp
diffstat 2 files changed, 9 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/manifests/templates.pp	Sat May 12 10:05:12 2018 +0100
+++ b/manifests/templates.pp	Thu May 24 20:38:26 2018 +0100
@@ -402,7 +402,7 @@
 	}
 
 	# Use Webtatic's PHP 7
-	$php_suffix = '70w'
+	$php_suffix = '72w'
 
 	#Configure the PHP version to use
 	class { 'website::php':
--- a/modules/website/manifests/php.pp	Sat May 12 10:05:12 2018 +0100
+++ b/modules/website/manifests/php.pp	Thu May 24 20:38:26 2018 +0100
@@ -20,7 +20,13 @@
 
   website::php::extra_php { $extras: }
 
-  $packages = [ "php${suffix}", "php${suffix}-mbstring", "php${suffix}-xml", "php${suffix}-gd" ]
+  if $suffix =~ /^7[1-9]w$/ {
+    $php_core = "mod_php${suffix}"
+  } else {
+    $php_core = "php${suffix}"
+  }
+
+  $packages = [ $php_core, "php${suffix}-mbstring", "php${suffix}-xml", "php${suffix}-gd" ]
   package { $packages:
     ensure => installed,
   }
@@ -38,7 +44,7 @@
     package { "php${suffix}-${opcache}":
       ensure => installed,
       notify => Service['httpd'],
-      require => Package["php${suffix}"],
+      require => Package[$php_core],
     }
     file { '/etc/php.d/opcache.ini':
       ensure => present,