On Tue, Jan 28, 2014 at 2:41 AM, Ariel T. Glenn <ar...@wikimedia.org> wrote:
> Hi puppet wranglers, > > We're trying to refactor the WMF puppet manifests to get rid of reliance > on dynamic scope, since puppet 3 doesn't permit it. Until now we've > done what is surely pretty standard pupet 2.x practice: assign > values to a variable in the node definition and pick it up in the > class from there dynamically. Example: we set $openstack_version > to a specific version depending on the node, and the nova and > openstack classes do different things depending on that value. > > Without dynamic scoping that's no longer possible, so I'm wondering > what people are doing in the real world to address this, and > what best practices are, if any. Hiera? Some sort of class > parameterization? Something else? > > It should go without saying that we'd like not to have to massively > rewrite all our manifests, if possible. > > In puppet3 variables assigned in the node are still global. It's the only place other than facts (or hiera) that you can assign them and have their scope propagate. So, this'll continue working. I think the future path is surely to use hiera rather than assigning variables in role classes (and making tons of role classes based on realm/cluster/site/etc). - Ryan _______________________________________________ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l