diff --git a/manifests/mod/php.pp b/manifests/mod/php.pp index 844b207094..28a88964f0 100644 --- a/manifests/mod/php.pp +++ b/manifests/mod/php.pp @@ -38,10 +38,11 @@ String $libphp_prefix = 'libphp' ) inherits apache::params { include apache - if (versioncmp($php_version, '8') < 0) { - $mod = "php${php_version}" - } else { + # RedHat + PHP 8 drop the major version in apache module name. + if ($facts['os']['family'] == 'RedHat') and (versioncmp($php_version, '8') >= 0) { $mod = 'php' + } else { + $mod = "php${php_version}" } if $apache::version::scl_httpd_version == undef and $apache::version::scl_php_version != undef { @@ -87,12 +88,11 @@ $_php_version_no_dot = regsubst($php_version, '\.', '') if $apache::version::scl_httpd_version { $_lib = "librh-php${_php_version_no_dot}-php${_php_major}.so" + } elsif ($facts['os']['family'] == 'RedHat') and ($_php_major == 8) { + # RedHat + PHP 8 drop the major version in apache module name. + $_lib = "${libphp_prefix}.so" } else { - # Controls php version and libphp prefix - $_lib = $_php_major ? { - '8' => "${libphp_prefix}.so", - default => "${libphp_prefix}${php_version}.so", - } + $_lib = "${libphp_prefix}${php_version}.so" } $_module_id = $_php_major ? { '5' => 'php5_module', diff --git a/manifests/params.pp b/manifests/params.pp index d5ff15195f..94bd647d24 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -349,7 +349,9 @@ $php_version = $facts['os']['release']['major'] ? { '9' => '7.0', # Debian Stretch '10' => '7.3', # Debian Buster + '16.04' => '7.0', # Ubuntu Xenial Xerus '20.04' => '7.4', # Ubuntu Foccal Fossal + '22.04' => '8.1', # Ubuntu Jellyfish default => '7.2', # Ubuntu Bionic, Cosmic and Disco } $mod_packages = { diff --git a/metadata.json b/metadata.json index 1a9268dd7d..5124f85749 100644 --- a/metadata.json +++ b/metadata.json @@ -67,7 +67,8 @@ "operatingsystem": "Ubuntu", "operatingsystemrelease": [ "18.04", - "20.04" + "20.04", + "22.04" ] }, {