Skip to content

Commit c7611a3

Browse files
authored
Merge pull request #709 from bastelfreak/centos7
Drop EoL CentOS 7/8 support
2 parents 1a1e8b5 + de7d06e commit c7611a3

File tree

3 files changed

+1
-76
lines changed

3 files changed

+1
-76
lines changed

manifests/install.pp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -215,12 +215,9 @@
215215
if String($python::version) =~ /^python3/ {
216216
$pip_package = "${python}-pip"
217217
$pip_provider = $python.regsubst(/^.*python3\.?/,'pip3.').regsubst(/\.$/,'')
218-
} elsif ($facts['os']['family'] == 'RedHat') and (versioncmp($facts['os']['release']['major'], '8') >= 0) {
218+
} elsif $facts['os']['family'] == 'RedHat' {
219219
$pip_package = 'python3-pip'
220220
$pip_provider = pip3
221-
} elsif ($facts['os']['family'] == 'RedHat') and (versioncmp($facts['os']['release']['major'], '7') >= 0) {
222-
$pip_package = 'python2-pip'
223-
$pip_provider = pip2
224221
} elsif $facts['os']['family'] == 'FreeBSD' {
225222
$pip_package = "py${python::version}-pip"
226223
$pip_provider = 'pip'

metadata.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,6 @@
3030
{
3131
"operatingsystem": "CentOS",
3232
"operatingsystemrelease": [
33-
"7",
34-
"8",
3533
"9"
3634
]
3735
},

spec/classes/python_spec.rb

Lines changed: 0 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -265,76 +265,6 @@
265265
end
266266
when 'RedHat', 'CentOS'
267267
case facts[:os]['release']['major']
268-
when '7'
269-
270-
context 'on a Redhat 7 OS' do
271-
it { is_expected.to contain_class('python::install') }
272-
it { is_expected.to contain_package('pip').with_name('python2-pip') }
273-
274-
describe 'with python::version' do
275-
context 'python36' do
276-
let(:params) { { version: 'python36' } }
277-
278-
it { is_expected.to compile.with_all_deps }
279-
it { is_expected.to contain_package('pip').with_name('python36-pip') }
280-
it { is_expected.to contain_package('python').with_name('python36') }
281-
it { is_expected.to contain_package('python-dev').with_name('python36-devel') }
282-
end
283-
end
284-
285-
describe 'with manage_gunicorn' do
286-
context 'true' do
287-
let(:params) { { manage_gunicorn: true } }
288-
289-
it { is_expected.to contain_package('gunicorn').with_name('python-gunicorn') }
290-
end
291-
292-
context 'empty args' do
293-
# let(:params) {{ :manage_gunicorn => '' }}
294-
it { is_expected.to contain_package('gunicorn').with_name('python-gunicorn') }
295-
end
296-
297-
context 'false' do
298-
let(:params) { { manage_gunicorn: false } }
299-
300-
it { is_expected.not_to contain_package('gunicorn') }
301-
end
302-
end
303-
304-
describe 'with python::provider' do
305-
context 'scl' do
306-
describe 'with version' do
307-
context '3.6 SCL meta package' do
308-
let(:params) { { version: 'rh-python36' } }
309-
310-
it { is_expected.to compile.with_all_deps }
311-
end
312-
313-
context '3.6 SCL python package' do
314-
let(:params) { { version: 'rh-python36-python' } }
315-
316-
it { is_expected.to compile.with_all_deps }
317-
end
318-
end
319-
320-
describe 'with manage_scl' do
321-
context 'true' do
322-
let(:params) { { provider: 'scl', manage_scl: true } }
323-
324-
it { is_expected.to contain_package('centos-release-scl') }
325-
it { is_expected.to contain_package('scl-utils') }
326-
end
327-
328-
context 'false' do
329-
let(:params) { { provider: 'scl', manage_scl: false } }
330-
331-
it { is_expected.not_to contain_package('centos-release-scl') }
332-
it { is_expected.not_to contain_package('scl-utils') }
333-
end
334-
end
335-
end
336-
end
337-
end
338268
when '8'
339269
context 'on a Redhat 8 OS' do
340270
it { is_expected.to contain_class('python::install') }

0 commit comments

Comments
 (0)