>
>
> I've done the same thing in the past, just use Hiera to provide params to 
> technology modules.  It feels a little off, it seems like the "right" way 
> is to wrap a technology module in a profile and then put the profile:: 
> params in Hiera.
>

Yeah, you're right that the "right" way is wrap it and to put profile:: 
keys in hiera.  But one of the first principals of the Puppet Style Guide 
is readability, and I think most of the time it's more readable without the 
"profile::" prefixes.


> Honestly I was just putting a few w things in my example class to flesh it 
> out but I used contain because I use the Puppetlabs NTP module 
> <https://github.com/puppetlabs/puppetlabs-ntp/blob/d6a91973674cd003e6558ba0e1da16a6f1ab444d/manifests/init.pp#L309>
>  
> as my template or benchmark.  The subtleties of `include` vs `contain` 
> evade me.
>
>  
They do for me as well.  But, I think because you don't know why you need 
`contain`, that means you don't actually need it. ;-)

>From what I recall, it's from early Puppet days when resources somehow 
"leaked" out of their class?  And that was bad?  So the "anchor pattern" 
was invented, and then that was formalized into `contain`.  I think for 99% 
of cases, `include` is sufficient.  

You should also be able to replace your resource chaining arrows with 
proper use of `notify` and `subscribe` parameters in resources.

Happy Puppeting!

-- 
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/49b77955-03f5-4d52-aa41-a0aa203d879fo%40googlegroups.com.

Reply via email to