Hi all,

I am working on rewriting my entire puppet environment and try to
'fix' 'Dynamic lookup' as it will be deprecated in some time, but even
after reading quite some docs and on the forum, it's not really clear
to me.

What I have read so far, is that each variable must be fully-qualified
or parameterized in a class.
As a quick 'fix' I thought I might just make them all fully-qualified,
but that doesn't seem to work within my current setup

This is the way I already had configured my nodes
node 'prodserver.mydomain.com' inherits node 'prd' which inherits node
'basenode

node 'prodserver.mydomain.com' inherits prd {
 ....
} # End node

node prd inherits basenode {
  $gblvar_zone = 'prd'
} # End node

node basenode {
  $gblvar_puppetserver = 'puppet.mydomain.com'
  $gblvar_domain = 'mydomain.com'
  .....
} # End node

Normally I would reference these variables in other classes like "$
{gblvar_zone}", but as this is a Dynamic lookup, I redefined them as "$
{::gblvar_zone}" or $::gblvar_zone. This however does not work.

If I remove the lines from the node  and put it site.pp
eg: $gblvar_zone = 'prd'
it works fine.

I really love the way I can inherit from nodes and define new or
overrule existing variables.

Is this a bug that $::varx works only from site.pp or is it by design
and do I need to find another way to inherit and overrule variables ??
or can I just put all global variables in site.pp

Regards,
Rene

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