Description
Use Case
I would like to be able to ensure that certain packages are the latest version only if they are currently installed. If they are not installed, allow them to remain absent.
Describe the Solution You Would Like
Currently, ensure => latest
will install the package if it is absent, and then ensure it is the latest version. This is not what I desire in certain use-cases.
In light of this, one possible solution would be to add an additional option that could be paired with ensure => present|1.0.0|etc.
that would change the behavior to only correct if the package already exists/is currently installed.
Describe Alternatives You've Considered
I could write some conditional code to determine if the package is already installed before applying this condition, but that would require enumerating existing packages. As far as I know, this functionality does not currently exist in this module, which would mean having to either hack together an Exec statement to determine if the package is installed, or write a custom Facter to enumerate installed packages.