diff --git a/manifests/install.pp b/manifests/install.pp index fe0e1911..cb2076ee 100644 --- a/manifests/install.pp +++ b/manifests/install.pp @@ -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' } }