On Tuesday, July 21, 2015 at 9:46:56 AM UTC-4, jcbollinger wrote: > > > I know nothing more about "wrapper cookbooks" than I can deduce from their > name and your code, but they sound like they may have some similarity with > the Puppet pattern called "Roles & Profiles", conceived by Craig Dunn. You > can find a lot of information about it around the web, but here's the > original description: http://www.craigdunn.org/2012/05/239/. >
I skimmed through this, was interested to find out more about roles and will have to read it more in-depth, but that doesn't seem similar to a wrapper cookbook. But basically, now that I've got it working, I've attained what I would call a "wrapper module" that works fine, using logic similar to what I would do with Chef. > As for your original problem, I'm inclined to agree with you that it's > wrong to put your site-specific nginx config file in a general-purpose > nginx module. The need to modify a module itself to customize it for your > site violates its modularity, and it will bite you as soon as soon as your > site requires two unrelated nginx servers. > Absolutely. I imagine that the book I'm working with was urging me to do that for the sake of simplicity, probably because its target audience is people who are not already familiar with a configuration management tool, so the way they had me do it set off my internal alarms since I'm not in that audience and just need to get familiar with the tool rather than bigger-picture, overarching concepts of CM. > On the other hand, the nginx module should manage the standard nginx > configuration files, because it needs to ensure that the correct > relationships are maintained between that file and other nginx components > (its Package, the nginx Service, etc.), and because other code shouldn't > need to know details of how nginx config files are structured. > Oh definitely, that's also what I'd do. My nginx module does not currently manage the nginx config file, but it would if I were actually writing a proper nginx module. I'm just practicing, at this point. Seems like the next big thing I need to get cozy with is Hiera. Thanks! -- 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/1a854154-401b-4238-9777-7cd350c61a38%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.