diff --git a/manifests/install.pp b/manifests/install.pp index e1fc22e4..c8a279c1 100644 --- a/manifests/install.pp +++ b/manifests/install.pp @@ -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' diff --git a/metadata.json b/metadata.json index c3cd8010..80d0d684 100644 --- a/metadata.json +++ b/metadata.json @@ -30,8 +30,6 @@ { "operatingsystem": "CentOS", "operatingsystemrelease": [ - "7", - "8", "9" ] }, diff --git a/spec/classes/python_spec.rb b/spec/classes/python_spec.rb index 54c47fc7..fd39b26d 100644 --- a/spec/classes/python_spec.rb +++ b/spec/classes/python_spec.rb @@ -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') }