On Aug 17, 5:23 pm, Rich Rauenzahn <[email protected]> wrote:
> On Wed, Aug 17, 2011 at 6:44 AM, jcbollinger <[email protected]> 
> wrote:

> > Therefore, instead of applying
> > that logic to choose which node declaration to apply, you can instead
> > use it either within node declarations or without to set your magic
> > variable or class parameter, or to include a different / extra class.
> > For example:
>
> > node /.*our-db\d+/     {
> >  $failover = $hostname ? { /our-db\d+/ => false, default => true }
> >  include system:our_db
> > }
>
> I'm not following -- doesn't that example have the same problem?   The
> variable $failover has no visibility outside of this scope.


It solves the problem by bringing Class["system:our_db"] into the
node's dynamic scope, instead of by making the $failover variable
accessible outside that scope.  That will stop working in 2.8, but it
could serve as the temporary workaround you're looking for.


> Anyway, discussing it more internally, we're going to use an attribute
> of the machine database.


Given that you have such a database, that's what I would go with,
too.  I'm not sure what Puppet's interface to it might be, but I'd
categorize such a solution in the same group as extlookup() and hiera,
both of which I like.

Good luck.


John

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

Reply via email to