> On Mon, Oct 22, 2012 at 12:37 PM, jcbollinger <john.bollin...@stjude.org> 
> wrote:
>   $param1 = 'default1',
>   $param2 = 'default2' ) {
>   # declarations
> }
> 
> I recommend some variation on
> 
> class mymodule::foo {
>   $param1 = hiera('foo::param1', 'default1')
>   $param2 = hiera('foo::param2', 'default2')
>   # declarations
> }

As puppet is changing way of setting parameters every 6 month (and me too, as i 
changed my mind about the best way to do it), I really dislike to put hiera 
usage inside my class definition.

I rather use a configuration class where I can easily change way of settings 
values.

It might look like for example :

class config::module {
        $param=mood_of_the_day(something)
}

and then calling
class {'module::foo':
   param =>p config::module::param
}

Using this method I have been able to switch from extdata to hiera in a few 
hours of works.
 

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to