diff options
Diffstat (limited to 'manifests')
-rw-r--r-- | manifests/params.pp | 5 | ||||
-rw-r--r-- | manifests/series7.pp | 14 |
2 files changed, 13 insertions, 6 deletions
diff --git a/manifests/params.pp b/manifests/params.pp index ab6616c..affd1ee 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -1,6 +1,7 @@ class php::params { - $version7 = '7.2' - $version5 = $::lsbdistcodename ? { + $version7 = '7.2' + $version7_previous = [ '7.0' ] + $version5 = $::lsbdistcodename ? { 'bionic' => '5.6', 'xenial' => '5.6', 'trusty' => '5.6', diff --git a/manifests/series7.pp b/manifests/series7.pp index d6af596..35b1636 100644 --- a/manifests/series7.pp +++ b/manifests/series7.pp @@ -25,19 +25,25 @@ class php::series7( include php::series7::hardened } - # The needed apache modules + # The right apache module if $manage_mod_php == '7' { $version5 = $::php::params::version5 - apache::module { "php${version}": - ensure => present, - require => Package["libapache2-mod-php${version}"], + $::php::params::version7_previous.each |$item| { + apache::module { "php${item}": + ensure => absent, + } } apache::module { "php${version5}": ensure => absent, require => Package["libapache2-mod-php${version}"], } + + apache::module { "php${version}": + ensure => present, + require => Package["libapache2-mod-php${version}"], + } } file { [ "${folder}", "${folder}/cli", "${folder}/apache2", "${folder}/cli/conf.d", "${folder}/apache2/conf.d" ]: |