On Wed, Aug 11, 2010 at 11:55 AM, Jason Amato <amato_ja...@yahoo.com> 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 more elegant methods. Assuming facter $operatingsystemrelease for SLES 11 returns 11.x, is this what you are looking for? $os_release = "${operatingsystem}-${operatingsystemrelease}" $pkg = ${os_release} ? { /^OEL-/ => redhat-lsb, /^SLES-11./ => lsb, default => redhat-lsb, } package { $pkg: ensure => installed, } Thanks, Nan -- 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.