Skip to content

Commit c51a971

Browse files
authored
Merge pull request #636 from voxpupuli/debian-ver
Drop Debian 9/Ubuntu 16.04 support
2 parents 6c8080c + 6910812 commit c51a971

9 files changed

Lines changed: 17 additions & 53 deletions

File tree

manifests/globals.pp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,11 @@
2525
) {
2626
$default_php_version = $facts['os']['name'] ? {
2727
'Debian' => $facts['os']['release']['major'] ? {
28-
'9' => '7.0',
2928
'10' => '7.3',
3029
'11' => '7.4',
3130
default => fail("Unsupported Debian release: ${fact('os.release.major')}"),
3231
},
3332
'Ubuntu' => $facts['os']['release']['major'] ? {
34-
'16.04' => '7.0',
3533
'18.04' => '7.2',
3634
'20.04' => '7.4',
3735
default => fail("Unsupported Ubuntu release: ${fact('os.release.major')}"),

manifests/pear.pp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
false => undef,
4747
}
4848
# Default PHP come with xml module and no seperate package for it
49-
if $facts['os']['name'] == 'Ubuntu' and versioncmp($facts['os']['release']['full'], '16.04') >= 0 {
49+
if $facts['os']['name'] == 'Ubuntu' and versioncmp($facts['os']['release']['full'], '18.04') >= 0 {
5050
ensure_packages(["${php::package_prefix}xml"], { ensure => present, require => $require, })
5151

5252
package { $package_name:

metadata.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,13 @@
4040
{
4141
"operatingsystem": "Ubuntu",
4242
"operatingsystemrelease": [
43-
"16.04",
4443
"18.04",
4544
"20.04"
4645
]
4746
},
4847
{
4948
"operatingsystem": "Debian",
5049
"operatingsystemrelease": [
51-
"9",
5250
"10",
5351
"11"
5452
]

spec/acceptance/php_spec.rb

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,8 @@
1414
packagename = 'php7.4-fpm'
1515
when %r{ubuntu-18.04}
1616
packagename = 'php7.2-fpm'
17-
when %r{ubuntu-16.04}
18-
packagename = 'php7.0-fpm'
1917
when %r{el}
2018
packagename = 'php-fpm'
21-
when %r{debian-9}
22-
packagename = 'php7.0-fpm'
2319
when %r{debian-10}
2420
packagename = 'php7.3-fpm'
2521
when %r{debian-11}
@@ -36,15 +32,13 @@
3632
end
3733
context 'default parameters with extensions' do
3834
case default[:platform]
39-
when %r{ubuntu-20.04}, %r{ubuntu-18.04}, %r{ubuntu-16.04}
35+
when %r{ubuntu-20.04}, %r{ubuntu-18.04}
4036
it 'works with defaults' do
4137
case default[:platform]
4238
when %r{ubuntu-20.04}
4339
simplexmlpackagename = 'php7.4-xml'
4440
when %r{ubuntu-18.04}
4541
simplexmlpackagename = 'php7.2-xml'
46-
when %r{ubuntu-16.04}
47-
simplexmlpackagename = 'php7.0-xml'
4842
end
4943
pp = <<-EOS
5044
class{'php':
@@ -85,12 +79,8 @@
8579
packagename = 'php7.4-fpm'
8680
when %r{ubuntu-18.04}
8781
packagename = 'php7.2-fpm'
88-
when %r{ubuntu-16.04}
89-
packagename = 'php7.0-fpm'
9082
when %r{el}
9183
packagename = 'php-fpm'
92-
when %r{debian-9}
93-
packagename = 'php7.0-fpm'
9484
when %r{debian-10}
9585
packagename = 'php7.3-fpm'
9686
when %r{debian-11}

spec/classes/php_fpm_service_spec.rb

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,12 @@
2828
case facts[:osfamily]
2929
when 'Debian'
3030
case facts[:operatingsystemrelease]
31-
when '16.04'
32-
it { is_expected.to contain_service('php7.0-fpm').with_ensure('running') }
31+
when '18.04'
32+
it { is_expected.to contain_service('php7.2-fpm').with_ensure('running') }
33+
when '10'
34+
it { is_expected.to contain_service('php7.3-fpm').with_ensure('running') }
35+
when '20.04', '11'
36+
it { is_expected.to contain_service('php7.4-fpm').with_ensure('running') }
3337
end
3438
when 'Suse'
3539
it { is_expected.to contain_service('php-fpm').with_ensure('running') }

spec/classes/php_fpm_spec.rb

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,15 @@
1717
case facts[:osfamily]
1818
when 'Debian'
1919
case facts[:operatingsystemrelease]
20-
when '16.04'
21-
it { is_expected.to contain_package('php7.0-fpm').with_ensure('present') }
22-
it { is_expected.to contain_service('php7.0-fpm').with_ensure('running') }
20+
when '18.04'
21+
it { is_expected.to contain_package('php7.2-fpm').with_ensure('present') }
22+
it { is_expected.to contain_service('php7.2-fpm').with_ensure('running') }
23+
when '20.04', '11'
24+
it { is_expected.to contain_package('php7.4-fpm').with_ensure('present') }
25+
it { is_expected.to contain_service('php7.4-fpm').with_ensure('running') }
26+
when '10'
27+
it { is_expected.to contain_package('php7.3-fpm').with_ensure('present') }
28+
it { is_expected.to contain_service('php7.3-fpm').with_ensure('running') }
2329
end
2430
when 'Suse'
2531
it { is_expected.to contain_package('php5-fpm').with_ensure('present') }

spec/classes/php_spec.rb

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@
1414
'php7.4-cli'
1515
when '10'
1616
'php7.3-cli'
17-
when '9'
18-
'php7.0-cli'
1917
else
2018
'php5-cli'
2119
end
@@ -25,8 +23,6 @@
2523
'php7.4-cli'
2624
when '18.04'
2725
'php7.2-cli'
28-
when '16.04'
29-
'php7.0-cli'
3026
else
3127
'php5-cli'
3228
end
@@ -38,8 +34,6 @@
3834
'php7.4-fpm'
3935
when '10'
4036
'php7.3-fpm'
41-
when '9'
42-
'php7.0-fpm'
4337
else
4438
'php5-fpm'
4539
end
@@ -49,8 +43,6 @@
4943
'php7.4-fpm'
5044
when '18.04'
5145
'php7.2-fpm'
52-
when '16.04'
53-
'php7.0-fpm'
5446
else
5547
'php5-fpm'
5648
end
@@ -62,8 +54,6 @@
6254
'php7.4-dev'
6355
when '10'
6456
'php7.3-dev'
65-
when '9'
66-
'php7.0-dev'
6757
else
6858
'php5-dev'
6959
end
@@ -73,8 +63,6 @@
7363
'php7.4-dev'
7464
when '18.04'
7565
'php7.2-dev'
76-
when '16.04'
77-
'php7.0-dev'
7866
else
7967
'php5-dev'
8068
end
@@ -185,8 +173,6 @@
185173
'/etc/php/7.4/fpm/pool.d/www.conf'
186174
when '10'
187175
'/etc/php/7.3/fpm/pool.d/www.conf'
188-
when '9'
189-
'/etc/php/7.0/fpm/pool.d/www.conf'
190176
else
191177
'/etc/php5/fpm/pool.d/www.conf'
192178
end
@@ -196,8 +182,6 @@
196182
'/etc/php/7.4/fpm/pool.d/www.conf'
197183
when '18.04'
198184
'/etc/php/7.2/fpm/pool.d/www.conf'
199-
when '16.04'
200-
'/etc/php/7.0/fpm/pool.d/www.conf'
201185
else
202186
'/etc/php5/fpm/pool.d/www.conf'
203187
end
@@ -229,8 +213,6 @@
229213
'/etc/php/7.4/fpm/pool.d/www.conf'
230214
when '10'
231215
'/etc/php/7.3/fpm/pool.d/www.conf'
232-
when '9'
233-
'/etc/php/7.0/fpm/pool.d/www.conf'
234216
else
235217
'/etc/php5/fpm/pool.d/www.conf'
236218
end
@@ -240,8 +222,6 @@
240222
'/etc/php/7.4/fpm/pool.d/www.conf'
241223
when '18.04'
242224
'/etc/php/7.2/fpm/pool.d/www.conf'
243-
when '16.04'
244-
'/etc/php/7.0/fpm/pool.d/www.conf'
245225
else
246226
'/etc/php5/fpm/pool.d/www.conf'
247227
end
@@ -273,8 +253,6 @@
273253
'/etc/php/7.4/fpm/pool.d/www.conf'
274254
when '10'
275255
'/etc/php/7.3/fpm/pool.d/www.conf'
276-
when '9'
277-
'/etc/php/7.0/fpm/pool.d/www.conf'
278256
else
279257
'/etc/php5/fpm/pool.d/www.conf'
280258
end
@@ -284,8 +262,6 @@
284262
'/etc/php/7.4/fpm/pool.d/www.conf'
285263
when '18.04'
286264
'/etc/php/7.2/fpm/pool.d/www.conf'
287-
when '16.04'
288-
'/etc/php/7.0/fpm/pool.d/www.conf'
289265
else
290266
'/etc/php5/fpm/pool.d/www.conf'
291267
end

spec/defines/extension_spec.rb

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@
1616
'/etc/php/7.4/mods-available'
1717
when '10'
1818
'/etc/php/7.3/mods-available'
19-
when '9'
20-
'/etc/php/7.0/mods-available'
2119
else
2220
'/etc/php5/mods-available'
2321
end
@@ -27,8 +25,6 @@
2725
'/etc/php/7.4/mods-available'
2826
when '18.04'
2927
'/etc/php/7.2/mods-available'
30-
when '16.04'
31-
'/etc/php/7.0/mods-available'
3228
else
3329
'/etc/php5/mods-available'
3430
end

spec/defines/fpm_pool_spec.rb

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@
1919
it { is_expected.to contain_file('/etc/php/7.4/fpm/pool.d/unique-name.conf') }
2020
when '10'
2121
it { is_expected.to contain_file('/etc/php/7.3/fpm/pool.d/unique-name.conf') }
22-
when '9'
23-
it { is_expected.to contain_file('/etc/php/7.0/fpm/pool.d/unique-name.conf') }
2422
else
2523
it { is_expected.to contain_file('/etc/php5/fpm/pool.d/unique-name.conf') }
2624
end
@@ -35,8 +33,6 @@
3533
it { is_expected.to contain_file('/etc/php/7.4/fpm/pool.d/unique-name.conf') }
3634
when '18.04'
3735
it { is_expected.to contain_file('/etc/php/7.2/fpm/pool.d/unique-name.conf') }
38-
when '16.04'
39-
it { is_expected.to contain_file('/etc/php/7.0/fpm/pool.d/unique-name.conf') }
4036
else
4137
it { is_expected.to contain_file('/etc/php5/fpm/pool.d/unique-name.conf') }
4238
end

0 commit comments

Comments
 (0)