That's a fair point, but not applicable to my use-case (multiple puppet
servers).

However, at some point in the near future, I'll be using hiera, and that
will be moot.

On Tue, Aug 14, 2012 at 1:44 PM, Chad Huneycutt <chad.huneyc...@gmail.com>wrote:

> On Tue, Aug 14, 2012 at 11:56 AM, Zachary Alex Stern
> <z...@enternewmedia.com> wrote:
> >
> > FWIW, this works:
> >
> >  class puppet::config {
> >
> >   include puppet::params
> >   $puppetserver=$puppet::params::puppetserver
> >   $runinterval=$puppet::params::runinterval
> >   file { '/etc/puppet/puppet.conf':
> >     ensure  => present,
> >     content => template('puppet/puppet.conf.erb'),
> >     require => Class['puppet::install'],
> >     notify  => Class['puppet::service'],
> >     }
> > }
>
> So what if you would like to use a different puppet server?  You have
> to go in to the module and change the params.pp file?  The code Nan
> suggested allows you to override the value if necessary at the point
> of inclusion, but fall back to a sane default specified in params.pp.
> Personally, I am loving hiera, which provides even more flexibility:
>
> class foo ( $bar = hiera('bar') ) {
> ...
> }
>
> And then $bar can be defined in a module-local class (if using puppet
> hiera backend), module-local yaml file, site-specific yaml file,
> overridden when included, etc, all according to a policy that you
> define.
>
> --
> Chad M. Huneycutt
>
> --
> 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.
>
>


-- 

zachary alex stern I systems architect

o: 212.731.2033 | f: 212.202.6488 | z...@enternewmedia.com

60-62 e. 11th street, 4th floor | new york, ny | 10003

www.enternewmedia.com

-- 
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