Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop EoL CentOS 7/8 support #709

Merged
merged 1 commit into from
Nov 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions manifests/install.pp
Original file line number Diff line number Diff line change
Expand Up @@ -215,12 +215,9 @@
if String($python::version) =~ /^python3/ {
$pip_package = "${python}-pip"
$pip_provider = $python.regsubst(/^.*python3\.?/,'pip3.').regsubst(/\.$/,'')
} elsif ($facts['os']['family'] == 'RedHat') and (versioncmp($facts['os']['release']['major'], '8') >= 0) {
} elsif $facts['os']['family'] == 'RedHat' {
$pip_package = 'python3-pip'
$pip_provider = pip3
} elsif ($facts['os']['family'] == 'RedHat') and (versioncmp($facts['os']['release']['major'], '7') >= 0) {
$pip_package = 'python2-pip'
$pip_provider = pip2
} elsif $facts['os']['family'] == 'FreeBSD' {
$pip_package = "py${python::version}-pip"
$pip_provider = 'pip'
Expand Down
2 changes: 0 additions & 2 deletions metadata.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{

Check warning on line 1 in metadata.json

View workflow job for this annotation

GitHub Actions / Puppet / Static validations

Skipping EOL operating system FreeBSD 11

Check warning on line 1 in metadata.json

View workflow job for this annotation

GitHub Actions / Puppet / Static validations

Skipping EOL operating system FreeBSD 12

Check warning on line 1 in metadata.json

View workflow job for this annotation

GitHub Actions / Puppet / Static validations

Skipping EOL operating system Ubuntu 18.04
"name": "puppet-python",
"version": "7.4.1-rc0",
"author": "Vox Pupuli",
Expand Down Expand Up @@ -30,8 +30,6 @@
{
"operatingsystem": "CentOS",
"operatingsystemrelease": [
"7",
"8",
"9"
]
},
Expand Down
70 changes: 0 additions & 70 deletions spec/classes/python_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -265,76 +265,6 @@
end
when 'RedHat', 'CentOS'
case facts[:os]['release']['major']
when '7'

context 'on a Redhat 7 OS' do
it { is_expected.to contain_class('python::install') }
it { is_expected.to contain_package('pip').with_name('python2-pip') }

describe 'with python::version' do
context 'python36' do
let(:params) { { version: 'python36' } }

it { is_expected.to compile.with_all_deps }
it { is_expected.to contain_package('pip').with_name('python36-pip') }
it { is_expected.to contain_package('python').with_name('python36') }
it { is_expected.to contain_package('python-dev').with_name('python36-devel') }
end
end

describe 'with manage_gunicorn' do
context 'true' do
let(:params) { { manage_gunicorn: true } }

it { is_expected.to contain_package('gunicorn').with_name('python-gunicorn') }
end

context 'empty args' do
# let(:params) {{ :manage_gunicorn => '' }}
it { is_expected.to contain_package('gunicorn').with_name('python-gunicorn') }
end

context 'false' do
let(:params) { { manage_gunicorn: false } }

it { is_expected.not_to contain_package('gunicorn') }
end
end

describe 'with python::provider' do
context 'scl' do
describe 'with version' do
context '3.6 SCL meta package' do
let(:params) { { version: 'rh-python36' } }

it { is_expected.to compile.with_all_deps }
end

context '3.6 SCL python package' do
let(:params) { { version: 'rh-python36-python' } }

it { is_expected.to compile.with_all_deps }
end
end

describe 'with manage_scl' do
context 'true' do
let(:params) { { provider: 'scl', manage_scl: true } }

it { is_expected.to contain_package('centos-release-scl') }
it { is_expected.to contain_package('scl-utils') }
end

context 'false' do
let(:params) { { provider: 'scl', manage_scl: false } }

it { is_expected.not_to contain_package('centos-release-scl') }
it { is_expected.not_to contain_package('scl-utils') }
end
end
end
end
end
when '8'
context 'on a Redhat 8 OS' do
it { is_expected.to contain_class('python::install') }
Expand Down