diff modules/website/manifests/php.pp @ 350:85d2c0079af9

Make opcache core and add APCu for object caching Nextcloud wants APCu for in-memory object caching. Opcache has been "core" since v5.5 (althought we're still importing Zend in one place, so maybe we're not doing it right!)
author IBBoard <dev@ibboard.co.uk>
date Sun, 27 Sep 2020 12:59:34 +0100
parents 3a104df81e44
children aad5c00b0525
line wrap: on
line diff
--- a/modules/website/manifests/php.pp	Sat Sep 26 18:48:30 2020 +0100
+++ b/modules/website/manifests/php.pp	Sun Sep 27 12:59:34 2020 +0100
@@ -1,7 +1,6 @@
 class website::php(
     $suffix = '',
     $module = undef,
-    $opcache = undef,
     $extras = [],
     ) {
   Package <| tag == 'php-package' |> -> File <| tag == 'php-file' |> ~> Service['httpd']
@@ -49,20 +48,18 @@
     tag => 'php-file',
   }
 
-  if $opcache {
-    package { "php${suffix}-${opcache}":
-      ensure => installed,
-      require => Package[$php_core],
-      tag => 'php-package',
-    }
-    # Use Remi's (and the OS's) naming convention
-    file { '/etc/php.d/opcache.ini':
-      ensure => absent,
-    }
-    file { '/etc/php.d/10-opcache.ini':
-      ensure => present,
-      source => 'puppet:///modules/website/opcache.ini',
-      tag => 'php-file',
-    }
+  package { "php${suffix}-opcache":
+    ensure => installed,
+    require => Package[$php_core],
+    tag => 'php-package',
+  }
+  # Use Remi's (and the OS's) naming convention
+  file { '/etc/php.d/opcache.ini':
+    ensure => absent,
+  }
+  file { '/etc/php.d/10-opcache.ini':
+    ensure => present,
+    source => "puppet:///modules/website/opcache.ini",
+    tag => 'php-file',
   }
 }