On 26 June 2013 03:06, Eric Sorenson <[email protected]> wrote:
> Hi, there's been a lively discussion on an interesting pull request that > came in: > > https://github.com/puppetlabs/hiera/pull/137 > > In the interest of soliciting input from a wider audience I'd like to move > the discussion on this request to the list. > > Personally I have two issues, one major/semantic and one minor/syntactic. > > The major problem is that this seems to reverse the entire goal of > "separate data from code" by putting code back into data. In addition to > the issues @ripienaar raised in [the previous recursion PR]( > http://projects.puppetlabs.com/issues/18030#note-7) around > visibility/action-at-a-distance, this seems to make "more magic" and I feel > pretty strongly that we need less magic even if it comes at the expense of > more code -- in this case, a puppet manifest variable that does the > stringified variable interpolation you're proposing in the data. > > The minor problem is that, as Henrik notes, Hiera already has ONE syntax > for variable interpolation that uses a different sigil to Puppet's. That's > kind of weird, and again I'd like to see changes that bring the ecosystem > closer together, not push it further apart. > > A big +1 from me for having the feature. I've needed it a couple of times, and the easiest workaround when not having it is simply data duplication, which is really bad. In some cases I've worked around that data duplication using more code, but usually a bunch of class inheritances in puppet, which IMO is even more magical and non obvious. Also I think this is a much better thing than the Puppet scope variable interpolation, for example I want other systems than puppet to be able to query the hiera data which this allows but the %{} interpolation doesn't. As to the exact syntax I'm quite indifferent, but I would like the hiera CLI or other things to be able to lookup values, which Henrik's %{lookup(key)} proposal might have a hard time doing. -- Erik Dalén -- You received this message because you are subscribed to the Google Groups "Puppet Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/puppet-dev. For more options, visit https://groups.google.com/groups/opt_out.
