Hey Doug, Chuck is right the way to model the ${datacenter::new_york::VARIABLE_NAME} variable is to do the following:
class datacenter { } class datacenter::new_york inherits datacenter { $VARIABLE_NAME = foo } Then you can refer to that foo valuable with the fully qualified var name ${datacenter::new_york::VARIABLE_NAME) If you need to find that value in a template you will have to find it with the scope.lookupvar() erb function. i.e. <%= scope.lookpvar("datacenter::new_york::VARIABLE_NAME") %> -Tom Thomas A. McGonagle t...@dataero.com Google Voice: 617-229-5185 On Fri, Jun 25, 2010 at 9:55 AM, Chuck <cssc...@gmail.com> wrote: > Does this do it? > > ${datacentre::new_york::VARIABLE_NAME} > > > On Jun 24, 3:26 pm, Douglas Garstang <doug.garst...@gmail.com> wrote: >> Some days I wonder why I even bother with puppet. >> >> --- >> classes: >> - datacentre::new_york >> - role::appserver >> - elements::tfel0 >> environment: production: >> parameters: >> < set key/value pairs here > >> >> class ldap { >> < do some stuff that behaves slightly differently between different >> data centers > >> >> } >> >> class role::appserver { >> include ldap >> >> } >> >> So, I wanted to set some variables in the datacentre::new_york class >> and be able to use them in the ldap class that was included from the >> role::appserver class. Obviously, this isn't an easy thing to do in >> puppet. How can do I it? I didn't want to set those data center >> variables in the external node because that's just plain stupid. >> >> Every time I try and do something in puppet it bites me in the ass >> because the variable scoping just doesn't make sense. >> >> Doug. > > -- > 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. > > -- 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.