[Puppet Users] Re: Using foo::params, inheritance, and parameterized classes simultaneously?

2012-01-14 Thread Alessandro Franceschi
Gary has already given a good reply, let me just add some of the motivations that have driven this approach in my new modules (example42): - I want all the variables used in a Puppet class to be visible to the system (in my case Puppi, so that I can do interesting things with them): Puppet know

[Puppet Users] Re: Using foo::params, inheritance, and parameterized classes simultaneously?

2012-01-14 Thread Justin Ellison
I see now - it gives you a way to have intelligence in the selection of the default value, yet allow the declaration to ultimately override that intelligence if it chooses to do so. Thanks! Justin On Jan 13, 4:17 pm, Gary Larizza wrote: > On Fri, Jan 13, 2012 at 2:02 PM, Justin Ellison wrote: >

[Puppet Users] Re: Using foo::params, inheritance, and parameterized classes simultaneously?

2012-01-17 Thread Ryan Bowlby
Thanks for the great replies Nigel. As a person currently rolling out Puppet into production I'm stricken with doubt about how to best represent variables in a module. It would seem to me that I need to: 1. set default values in params.pp (based on facts, yadda yadda) 2. allow those values to be o

[Puppet Users] Re: Using foo::params, inheritance, and parameterized classes simultaneously?

2012-01-17 Thread Ryan Bowlby
Looking into it now, thanks. Related question, I see a lot of modules where an optional package is available as another class, example include apache::ssl would install apache and mod_ssl. With parametrized classes is it now better to make this a parameter? node blahblah { class { 'apache':

[Puppet Users] Re: Using foo::params, inheritance, and parameterized classes simultaneously?

2012-01-18 Thread jcbollinger
On Jan 18, 1:32 am, Ryan Bowlby wrote: > Looking into it now, thanks. Related question, I see a lot of modules > where an optional package is available as another class, example > > include apache::ssl > > would install apache and mod_ssl. With parametrized classes is it now > better to make thi

[Puppet Users] Re: Using foo::params, inheritance, and parameterized classes simultaneously?

2012-01-25 Thread Justin Ellison
I was looking through the Puppet style guide for something unrelated, and noticed that it explicitly discourages doing things in this exact manner: http://docs.puppetlabs.com/guides/style_guide.html -> Section 11.9. Does the style guide need updated then? Justin On Jan 13, 4:17 pm, Gary Larizza

Re: [Puppet Users] Re: Using foo::params, inheritance, and parameterized classes simultaneously?

2012-01-14 Thread Nigel Kersten
On Sat, Jan 14, 2012 at 2:09 PM, Alessandro Franceschi wrote: > Gary has already given a good reply, let me just add some of the > motivations that have driven this approach in my new modules (example42): > - I want all the variables used in a Puppet class to be visible to the > system (in my cas

Re: [Puppet Users] Re: Using foo::params, inheritance, and parameterized classes simultaneously?

2012-01-15 Thread Alessandro Franceschi
On Sunday, January 15, 2012 12:41:50 AM UTC+1, Nigel Kersten wrote: > > > > What would it take for you to just have one source of truth for data > Alessandro? > > e.g. what would we have to change about Puppet for us to simply use Hiera > ? > > We're looking to integrate Hiera into Puppet fo

Re: [Puppet Users] Re: Using foo::params, inheritance, and parameterized classes simultaneously?

2012-01-15 Thread Walter Heck
I would be very happy to see a seamless/lazy/magic approach to using variables. Something similar to what Al quoted seems nice: I'd like to be able to have the option to feed values to variables in different places (of which one will take precedence over the other, and you preferrably add a value o

Re: [Puppet Users] Re: Using foo::params, inheritance, and parameterized classes simultaneously?

2012-01-15 Thread R.I.Pienaar
- Original Message - > I would be very happy to see a seamless/lazy/magic approach to using > variables. Something similar to what Al quoted seems nice: I'd like > to > be able to have the option to feed values to variables in different > places (of which one will take precedence over the

Re: [Puppet Users] Re: Using foo::params, inheritance, and parameterized classes simultaneously?

2012-01-15 Thread Nigel Kersten
On Sun, Jan 15, 2012 at 12:42 AM, Alessandro Franceschi wrote: > > So, to reply to your question, Nigel, something like a hiera backend or a > Puppet function that does what is written before in any Puppet setup would > be what I need. > > The ideal, maybe, would be a simple function that does t

Re: [Puppet Users] Re: Using foo::params, inheritance, and parameterized classes simultaneously?

2012-01-15 Thread Walter Heck
On Sun, Jan 15, 2012 at 16:48, R.I.Pienaar wrote: > > > sounds like you want to use hiera > > http://www.devco.net/archives/2011/06/06/puppet_backend_for_hiera.php Ah, I didn't see before that it actually gets it's data from mutliple backends. That's pretty sweet! -- Walter Heck -- follow @wal

Re: [Puppet Users] Re: Using foo::params, inheritance, and parameterized classes simultaneously?

2012-01-16 Thread Alessandro Franceschi
On Sunday, January 15, 2012 9:30:02 PM UTC+1, Nigel Kersten wrote: > > > > On Sun, Jan 15, 2012 at 12:42 AM, Alessandro Franceschi wrote: > >> >> So, to reply to your question, Nigel, something like a hiera backend or a >> Puppet function that does what is written before in any Puppet setup woul

Re: [Puppet Users] Re: Using foo::params, inheritance, and parameterized classes simultaneously?

2012-01-16 Thread Nigel Kersten
On Mon, Jan 16, 2012 at 7:23 AM, Alessandro Franceschi wrote: > > On Sunday, January 15, 2012 9:30:02 PM UTC+1, Nigel Kersten wrote: > >> >> So here's the rough idea we have in place. >> > > Let me contextualize: What you suggest here is what may be introduced in > 2.8 , when Hiera will be integr

Re: [Puppet Users] Re: Using foo::params, inheritance, and parameterized classes simultaneously?

2012-01-17 Thread Nigel Kersten
On Tue, Jan 17, 2012 at 9:33 PM, Ryan Bowlby wrote: > Thanks for the great replies Nigel. As a person currently rolling out > Puppet into production I'm stricken with doubt about how to best > represent variables in a module. It would seem to me that I need to: > > 1. set default values in params