On Wed, Aug 11, 2010 at 12:52 PM, Nigel Kersten <[email protected]> wrote:
>
> > $os_release = "${operatingsystem}-${operatingsystemrelease}"
> >
> > $pkg = ${os_release} ? {
> > /^OEL-/ => redhat-lsb,
> > /^SLES-11./ => lsb,
> > default => redhat-lsb,
> > }
> >
> > package { $pkg:
> > ensure => installed,
> > }
>
> Won't that try to install 'redhat-lsb' on SLES 10 ?
>
Yes, that's wrong. Originally, I wanted to set /^SLES-10/ to something
standard that comes with the distro, but didn't seem like the right
solution, and leaving out that line ended up with something that's
definitely incorrect.
> I think you want
>
> ensure => undef
>
> for SLES 10 if you truly want to not manage it.
>
I did some testing, undef doesn't appear to work since ensure is a required
parameter and undef is not a valid value. Setting package ensure=>undef will
install the package rather than unmanaged. I guess absent would be
acceptable?
package { $pkg:
ensure => ${os_release} ?
/^SLES-10/ = absent,
default => 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 [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.