On Wednesday, April 23, 2014 12:43:24 PM UTC-5, Björn Becker wrote: > > I guess that my module isn't best practice: > >
Actually, yes, it's pretty bad. My apologies for being blunt. Specifically, 1. You are polluting the global namespace with your defined-type names. 2. Each manifest file in your module should contain exactly one class definition or one defined type. 3. Defined types should represent resources (at some level of abstraction) as opposed to actions, and their names should be nouns, not verbs. 4. It is often good practice for defined types to actually use their titles. On the flip side, it is poor practice to define type parameters that duplicate the title, or to use titles that are redundant with the type name and / or a characteristic property. Some might also suggest breaking up that big defined type into smaller pieces, as indeed the partial code in my previous response starts to do. I don't think there's necessarily a clear best practice there, but organizing the module as a collection of smaller pieces could make it easier to understand and maintain. John -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/7cfe3e47-b8c7-4286-9921-c84b6a8c0d86%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.