On Wednesday, May 3, 2017 at 4:35:02 PM UTC-5, Lesley Kimmel wrote: > > I've [somewhat] recently started developing Puppet modules for use with > Foreman[...] >
I recently came across some modules on the Forge that got me considering > using modules with defined types exposing their functionality. I think this > seems to be the ultimate way to do things because it allows the same > flexibility as the purpose-specific module setup while essentially > requiring you to have another module for your application or workflow which > utilizes the defined types from all of your defined type augmented modules. > I'm not sure I entirely follow you here, but since you specifically brought up Foreman, you should be aware that defined types are *resource* types, and Foreman cannot declare Puppet resources directly (the Puppet ENC interface has no provision for it). Thus, if you had in mind to set the parameters of instances of your defined types via Foreman then your plan is a non-starter. Inasmuch as you describe creating a class that uses the defined types, I suspect your plan is different, but then I don't see what advantage you perceive in defined types. You can just as easily create a class that declares other classes. In fact, this is one of the key concepts in the Roles & Profiles pattern <http://www.craigdunn.org/2012/05/239/>, which is aimed pretty squarely at the problem you describe, at least as I understand it. You should also be aware that Puppet's best mechanism for feeding parameters to classes is automated data binding via Hiera. You'll find lots of information on that via Google. The main drawback from your perspective would probably be that you cannot manage Puppet's external data via Foreman, at least not as far as I am aware. 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/2787490b-b956-42e3-885e-5f8fd296d0ac%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
