basho/puppet-riak — pull request #15 by haf (2013-04-03 06:42:49+00:00)
Title: Feature/package version

When I try this on another puppet module:

```
Error: Could not update: Execution of '/bin/rpm -U --oldpackage /tmp/riemann-0.2.0-1.noarch.rpm' returned 1: package
riemann-0.2.0-1.noarch is already installed

Error: /Stage[main]/Riemann::Package/Package[riemann]/ensure: change from 0.2.0-1 to 0.2.0 failed: Could not update: Exe
cution of '/bin/rpm -U --oldpackage /tmp/riemann-0.2.0-1.noarch.rpm' returned 1: package riemann-0.2.0-1.noarch i
s already installed
```

for code:

``` puppet
$package_version = $version ? {
'' => 'installed',
undef => 'installed',
default => $version,
}
package { 'riemann':
ensure => $package_version,
source => "/tmp/$package_name",
provider => $package_provider,
require => Wget::Fetch['download_riemann'],
}
```

Is this a problem with puppet or am I doing something wrong?