On Apr 11, 12:04 pm, Josh <joshua.l.greenb...@gmail.com> wrote: > This is more of a style question than implementation. I have a bunch of > nodes running the same software but in many cases they need config files > that are customized for that specific node. I was thinking I could push all > the main files from the app through a central class and have separate > classes for each individual node that has the config files. Is this the > best way to do this or does it go against the purpose of using puppet?
There is no inherent problem with that approach, but for a little extra effort you can get something that will be easier to maintain. I'm not a big fan of parameterized classes myself, but I heartily endorse an external data store, accessed via Hiera. Instead of using per-node classes, record per-node data where needed. You can use that data to fill templates, choose among alternatives in your manifests, set resource properties, etc.. > Also, for implementation, is it best practice to create a separate module > and class for each node where the class includes only that module? Thanks. I would say not. It might or might not make sense to put the per-node classes in the module with the main classes for the application in question, but I certainly see no reason to separate them from each other. But the question is moot if you choose a cleaner strategy. John -- 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.