On 3 July 2013 00:27, Eric Sorenson <[email protected]> wrote:

> Hi Jesse -- I think this is getting pretty close, but you're right this
> would not work without a major version bump. Some comments/questions from
> the thread--
>
> - The 'creeping perlism' of more sigils seems to be pretty unpopular,
> instead most people favour concrete syntax like your example below
>
> - Erik had concerns about using hiera data outside of Puppet - is this a
> common use case? we're looking at moving hiera closer to puppet (i.e. for
> data in modules) and if we can move to a single codebase there it
> simplifies things a fair bit (i.e. relying on future parser) at the expense
> of hiera-without-puppet. Is it using hiera as a library that's important or
> specifically the command-line program?
>

It is mostly to be able to use it as a library.

We use hiera for node classification in some installations and want to be
able to lookup what classes a node should get (and also see the value of
any other hiera key).

At the moment we use the hiera node terminus for that:
https://github.com/puppetlabs/puppet/pull/1414
And for looking up values we mainly use a little rest api I wrote:
https://github.com/dalen/hieralookup

As long as there is a api where you can input a hiera key and a scope to
get back the value I can modify it to fit that :)


>
> - Exploring that line of thought further, what if the right-hand-side
> value could contain Puppet DSL expressions? Obviously this opens the door
> to some crazy stuff -- I already have concern with putting code back into
> data and this goes further down the path, but y'all have pretty convincing
> use cases for increasing sophistication in hiera, so it seems worth
> thinking about taking it to the logical extension.
>

I've kind of already done that with the puppetdbquery hiera backend. Could
be nice to have that done in a more general way and not have a specific
hiera backend for every type of lookup function you could want there.

I agree that it feels odd to put code inside data though. But it is a very
effective way to reuse forge modules without having to modify them and not
having to hardcode or duplicate a lot of data that can be looked up using
some function.

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


Reply via email to