Skip to content

Commit

Permalink
Merge pull request #450 from ekohl/debian-virtualenv
Browse files Browse the repository at this point in the history
Fix Ubuntu bionic package installation
  • Loading branch information
bastelfreak authored Nov 17, 2018
2 parents f274e51 + b0111c2 commit 2adb801
Showing 1 changed file with 23 additions and 20 deletions.
43 changes: 23 additions & 20 deletions manifests/install.pp
Original file line number Diff line number Diff line change
Expand Up @@ -204,31 +204,34 @@
}
}

if $::osfamily == 'RedHat' {
if $pip_ensure != 'absent' {
if $python::use_epel == true {
include 'epel'
Class['epel'] -> Package['pip']
case $facts['os']['family'] {
'RedHat': {
if $pip_ensure != 'absent' {
if $python::use_epel == true {
include 'epel'
Class['epel'] -> Package['pip']
}
}
if ($venv_ensure != 'absent') and ($::operatingsystemrelease =~ /^6/) {
if $python::use_epel == true {
include 'epel'
Class['epel'] -> Package['virtualenv']
}
}

$virtualenv_package = "${python}-virtualenv"
}
if ($venv_ensure != 'absent') and ($::operatingsystemrelease =~ /^6/) {
if $python::use_epel == true {
include 'epel'
Class['epel'] -> Package['virtualenv']
'Debian': {
if fact('lsbdistcodename') == 'trusty' {
$virtualenv_package = 'python-virtualenv'
} else {
$virtualenv_package = 'virtualenv'
}
}

$virtualenv_package = "${python}-virtualenv"
} else {
if fact('lsbdistcodename') == 'jessie' {
'Gentoo': {
$virtualenv_package = 'virtualenv'
} elsif fact('lsbdistcodename') == 'stretch' {
$virtualenv_package = 'virtualenv'
} elsif fact('lsbdistcodename') == 'xenial' {
$virtualenv_package = 'virtualenv'
} elsif $facts['os']['family'] == 'Gentoo' {
$virtualenv_package = 'virtualenv'
} else {
}
default: {
$virtualenv_package = 'python-virtualenv'
}
}
Expand Down

0 comments on commit 2adb801

Please sign in to comment.