Skip to content

Commit

Permalink
apply python-venv exclude to RedHat family instead of just CentOS
Browse files Browse the repository at this point in the history
  • Loading branch information
JakeTRogers committed Nov 27, 2023
1 parent 4a4c467 commit 92b91a0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion manifests/install.pp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
##
## CentOS has no extra package for venv
##
unless $facts['os']['name'] == 'CentOS' {
unless $facts['os']['family'] == 'RedHat' {
package { 'python-venv':
ensure => $python::venv,
name => "${python}-venv",
Expand Down
4 changes: 2 additions & 2 deletions spec/classes/python_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
it { is_expected.to contain_package('pip') }
end

if %w[Archlinux CentOS].include?(facts[:os]['name'])
if %w[Archlinux RedHat].include?(facts[:os]['family'])
it { is_expected.not_to contain_package('python-venv') }
else
it { is_expected.to contain_package('python-venv') }
Expand Down Expand Up @@ -60,7 +60,7 @@
it { is_expected.to compile.with_all_deps }
it { is_expected.to contain_package('pip').with(ensure: 'present') }

it { is_expected.to contain_package('python-venv').with(ensure: 'present') } unless facts[:os]['name'] == 'CentOS'
it { is_expected.to contain_package('python-venv').with(ensure: 'present') } unless facts[:os]['family'] == 'RedHat'
end

case facts[:os]['family']
Expand Down

0 comments on commit 92b91a0

Please sign in to comment.