Skip to content

Commit ad29652

Browse files
authored
Merge pull request #677 from JakeTRogers/redhat_venv
apply python-venv exclude to RedHat family instead of just CentOS
2 parents 4a4c467 + 4e144a1 commit ad29652

File tree

3 files changed

+31
-3
lines changed

3 files changed

+31
-3
lines changed

manifests/install.pp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
##
3636
## CentOS has no extra package for venv
3737
##
38-
unless $facts['os']['name'] == 'CentOS' {
38+
unless $facts['os']['family'] == 'RedHat' {
3939
package { 'python-venv':
4040
ensure => $python::venv,
4141
name => "${python}-venv",

metadata.json

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,13 @@
2020
"7100-05-03-1837"
2121
]
2222
},
23+
{
24+
"operatingsystem": "AlmaLinux",
25+
"operatingsystemrelease": [
26+
"8",
27+
"9"
28+
]
29+
},
2330
{
2431
"operatingsystem": "CentOS",
2532
"operatingsystemrelease": [
@@ -52,6 +59,27 @@
5259
"20.04"
5360
]
5461
},
62+
{
63+
"operatingsystem": "OracleLinux",
64+
"operatingsystemrelease": [
65+
"8",
66+
"9"
67+
]
68+
},
69+
{
70+
"operatingsystem": "RedHat",
71+
"operatingsystemrelease": [
72+
"8",
73+
"9"
74+
]
75+
},
76+
{
77+
"operatingsystem": "Rocky",
78+
"operatingsystemrelease": [
79+
"8",
80+
"9"
81+
]
82+
},
5583
{
5684
"operatingsystem": "SLES",
5785
"operatingsystemrelease": [

spec/classes/python_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
it { is_expected.to contain_package('pip') }
2424
end
2525

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

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

6666
case facts[:os]['family']

0 commit comments

Comments
 (0)