Skip to content

Commit 04c346a

Browse files
committed
FIX
1 parent 8491f8e commit 04c346a

File tree

7 files changed

+17
-7
lines changed

7 files changed

+17
-7
lines changed

REFERENCE.md

+9
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ The following parameters are available in the `python` class:
8686
* [`manage_venv_package`](#-python--manage_venv_package)
8787
* [`manage_pip_package`](#-python--manage_pip_package)
8888
* [`venv`](#-python--venv)
89+
* [`pip_package_name`](#-python--pip_package_name)
8990
* [`gunicorn_package_name`](#-python--gunicorn_package_name)
9091
* [`python_pips`](#-python--python_pips)
9192
* [`python_pyvenvs`](#-python--python_pyvenvs)
@@ -228,6 +229,14 @@ Data type: `Python::Package::Ensure`
228229

229230
Default value: `'absent'`
230231

232+
##### <a name="-python--pip_package_name"></a>`pip_package_name`
233+
234+
Data type: `Optional[String[1]]`
235+
236+
237+
238+
Default value: `undef`
239+
231240
##### <a name="-python--gunicorn_package_name"></a>`gunicorn_package_name`
232241

233242
Data type: `String[1]`

manifests/init.pp

-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,6 @@
7676
}
7777
}
7878

79-
8079
contain python::install
8180
contain python::config
8281

manifests/install/pip.pp

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
}
1616
'anaconda': {
1717
}
18-
pip, default: {
18+
'pip', default: {
1919
case $facts['os']['family'] {
2020
'AIX': {
2121
unless String($python::version) =~ /^python3/ {

manifests/install/venv.pp

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
include python
44

55
# Main python package bundle venv on some operating systems
6-
unless $facts['os']['family'] in ['Archlinux', 'RedHat', 'FreeBSD'] {
6+
unless $facts['os']['family'] in ['Archlinux', 'FreeBSD', 'RedHat'] {
77
package { 'python-venv':
88
ensure => $python::venv,
99
name => "${python::install::python}-venv",

manifests/params.pp

+2
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@
4040
}
4141
$manage_venv_package = $facts['os']['family'] ? {
4242
'Archlinux' => false,
43+
'FreeBSD' => false,
44+
'RedHat' => false,
4345
default => true,
4446
}
4547
}

spec/classes/install/venv_spec.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class { 'python':
2626
PP
2727
end
2828

29-
if %w[Archlinux RedHat FreeBSD].include?(facts[:os]['family'])
29+
if %w[Archlinux FreeBSD RedHat].include?(facts[:os]['family'])
3030
it { is_expected.not_to contain_package('python-venv') }
3131
else
3232
it { is_expected.to contain_package('python-venv').with(ensure: 'present') }

spec/classes/install_pip_spec.rb

+3-3
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@
1616
context 'when ensuring pip is absent' do
1717
let(:pre_condition) do
1818
<<~PP
19-
class { 'python':
20-
pip => absent,
21-
}
19+
class { 'python':
20+
pip => absent,
21+
}
2222
PP
2323
end
2424

0 commit comments

Comments
 (0)