On May 17, 4:56 am, Calum <[email protected]> wrote:
> Hello all,
>
> Is there a way of ensuring a package is newer than a certain version?
>
> For instance:
> sudo only supported the includedir option from around version 1.7.1,
> and I am trying to ensure that the sudo package is newer than that.
>
> However, in Puppet 0.25.5, it doesn't appear that you can do
>
> package { "sudo":
>            ensure => ">=1.7.1",
>
> }
>
> Am I right? Is there another way of doing this?


You cannot express such a requirement directly in Puppet.  You can,
however, write

    ensure => "latest"

which will give you a version >= 1.7.1 if one is available (but will
not fail otherwise).  Depending on which package management systems
are involved, you may also be able to create a custom package(s) that
has the requirement you want, and use that to indirectly inforce your
requirement:

package { "sudo-min-version":
    ensure => "1.7.1"
}

That does suppose that you maintain your own package repository, at
least for custom packages (recommended).  That has the advantages of
expressing the minimum version explicitly in your manifests, and of
failing where the desired minimum cannot be satisfied.  It can be used
as either a supplement or an alternative to Package["sudo"].


Cheers,

John

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" 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-users?hl=en.

Reply via email to