[Puppet Users] Re: Roles and profiles dissent

2019-08-24 Thread Chadwick Banning
> > Since reading the reasoning here I've continued to think about this off > and on and still have a hard time with the idea of hard-coding > configuration. It seems like a bit of a paradox within puppet. When > writing modules it is generally accepted to separate any configuration data > f

[Puppet Users] Re: Roles and profiles dissent

2019-08-23 Thread Chris Southall
> > > Good points and a nice example. In the case of my basic module I'm > currently using a separate create_resources line for each class parameter. > Is there a way to iterate over all class parameters using each() so I can > use a single nested loop to create everything? > > You can - add

[Puppet Users] Re: Roles and profiles dissent

2019-08-03 Thread Rob Nelson
> Good points and a nice example. In the case of my basic module I'm currently > using a separate create_resources line for each class parameter. Is there a > way to iterate over all class parameters using each() so I can use a single > nested loop to create everything? You can - add an extra

[Puppet Users] Re: Roles and profiles dissent

2019-08-03 Thread Chris Southall
> > 1) create_resources() is a bit of a kludge left over from puppet 3. > Starting in puppet 4 (and 3’s future parser), iteration was added. Instead > of create_resources($some_hash), you would say $some_hash.each |$title, > $options| {} and create each resource inside the block. You can still

[Puppet Users] Re: Roles and profiles dissent

2019-08-03 Thread Luke Bigum
On Saturday, 3 August 2019 02:03:29 UTC+1, Chris Southall wrote: > > Hi Luke. Thanks for a thoughtful and detailed response. > > You are most welcome. > I'd like to think I grasp the roles/profiles concept, but am just not > convinced it's a better approach. Abstracting away configuration d

Re: [Puppet Users] Re: Roles and profiles dissent

2019-08-02 Thread Rob Nelson
On Fri, Aug 2, 2019 at 9:03 PM Chris Southall wrote: > > > Lets say a module has 10 parameters and supplies defaults for most of > them. When writing a profile you have to choose how many of the class > parameters can remain defaults, how many to override, and how many to > expose as profile par

[Puppet Users] Re: Roles and profiles dissent

2019-08-02 Thread Chris Southall
Hi Luke. Thanks for a thoughtful and detailed response. Quite a similar question was posted about two weeks back, you might find > that very interesting: > https://groups.google.com/forum/#!topic/puppet-users/NW2yuHMJvsY > I saw this, and have been kicking around the idea leading to this post

[Puppet Users] Re: Roles and profiles dissent

2019-08-01 Thread Rob Nelson
I agree with everything Luke said, but would also like to point out 2 other techniques that are useful: 1) create_resources() is a bit of a kludge left over from puppet 3. Starting in puppet 4 (and 3’s future parser), iteration was added. Instead of create_resources($some_hash), you would say $

[Puppet Users] Re: Roles and profiles dissent

2019-08-01 Thread Luke Bigum
Hi Chris, Quite a similar question was posted about two weeks back, you might find that very interesting: https://groups.google.com/forum/#!topic/puppet-users/NW2yuHMJvsY On Thursday, 1 August 2019 17:01:44 UTC+1, Chris Southall wrote: > > Our site is using a collection of puppet modules to man