Mercurial > repos > other > Puppet
diff modules/website/manifests/php.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 | c3fa3d65aa83 |
children | cd1bcc06f09c |
line wrap: on
line diff
--- a/modules/website/manifests/php.pp Sat Feb 29 14:10:26 2020 +0000 +++ b/modules/website/manifests/php.pp Sun Mar 01 10:58:00 2020 +0000 @@ -1,17 +1,31 @@ class website::php( $suffix = '', + $module = undef, $opcache = undef, $extras = [], ) { Package <| tag == 'php-package' |> -> File <| tag == 'php-file' |> ~> Service['httpd'] - if $suffix =~ /^7[1-9]w$/ { - $php_core = "mod_php${suffix}" + if $module != undef { + $php_core = 'php' + package { $php_core: + provider => 'dnfmodule', + ensure => $module, + tag => 'php-package', + } } else { - $php_core = "php${suffix}" + if $suffix =~ /^7[1-9]w$/ { + $php_core = "mod_php${suffix}" + } else { + $php_core = "php${suffix}" + } + package { $php_core: + ensure => installed, + tag => 'php-package', + } } - $packages = [ $php_core, "php${suffix}-mbstring", "php${suffix}-xml", "php${suffix}-gd" ] + $packages = [ "php${suffix}-mbstring", "php${suffix}-xml", "php${suffix}-gd" ] package { $packages: ensure => installed, tag => 'php-package',