John, On 07/13/2012 06:38 PM, jcbollinger wrote: > > I would tell hiera to have puppet include the mysql development class, > not each single user and group. That would strike me as silly. > > > Sure, but I'm not seeing how that relates. A more parallel situation > would be if in addition, some unrelated class wanted to be able to > determine which users and groups the mysql development class had > declared. As Puppet now stands, the best way would be for the mysql > development class to provide that data in class variables, or else to > have obtained it from some shared source in the first place. The point > is that neither of those options requires that data to be duplicated in > the structure of the class.
I'm not sure I concur with your conclusion, nor with what you boil the problem at hand down to. Puppet *does* have means to implement business logic that adds resources as implications of roles or aspects, and that is by the singleton nature of classes. You can add users via implication of different possible aspects of nodes by having the "aspect" class include the approprate user class(es) for example. Puppet even allows to make adjustments to such implied resources by means of subclasses. If a node has a very certain role, the respective class will include a subclass of some other feature to specialize its resources appropriately. All this is according to what puppet has so far been designed to do. The problem at hand can be handled to a degree with these language features, as the OP has successfully done already. The approach has scaling issues, so a workaround is currently needed. I don't see why the approach should be discarded as "not currently implemented" out of hand, seeing as the better part of it *is* in fact possible. Felix -- 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.