voxpupuli / puppet-python

Puppet module for installing and managing Python, pip, virtualenvs and Gunicorn virtual hosts.
https://forge.puppetlabs.com/puppet/python
Apache License 2.0
199 stars 375 forks source link

Python::Pip fails if $ensure='absent' #496

Closed SaschaDoering closed 4 years ago

SaschaDoering commented 5 years ago

Affected Puppet, Ruby, OS and module versions/distributions

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

python::pip { 'PROGRAMM':
  ensure       => 'absent',
  pkgname      => 'PROGRAMM',
  pip_provider => 'pip',
  virtualenv   => '/opt/PROGRAMM',
}

What are you seeing

error during compilation: Evaluation Error: Error while evaluating a Resource Statement, Evaluation Error: Cannot reassign variable '$pip_exec_install'

This occurres in modules/python/manifests/pip.pp in line 224, column 27

What behaviour did you expect instead

A clean run without an error.