diff options
author | Sergey Stankevich <stankevich@users.noreply.github.com> | 2014-07-24 01:42:12 -0400 |
---|---|---|
committer | Sergey Stankevich <stankevich@users.noreply.github.com> | 2014-07-24 01:42:12 -0400 |
commit | 80b23375120bf8f96625181c44d5e180e12ee073 (patch) | |
tree | 224b85b89a84b9e5be4aa03e796a6063ac4e381d /manifests | |
parent | f01567c877e574264bd9b8816f640203b0e563b0 (diff) | |
parent | 2fc900dbf8d98dcf48677112ae33951347e216ed (diff) |
Merge pull request #95 from ccin2p3/systempkg_when_no_fact_available
Handle case when virtualenv_version fact is not available.
Diffstat (limited to 'manifests')
-rw-r--r-- | manifests/virtualenv.pp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/manifests/virtualenv.pp b/manifests/virtualenv.pp index 769c5a8..d3bc3b5 100644 --- a/manifests/virtualenv.pp +++ b/manifests/virtualenv.pp @@ -108,7 +108,11 @@ define python::virtualenv ( } elsif (( versioncmp($::virtualenv_version,'1.7') < 0 ) and ( $systempkgs == false )) { $system_pkgs_flag = '--no-site-packages' } else { - $system_pkgs_flag = '' + $system_pkgs_flag = $systempkgs ? { + true => '--system-site-packages', + false => '--no-site-packages', + default => fail('Invalid value for systempkgs. Boolean value is expected') + } } $distribute_pkg = $distribute ? { |