On Tuesday, May 15, 2018 at 4:17:58 PM UTC-5, jeffster wrote: > > Good day all, > > Newbie looking for some insight on how to organize manifests on puppet > master. Simple setup with only a couple of machines to manage. One of my > main sticking point is that according to the literature I've seen, they all > seem to agree upon the fact that code must be organized using modules. My > question is--If my setup is so simple, can I do without them? All I have > are a few manifest files and templates. >
It is *possible* to build a functional manifest set that does not use modules, but it is a poor idea. Most sites have at least one (local) module for configuration details specific to that site, however, and it may be that putting your few manifests and templates all into one such module will be sufficient for you, at least to start. > Secondly, should I go with the modules approach and divide my code in said > modules, what happens when a portion of puppet code doesn't really fit > logically into any of them? Would the code be kept at the site.pp level > instead? > All classes should belong to modules, but you may use a local site module such as I already described as a catch-all for miscellany. Precious little is appropriately placed at top scope in the site manifest. Node blocks, if you use them, are by far the most prominent among those. With very few (situational) exceptions, all other manifest code should go into classes or node blocks. The decision is not about logical fit, but rather about the semantics of top-scope code vs. more narrowly scoped code. Note, too, that there is nothing inherently wrong with very small modules, if that seems to be a reasonable alternative for some of your code. 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/9af7c3bc-7692-42bd-920c-3f54abff553e%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.