summaryrefslogtreecommitdiff
path: root/manifests/install.pp
diff options
context:
space:
mode:
Diffstat (limited to 'manifests/install.pp')
-rw-r--r--manifests/install.pp12
1 files changed, 9 insertions, 3 deletions
diff --git a/manifests/install.pp b/manifests/install.pp
index cf0a13e..9306e3a 100644
--- a/manifests/install.pp
+++ b/manifests/install.pp
@@ -6,8 +6,8 @@ class python::install {
}
$pythondev = $::operatingsystem ? {
- /(?i:RedHat|CentOS|Fedora)/ => "$python-devel",
- /(?i:Debian|Ubuntu)/ => "$python-dev"
+ /(?i:RedHat|CentOS|Fedora)/ => "${python}-devel",
+ /(?i:Debian|Ubuntu)/ => "${python}-dev"
}
package { $python: ensure => present }
@@ -17,7 +17,13 @@ class python::install {
default => absent,
}
- package { [ $pythondev, 'python-pip' ]: ensure => $dev_ensure }
+ $pip_ensure = $python::pip ? {
+ true => present,
+ default => absent,
+ }
+
+ package { $pythondev: ensure => $dev_ensure }
+ package { 'python-pip': ensure => $pip_ensure }
$venv_ensure = $python::virtualenv ? {
true => present,