On Wed, Sep 29, 2010 at 6:46 AM, Bruce Richardson <itsbr...@workshy.org>wrote:

> On Wed, Sep 29, 2010 at 02:59:28PM +0200, Héctor Rivas Gándara wrote:
> >
> > Also, from my tests I checked that the parameters (please correct me if I
> am
> > wrong):
> >  - Are stored in global scope: All classes has access to it.
>
> No.  The parameters have "node" scope.  Any class included within the
> node will be able to see the node's values.
>
> >  - But if a class defines that parameter, it is used the class value.
>
> Yes.  If you want to be able to set a default within a class, but have
> that possible to be overridden, you can do something like this:
>
> class example {
>
>        if $example_variable {
>                $variable = $example_variable
>        } else {
>                $variable = 'Default Value'
>        }
> }
>
> Personally, I try to avoid setting default values within classes.
>
> > But I do not like too much the extlookup solution because:
> >  * I can not define a common subset of groups that all host will inheret
> > (except the ones that overwrite this value). May be using again the
> > "default_connect_allowed_groups" variable.
>
> There's no nice way to do it.  Aas I understand it, Puppet's external
> nodes code doesn't support arrays,


the external node classifier interface allows parameters to be set as
arrays, the dashboard currently does not.



> let alone appending to arrays.


the interface is just a yaml serialization. Logic for appending arrays could
be supported, but it is up to the author of the external node classifier to
support it.


>  Every
> time I look at using external node classifiers, I walk away from it
> again.  If I were managing sites of such a scale that it were
> unavoidable, I'd be an unhappy person (time to dust off the Ruby
> skills).
>
> >  * I think that is bad to have configuration in two places: external
> nodes
> > and cvs's files.
>
> I agree.
>
> --
> Bruce
>
> A problem shared brings the consolation that someone else is now
> feeling as miserable as you.
>
> --
> 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<puppet-users%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/puppet-users?hl=en.
>
>

-- 
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