puppet-python icon indicating copy to clipboard operation
puppet-python copied to clipboard

python::pip falls through to uninstalling the package if ensure doesn't match one of the patterns

Open ftzdomino opened this issue 6 years ago • 0 comments
trafficstars

Affected Puppet, Ruby, OS and module versions/distributions

  • Puppet: 3.7.2
  • Ruby: 2.1.5p273
  • Distribution: Debian
  • Module version: v2.1.1

How to reproduce (e.g Puppet code you use)

python::pip { 'wal-e' : ensure => 'v1.1.0', pkgname => 'wal-e', pip_provider => 'pip', virtualenv => '/var/local/py-virtual-env/wal-e', owner => 'root', extras => ['aws'], timeout => 1800 }

What are you seeing

python::pip uninstalls the wal-e package because uninstall is the default: https://github.com/voxpupuli/puppet-python/blob/master/manifests/pip.pp#L274

What behaviour did you expect instead

An error on an unrecognized value instead of a default action of removing the package.

Output log

Notice: /Stage[main]/Nni::Wal_e_virtualenv/Python::Pip[wal-e]/Exec[pip_uninstall_wal-e]/returns: executed successfully

Any additional information you'd like to impart

ftzdomino avatar Apr 26 '19 18:04 ftzdomino