Skip to content

Commit b00e4d0

Browse files
committed
Drop Ubuntu < 18.04
1 parent 9146d4b commit b00e4d0

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($::operatingsystemmajrelease, '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
@@ -78,19 +78,6 @@
7878
}
7979
end
8080
end
81-
when '16.04'
82-
context 'on xenial' do
83-
let :params do
84-
{ content: 'somecontent' }
85-
end
86-
87-
it {
88-
is_expected.to contain_file('php7.0.conf').with(
89-
content: 'somecontent',
90-
)
91-
}
92-
end
93-
9481
when '18.04'
9582
context 'on bionic' do
9683
let :params do
@@ -231,12 +218,7 @@
231218
end
232219

233220
# all the following tests are for legacy php/apache versions. They don't work on modern ubuntu and redhat 8
234-
next if (facts[:os]['release']['major'].to_i > 15 && facts[:os]['name'] == 'Ubuntu') ||
235-
(facts[:os]['release']['major'].to_i >= 15 && facts[:os]['name'] == 'SLES') ||
236-
(facts[:os]['release']['major'].to_i >= 9 && facts[:os]['name'] == 'Debian') ||
237-
(facts[:os]['release']['major'].to_i >= 8 && (facts[:os]['name'] == 'RedHat' || facts[:os]['name'] == 'CentOS'))
238-
239-
describe 'OS independent tests' do
221+
describe 'OS independent tests', if: (facts[:os]['family'] == 'Redhat' && facts[:os]['release']['major'].to_i < 8) do
240222
context 'with content param' do
241223
let :params do
242224
{ 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)