What I particularly do is to make sure that every module has the
$package_ensure class parameter set to 'present' by default. If I want a
particular version, then I tell when I instantiate the class. One example
would be:
class a($package_ensure = 'present') {
package { 'whatever-a' :
ensure => $package_ensure,
....
}
}
On my nodes.pp or Hiera you could say:
node 'host-a' {
include a
}
node 'host-b' {
class { 'a' :
package_ensure => '1.1.2',
}
}
That's the way I manage here. It's been working okay so far. I great help
is to have your own yum/apt repositories, so you manage versions in a more
controlled approach.
I hope it helps.
-frederiko
On Wed, Sep 25, 2013 at 6:58 AM, Chris McDermott <[email protected]>wrote:
> I haven't found a solution that I'm totally happy with either, but what
> I've done in a few cases is specify particular versions with ensure. Like
> this:
>
>
> $varnish_version = $::environment ? {
> 'dev' => '3.0.4-1.el6',
> 'staging => '3.0.4-1.el6',
> 'prod' => '3.0.3-1.el6',
> }
>
> package { 'varnish':
> ensure => $varnish_version
> }
> package { 'varnish-libs':
> ensure => $varnish_version,
> }
> package { 'varnish-libs-devel':
> ensure => $varnish_version,
> }
>
> Obviously you can't do that for every package installed on your hosts, but
> it works if you're only managing a small number with puppet. You need to
> watch out for dependencies though. Then to update your prod environment,
> for instance, you can just update the version string to match dev and
> staging. You could also move the version strings out into hiera, and manage
> them there, so all package version data is in one place.
>
> Chris
>
>
>
> On Tue, Sep 24, 2013 at 2:31 PM, François Chenais <
> [email protected]> wrote:
>
>> Hello,
>>
>> I got many classes, using the well known template ...
>>
>> package
>> ensure => XXX
>> notify => service
>>
>> file
>> require => package
>> notify => service
>>
>> service
>> require => File, Package
>>
>>
>> ... with ensure value XXX set to 'latest'.
>>
>>
>> This implies that package could be updated when I change a value
>> in config file even if I don't want to update it ... especially in
>> production ...
>>
>> A solution can be changing all ensure value to 'present' or 'installed'
>> but I'm not
>> the owner of the code so I would like to know if there is a way to
>>
>> - deactivate the package update through a command line option ?
>> - change the ensure value using
>>
>> - a command line option
>> - a fact
>> - a tag
>> - ???
>>
>>
>>
>> More generally, what's the best practice to manage software updates using
>> puppet :
>>
>> - ensure => present
>> - fix pkg repositories :/
>> - ???
>>
>>
>> Thanks a lot
>>
>>
>> François
>>
>>
>>
>>
>>
>>
>>
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Puppet Users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> To post to this group, send email to [email protected].
>> Visit this group at http://groups.google.com/group/puppet-users.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/puppet-users.
> For more options, visit https://groups.google.com/groups/opt_out.
>
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.