changeset 419:0c627ff3a7c3

Fix PHP setup on CentOS
author IBBoard <dev@ibboard.co.uk>
date Sat, 08 Oct 2022 15:53:01 +0100
parents dd12bb713260
children 3e4bc3935aa1
files manifests/templates.pp modules/website/manifests/php.pp
diffstat 2 files changed, 11 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/manifests/templates.pp	Sat Oct 08 15:24:44 2022 +0100
+++ b/manifests/templates.pp	Sat Oct 08 15:53:01 2022 +0100
@@ -420,7 +420,7 @@
 
 	if $operatingsystem == 'CentOS' {
 		$php_suffix = ''
-		$variant_prefix = ''
+		$variant_prefix = 'php-'
 		$extra_prefix = 'pecl-'
 		$extra_extras = { 'process' => {} }
 		if versioncmp($operatingsystemrelease, '8') >= 0 {
@@ -486,7 +486,9 @@
 				package_prefix => $variant_prefix
 			},
 			'bcmath' => {},
-			"${extra_prefix}zip" => {},
+			"${extra_prefix}zip" => {
+				package_prefix => $variant_prefix
+			},
 			'json' => {},
 			"${extra_prefix}apcu" => {
 				package_prefix => $variant_prefix
@@ -757,7 +759,7 @@
 }
 class devsite ($proxy_4to6_ip) {
 	if $operatingsystem == 'CentOS' and versioncmp($operatingsystemrelease, '8') >= 0 {
-		$mod_wsgi_prefix = 'run/wsgi/'
+#		$mod_wsgi_prefix = 'run/wsgi/'
 		$package_name = 'python3-mod_wsgi'
 		$mod_path = 'mod_wsgi_python3.so'
 	} else {
--- a/modules/website/manifests/php.pp	Sat Oct 08 15:24:44 2022 +0100
+++ b/modules/website/manifests/php.pp	Sat Oct 08 15:53:01 2022 +0100
@@ -11,10 +11,16 @@
   else {
     $pcre_jit = 1
   }
+
+  file { '/run/php/':
+    ensure => directory,
+  } ->
   class { '::php':
     ensure => present,
     manage_repos => false,
     fpm => true,
+    fpm_service_enable => true,
+    fpm_service_ensure => 'running',
     fpm_pools => {
       'www' => {
         'listen' => '/run/php/php-fpm.sock',