Hiera 3.X subkeys lookup

26 views
Skip to first unread message

Adrian Muraru

unread,
Dec 7, 2015, 7:46:43 PM12/7/15
to Puppet Users
With the addition of subkeys lookup, e.g. hiera('a.b.c'), those yaml configuration files already including top level keys with a "." in the key name are rendered invalid.
Is there a way to disable subkey lookup support on demand for a given backend?

thanks,
adrian

Henrik Lindberg

unread,
Dec 8, 2015, 7:02:40 AM12/8/15
to puppet...@googlegroups.com
Not at present. A backend implementation can however (in the next
release of hiera) participate in resolving the subkey lookup. This was
added for backends where the top key would result in something huge
being delivered over the wire, only to then be navigated to a single
value. The addition makes it possible for the backend to get the entire
key "a.b.c" and to deal with it appropriately.

To use that, you would need to create a custom variant of YAML, JSON or
whatever you are using, and then ignore the subkeys and instead use them
as regular keys.

- henrik
--

Visit my Blog "Puppet on the Edge"
http://puppet-on-the-edge.blogspot.se/

Reply all
Reply to author
Forward
0 new messages