diff modules/website/manifests/php.pp @ 246:c3fa3d65aa83

Update configs for Puppet 6 This *should* all be backward compatible
author IBBoard <dev@ibboard.co.uk>
date Sat, 21 Dec 2019 14:19:47 -0500
parents 960e737a120e
children 99e3ca448d55
line wrap: on
line diff
--- a/modules/website/manifests/php.pp	Sat Dec 21 14:12:10 2019 -0500
+++ b/modules/website/manifests/php.pp	Sat Dec 21 14:19:47 2019 -0500
@@ -3,22 +3,7 @@
     $opcache = undef,
     $extras = [],
     ) {
-  File {
-      notify => Service['httpd'],
-      tag => 'website',
-  }
-  Package {
-      notify => Service['httpd'],
-      tag => 'website',
-  }
-  Package <| tag == 'website' |> -> File <| tag == 'website' |>
-  define website::php::extra_php ($pkg = $title) {
-    package { "php${website::php::suffix}-${pkg}":
-      ensure => installed,
-    }
-  }
-
-  website::php::extra_php { $extras: }
+  Package <| tag == 'php-package' |> -> File <| tag == 'php-file' |> ~> Service['httpd']
 
   if $suffix =~ /^7[1-9]w$/ {
     $php_core = "mod_php${suffix}"
@@ -29,22 +14,26 @@
   $packages = [ $php_core, "php${suffix}-mbstring", "php${suffix}-xml", "php${suffix}-gd" ]
   package { $packages:
     ensure => installed,
+    tag => 'php-package',
   }
+
   file { '/etc/php.d/custom-lockdown.ini':
     ensure => present,
     content => 'allow_url_fopen = \'off\'
     expose_php = Off',
+    tag => 'php-file',
   }
   file { '/etc/php.d/custom-php.ini':
     ensure => present,
     source => 'puppet:///modules/website/custom-php.ini',
+    tag => 'php-file',
   }
 
   if $opcache {
     package { "php${suffix}-${opcache}":
       ensure => installed,
-      notify => Service['httpd'],
       require => Package[$php_core],
+      tag => 'php-package',
     }
     # Use Remi's (and the OS's) naming convention
     file { '/etc/php.d/opcache.ini':
@@ -53,6 +42,7 @@
     file { '/etc/php.d/10-opcache.ini':
       ensure => present,
       source => 'puppet:///modules/website/opcache.ini',
+      tag => 'php-file',
     }
   }
 }