Last modified: 2014-11-03 18:24:27 UTC
It would be nice if Puppet classes and variables could not only be chosen on an instance level as now, but also for the containing project. Thus, if on the project level class A is selected or variable B is set to C, all instances in that project have these applied. For example, in Tools we could set the hostname of the mail relay or the grid master this way in the UI and wouldn't have to do that in the central Puppet repository where it feels out of place. Caveat #1: As this would apply Puppet classes/variables on instance creation, the warnings about initial Puppet configurations apply. But project owners would have to actively enable project-wide settings, so if it suits them, fine, if not, they won't complain compared with today. Caveat #2: If we just use the same UI for instances and projects, there's no obvious way to set the project-wide default for a variable to "some string", but set it for an instance to nothing/an empty string. IMHO this falls under the "won't complain" category as it's a fringe case.
When puppet 3 is available we'll be able to do this via hiera.
Giuseppe, with Gerrit change #168984 merged, I suppose this is now (almost?) possible? Just need to add "hiera_include('classes')" to role::labs::instance or something like that?
Tim: what are you *really* trying to achieve? I can imagine 2 scenarios: 1) You want to set some project-wide configuration for puppet classes you will include later; this can be done by defining them in the Hiera:<projectname> page on wikitech in a yaml format (it's still undocumented as of today, but...) 2) You want to have some classes applied everywhere, and the solution is to include the hiera_include('classes') at the top-scope, so maybe in labs.pp; I have to play a little with this to understand if I really like it (given we already have a sort-of ENC in our crappy ldap integration).