Can I use wildcards is puppet package ensure to cover multiple releaseversion

Rob van den Eijnde asked:

Using puppet I want to update packages on my (CentOS 5 & 6 servers) in a controlled way. Therefore I don’t want to use ensure=>latest but rather ensure=>3.0.1-1.


class puppet::installation inherits puppet {
        package { "puppet":
            ensure => "3.0.1-1",



I can solve this by changing the ensure rule to 3.0.1-1.el6 but than that won’t work on CentOS 5.


I have been googling for a solution but didn’t find anything pertaining to this particular question.

Any suggestion or reference to a relevant example would be appreciated.

My answer:

Puppet really doesn’t have any functionality for this yet (though they really need it).


For some other workarounds, see this related question.

View the full question and any other answers on Server Fault.

Creative Commons License