On Fri, 7 Oct 2011 06:34:00 -0700 (PDT)
jcbollinger jcbollinger wrote:

> On Oct 7, 8:11 am, Arnau Bria <arnaub...@pic.es> wrote:
> > On Fri, 7 Oct 2011 05:55:34 -0700 (PDT)
> >
> > jcbollinger jcbollinger wrote:
> > > While I'm on this topic, I'll throw in that I would find it
> > > terribly confusing if a class or definition failed to honor my
> > > specification for a parameter named 'ensure'.  
> >
> > Sorry John, but I don't understand this point.
> 
> Because of the consistent manner of "ensure" parameters' use in
> Puppet's built-in resources, and the associated conventions even for
> custom and defined types, I would be very surprised if I ever declared
> something with "ensure => 'absent'" but that specification was
> overridden to the opposite.  Indeed, I would be at least somewhat
> surprised by that with *any* parameter.  Don't give me the option if
> you don't intend to honor it.

Ok, now it's clear.
I should put that logic outside the class, in node/param definitions ..
something like:

        if ($::kernel=='Linux') and ($::lsbmajdistrelease=='6') {
                class { 'common::nrpe' :
                                ensure => absnet,
        }else{
                class { 'common::nrpe' :
                                ensure => present,
        }

 
> Inasmuch as this is for testing purposes, however, that's a different
> story.  I don't think I would test in the way you are doing, but then
> again, maybe I would.

> 
> John
> 
Many thanks for your reply,
Arnau

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-users@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