Re: [Puppet Users] install package based on operatingsystem AND operatingsystemrelease

2010-08-11 Thread Nan Liu
On Wed, Aug 11, 2010 at 12:52 PM, Nigel Kersten wrote: > > > $os_release = "${operatingsystem}-${operatingsystemrelease}" > > > > $pkg = ${os_release} ? { > > /^OEL-/ => redhat-lsb, > > /^SLES-11./ => lsb, > > default => redhat-lsb, > > } > > > > package { $pkg: > > ensure => installed

Re: [Puppet Users] install package based on operatingsystem AND operatingsystemrelease

2010-08-11 Thread Gustavo Soares
I've been doing like this. (Don't know if it is the better ways.. but.. :)) if ($operatingsystemrelease >= 4) and ($operatingsystemrelease < 5) { $release = "el4" } else { if ($operatingsystemrelease >= 5) and ($operatingsystemrelease < 6) { $release = "el5" } } package { abc: ensure => "0.25.

Re: [Puppet Users] install package based on operatingsystem AND operatingsystemrelease

2010-08-11 Thread Nigel Kersten
On Wed, Aug 11, 2010 at 9:48 AM, Nan Liu wrote: > On Wed, Aug 11, 2010 at 11:55 AM, Jason Amato wrote: >> >> How can I create a class to install a RPM based on the o/s type and >> the o/s release. >> I want to install a package on SLES, but only if it's release 11, not >> 10. >> > > I suppose you

Re: [Puppet Users] install package based on operatingsystem AND operatingsystemrelease

2010-08-11 Thread Nan Liu
On Wed, Aug 11, 2010 at 11:55 AM, Jason Amato wrote: > How can I create a class to install a RPM based on the o/s type and > the o/s release. > I want to install a package on SLES, but only if it's release 11, not > 10. > > I suppose you can write nested if statements. Not sure if there are other

Re: [Puppet Users] install package based on operatingsystem AND operatingsystemrelease

2010-08-11 Thread Joe McDonagh
On 08/11/2010 11:55 AM, Jason Amato wrote: How can I create a class to install a RPM based on the o/s type and the o/s release. I want to install a package on SLES, but only if it's release 11, not 10. I can do this, but how do I incorporate the release in here... thanks in advance! class packa

[Puppet Users] install package based on operatingsystem AND operatingsystemrelease

2010-08-11 Thread Jason Amato
How can I create a class to install a RPM based on the o/s type and the o/s release. I want to install a package on SLES, but only if it's release 11, not 10. I can do this, but how do I incorporate the release in here... thanks in advance! class packages1 { $lsb = $operatingsystem ? {