As a trivial example maybe we suddenly found that we needed to add a 
configuration file to a bunch of systems quickly. Because my coworker's 
class includes a generic call to 'create_resources("file")' we can 
arbitrarily add any file with any content by simply adding some data to 
Hiera. Realistically, we should want to get this particular file integrated 
into a profile at some point. However, since it's so quick and easy to just 
add it to Hiera my coworker believes it is the better solution.

However, that is somewhat besides the point. I guess the question may more 
accurately be asked as "Why is using profiles with focused base modules 
generally considered a best practice but a very generic, but flexible class 
(as described) is not?"

On Thursday, July 18, 2019 at 8:49:25 PM UTC-5, LinuxDan wrote:
>
> There appears to be contradiction here. 
> If “one-off” changes for “new functionality” are needed, why are the 
> changes going into a base/profile module ?
> Would some more specific and detailed examples be possible ?
>
> —————————————————————————————————
>
> "Sometimes I think the surest sign that intelligent life exists elsewhere 
> in the universe is that none of it has tried to contact us."
>
> Bill Waterson (Calvin & Hobbes)
>
> On Jul 18, 2019, at 8:59 PM, Lesley Kimmel <lesley...@gmail.com 
> <javascript:>> wrote:
>
> Hi all;
> I'm a Linux engineer who went through a typical growth period with Puppet 
> and finally landed on the Roles and Profiles pattern which generally works 
> well.
>
> I have a coworker that started on after me and doesn't like this pattern 
> and having to update profiles or base modules when new functionality is 
> needed; especially for quick one-off things.
>
> So he's basically started creating one class containing 'create_resource' 
> declarations for the standard Puppet resource types (file, user, group, 
> exec, etc.). Then he just adds all of the appropriate parameters in hashes 
> in Hiera. He's convinced this is the right way to do it since he hasn't yet 
> ran into a scenario where this doesn't work easily.
>
> I told him if it was the right way then all the smart people working with 
> and developing Puppet would have put it out as the best practice. However, 
> I can't seem to come up with a really great scenario that will convince 
> him. Can anyone share thoughts on scenarios where this patter will blow up 
> [hard]?
>
> 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...@googlegroups.com <javascript:>.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/puppet-users/c46b1e54-f3c1-4429-b270-68189e6937f0%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/puppet-users/c46b1e54-f3c1-4429-b270-68189e6937f0%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>
>

-- 
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/8143b443-4a28-45b4-9931-d200e3e91223%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to