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 packages1 {
         $lsb = $operatingsystem ? {
                 OEL =>  redhat-lsb,
                 SLES =>  lsb,
                 default =>  redhat-lsb
         }
         package { $lsb:
                 ensure =>  installed
         }

}


-Jason

Try using a nested selector in the package name selector, and setting 10 => "absent".

--
Joe McDonagh
AIM: YoosingYoonickz
IRC: joe-mac on freenode
"When the going gets weird, the weird turn pro."

--
You received this message because you are subscribed to the Google Groups "Puppet 
Users" group.
To post to this group, send email to puppet-us...@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to