Skip to content

Commit 6458f6e

Browse files
committed
Drop Ubuntu < 18.04
1 parent 2dc0661 commit 6458f6e

File tree

5 files changed

+17
-40
lines changed

5 files changed

+17
-40
lines changed

manifests/mpm.pp

Lines changed: 14 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -84,31 +84,28 @@
8484
}
8585
}
8686

87-
if $mpm == 'itk' {
88-
include apache::mpm::disable_mpm_event
89-
include apache::mpm::disable_mpm_worker
87+
case $mpm {
88+
'itk': {
89+
include apache::mpm::disable_mpm_event
90+
include apache::mpm::disable_mpm_worker
9091

91-
package { 'libapache2-mpm-itk':
92-
ensure => present,
93-
before => [
94-
Class['apache::service'],
95-
File[$apache::mod_enable_dir],
96-
],
92+
package { 'libapache2-mpm-itk':
93+
ensure => present,
94+
before => [
95+
Class['apache::service'],
96+
File[$apache::mod_enable_dir],
97+
],
98+
}
9799
}
98-
}
99-
100-
if $mpm == 'prefork' {
101-
if ( ( $::operatingsystem == 'Ubuntu' and versioncmp($::operatingsystemrelease,'18.04') >= 0 ) or $::operatingsystem == 'Debian' ) {
100+
'prefork': {
102101
include apache::mpm::disable_mpm_event
103102
include apache::mpm::disable_mpm_worker
104103
}
105-
}
106-
107-
if $mpm == 'worker' {
108-
if ( ( $::operatingsystem == 'Ubuntu' and versioncmp($::operatingsystemrelease,'18.04') >= 0 ) or $::operatingsystem == 'Debian' ) {
104+
'worker': {
109105
include apache::mpm::disable_mpm_event
110106
include apache::mpm::disable_mpm_prefork
111107
}
108+
default: {}
112109
}
113110
}
114111

manifests/params.pp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,6 @@
364364
if ($::operatingsystem == 'Ubuntu') or ($::operatingsystem == 'Debian' and versioncmp($::operatingsystemrelease, '11') < 0) {
365365
$php_version = $facts['operatingsystemmajrelease'] ? {
366366
'9' => '7.0', # Debian Stretch
367-
'16.04' => '7.0', # Ubuntu Xenial
368367
'10' => '7.3', # Debian Buster
369368
'20.04' => '7.4', # Ubuntu Foccal Fossal
370369
default => '7.2', # Ubuntu Bionic, Cosmic and Disco
@@ -460,7 +459,7 @@
460459
$secpcrematchlimit = 1500
461460
$secpcrematchlimitrecursion = 1500
462461
$modsec_secruleengine = 'On'
463-
if ($::operatingsystem == 'Debian' and versioncmp($::operatingsystemrelease, '9') >= 0) or ($::operatingsystem == 'Ubuntu' and versioncmp($::operatingsystemrelease, '18.04') >= 0) {
462+
if $facts['operatingsystem'] == 'Debian' or ($::operatingsystem == 'Ubuntu' and versioncmp($::operatingsystemrelease, '18.04') >= 0) {
464463
$modsec_default_rules = [
465464
'crawlers-user-agents.data',
466465
'iis-errors.data',

metadata.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@
6666
{
6767
"operatingsystem": "Ubuntu",
6868
"operatingsystemrelease": [
69-
"16.04",
7069
"18.04",
7170
"20.04"
7271
]

spec/classes/mod/php_spec.rb

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -54,19 +54,6 @@
5454
}
5555
end
5656
end
57-
when '16.04'
58-
context 'on xenial' do
59-
let :params do
60-
{ content: 'somecontent' }
61-
end
62-
63-
it {
64-
is_expected.to contain_file('php7.0.conf').with(
65-
content: 'somecontent',
66-
)
67-
}
68-
end
69-
7057
when '18.04'
7158
context 'on bionic' do
7259
let :params do
@@ -207,12 +194,7 @@
207194
end
208195

209196
# all the following tests are for legacy php/apache versions. They don't work on modern ubuntu and redhat 8
210-
next if (facts[:os]['release']['major'].to_i > 15 && facts[:os]['name'] == 'Ubuntu') ||
211-
(facts[:os]['release']['major'].to_i >= 15 && facts[:os]['name'] == 'SLES') ||
212-
(facts[:os]['release']['major'].to_i >= 9 && facts[:os]['name'] == 'Debian') ||
213-
(facts[:os]['release']['major'].to_i >= 8 && (facts[:os]['name'] == 'RedHat' || facts[:os]['name'] == 'CentOS'))
214-
215-
describe 'OS independent tests' do
197+
describe 'OS independent tests', if: (facts[:os]['family'] == 'Redhat' && facts[:os]['release']['major'].to_i < 8) do
216198
context 'with content param' do
217199
let :params do
218200
{ content: 'somecontent' }

spec/spec_helper_acceptance_local.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def print_parsing_errors
4949
}
5050
}
5151
# needed for ss, for serverspec checks
52-
if $::operatingsystem == 'Ubuntu' and $::operatingsystemmajrelease !~ /14.04|16.04/ {
52+
if $::operatingsystem == 'Ubuntu' {
5353
package { 'iproute2':
5454
ensure => 'latest',
5555
}

0 commit comments

Comments
 (0)