On 02/15/2013 07:42 PM, Tiago Cruz wrote:

> I'm using "lsbmajdistrelease" to discover the verstion of CentOS, but
> I've noticed that some hosts has broken, because the package
> "redhat-lsb" is missing. If I install the package with yum, everything
> works well, but I would like to solve this with puppet.

You can try and use $::operatingsystemrelease instead of
lsbmajdistrelease. That way you won't need to install redhat-lsb on your
machines... I really hate to install few dozen of packages just to get
that one fact going...

This is the way I use $::operatingsystemrelease instead of
$::lsbmajdistrelease :

case $::operatingsystemrelease {
  default: {
    some code
  }
  /^5.*/: {
    some code for rhel 5
  }
  /^6.*/: {
    some code for rhel 6
  }
}


Hope it helps.

-- 
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 puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to