On Sun, 27 Jun 2010, Douglas Garstang wrote: > node 'node1.fr.xxx.com' { > include facility::sjc > include ldap::client > } > > In this example, variables defined in facility::sjc are not visible in > ldap::client (in this case, it would be the IP address of the local > LDAP server).
I'd probably use extlookup(), but you could try something like this (untested): node 'node1.fr.xxx.com' { $facility_name = "sjc" include ldap::client } class facility { $ldapserver = undef # this gets overridden in facility::sjc } class facility::myfacility { include "facility::${facility_name}" } class facility::sjc extends facility { $facility::ldapserver = "1.2.3.4" } class ldap_client { include facility::myfacility ... do something with $facility::ldapserver } > Another approach is to do everything with node inheritance Common opinion seems to be that node inheritance should be avoided. --apb (Alan Barrett) -- 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.