diff manifests/templates.pp @ 320:99e3ca448d55

Fix Remi PHP on CentOS 8 It uses the new "modules" approach, so we need to use a new package provider They also use different signing keys
author IBBoard <dev@ibboard.co.uk>
date Sun, 01 Mar 2020 10:58:00 +0000
parents 2a20a5b7f65a
children 06a401d3ef45
line wrap: on
line diff
--- a/manifests/templates.pp	Sat Feb 29 14:10:26 2020 +0000
+++ b/manifests/templates.pp	Sun Mar 01 10:58:00 2020 +0000
@@ -382,13 +382,18 @@
 			gpgkey => 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi',
 		}
 		yumrepo { 'remirepo-php':
-			mirrorlist => 'http://cdn.remirepo.net/enterprise/$releasever/php73/$basearch/mirror',
-			descr => "PHP7.3 for CentOS from Remi",
+			mirrorlist => 'http://cdn.remirepo.net/enterprise/8/modular/$basearch/mirror',
+			descr => 'Remi\'s Modular repository for Enterprise Linux 8 - $basearch',
 			enabled => 1,
 			failovermethod => 'priority',
 			gpgcheck => 1,
 			gpgkey => 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi',
 		}
+		file { '/etc/pki/rpm-gpg/RPM-GPG-KEY-remi':
+			ensure => present,
+			source => 'puppet:///common/RPM-GPG-KEY-remi.el8',
+			tag => 'repo-config',
+		}
 	} else {
 		yumrepo { 'remirepo-safe':
 			mirrorlist => 'http://cdn.remirepo.net/enterprise/$releasever/safe/mirror',
@@ -406,17 +411,18 @@
 			gpgcheck => 1,
 			gpgkey => 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi',
 		}
-	}
-	file { '/etc/pki/rpm-gpg/RPM-GPG-KEY-remi':
-		ensure => present,
-		source => 'puppet:///common/RPM-GPG-KEY-remi',
-		before => YumRepo['remirepo-php'],
+		file { '/etc/pki/rpm-gpg/RPM-GPG-KEY-remi':
+			ensure => present,
+			source => 'puppet:///common/RPM-GPG-KEY-remi',
+			tag => 'repo-config',
+		}
 	}
 
 	#Configure the PHP version to use
 	class { 'website::php':
 		suffix => $php_suffix, 
 		opcache => 'opcache',
+		module => ($operatingsystem == 'CentOS' and versioncmp($operatingsystemrelease, '8') >= 0) ? { true => 'remi-7.3', default => undef },
 		extras => [ 'process', 'intl', 'pecl-imagick', 'bcmath', 'pecl-zip' ],
 	}