Douglas Garstang writes: > On Thu, May 20, 2010 at 10:06 PM, Paul Lathrop <p...@tertiusfamily.net> > wrote: > > If you don't see a use, don't use the feature. However, when you have > > an issue and people suggest external nodes is the answer, you might > > consider listening. > > Paul, I initially asked about a way to parse nodes files such that I > could update them programatically. Various people suggested external > nodes. And, here we are. > > Thanks for your reply. I am listening, but I missed where you > suggested a solution to my question. Therefore, I will pose it again. > How do I set parameters in external nodes such that I don't have to > pass a plethora of qualified global variables to my modules?
You have to put that complicated information somewhere if you need to use Puppet to manage a complicated environment. You don't necessarily have to put it in an external node classifier. Your question seems to be based on what appears to be a very cursory understanding of what a Puppet external node classifer does and some possibly misguided preconceptions about how to implement this complicated instance management scheme you want. If you have a lot of service instances that you want to run on a single machine that have lots of individual quirks (like substantially different software versions and configurations) then you may be better off encapsulating each instance in a class that handles all the quirks. With enough commonality among those service instances you could use class inheritance and put the common parts in a superclass. Then you could use an external node classifier to associate the desired set of classes with a node, and not use variable settings in the classifier at all. Or you could use a more traditional nodes file scheme to list the classes for each node; it's not like you have to do this with an external node classifier. Generally you use an external node classifier if you have an external database of system information that you want to be able to access from within Puppet. When the puppetmaster is compiling catalogs and is configured to use an external node classifier, it passes each node name into your classifer program, which can do absolutely anything it wants (pull a record from a database, make an HTTP query, break out components from a standard naming scheme) as long as it ultimately generates YAML-formatted lists of classes and parameters, which are then used with that node. You could presumably accomplish the same thing by using that external source to generate Puppet manifests, but it probably wouldn't be as simple or convenient. Or you could just edit a bunch of Puppet manifests by hand if you don't have that external source and don't see a reason to create one. -- 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.