We just bumped up our master from 2.6 to 2.7 to get yesterdays
security fix, and I'm trying to clean up the Dynamic warnings ready
to push on to 3.x.

I've read

http://docs.puppetlabs.com/guides/scope_and_puppet.html

but can't see a good alternative for a pattern we use to allow tuneable
settings in our modules.
Generally we provide 'sane' default settings, but allow an including class
to override them like this:

    class dynamic {
      $thingy_tunable = "non-default"
      include thingy
    }

where thingy looks like:

class thingy {
  # overrideable defaults
  if $thingy_tunable { $tunable = $thingy_tunable } else { $tunable =
"default" }
  # .... actual resources defined here .....
}

Options I'm sort of aware of:

1. parameterized classes - heard they don't work with include, which
would mean quite a lot of surgery.
2. Hiera ALL the things - we've been using hiera to configure a fair
few modules, and it's been great.
                                     But we tend to use it for
'node-specific globals' - I'm not sure how I could
                                     do per-module lookups using it
(without which we'd need a lot of repetition in the
                                     hierarchy.


As I said, we're looking to get to 3.x with PuppetDB asap - wondered
which of the 2 options above are
least likely to get in the way of that?

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-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to