Issue #16147 has been updated by James Turnbull.

Status changed from Unreviewed to Rejected

No because if one of those values isn't specified it assumed the provided 
result is some kind of version string.
----------------------------------------
Bug #16147: Ensure parameter in "package" type behaves in a wrong way
https://projects.puppetlabs.com/issues/16147#change-70087

Author: Gianluca Varisco
Status: Rejected
Priority: Normal
Assignee: 
Category: 
Target version: 2.7.x
Affected Puppet version: 2.7.17
Keywords: 
Branch: 


I made a typo in the package definition. "preset" as a value for the "ensure" 
type instead of "present".

package { 'collectd':
ensure => **preset**,
name   => $collectd::params::packagename,
 }

It was parsed as you can see below:

err: /Stage[main]/Collectd/Package[collectd]/ensure: change from 4.10.7-1.el6 
to preset failed: Could not update: **Execution of '/usr/bin/yum -d 0 -e 0 -y 
install collectd-preset'** returned 1: Error: Nothing to do
 at /tmp/vagrant-puppet/modules-0/collectd/manifests/init.pp:20

Is the ensure attribute validating the values inserted? Is it the correct 
behaviour? Shouldn't it checks for one of the valid values? (present/installed, 
absent, purged, held, latest)

Tested in 2.7.17


-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-bugs?hl=en.

Reply via email to