Title: Message Title
Henrik Lindberg updated an issue
Puppet / PUP-6862
Lookup doesn't interpolate values into top level (hash) keys
Change By:
Henrik Lindberg
It appears that lookup doesn't interpolate values into the keys of hashes whereas it works with hiera. For example:{code}testhash: "%{osfamily}":subkey: "%{osfamily}""%{osfamily}": "value"{code}With lookup, I get:{code}# puppet lookup --environment=gitlab_runner_lookup --node --explain testhashMerge strategy first Data Binding "hiera"No such key: "testhash" Data Provider "Hiera Data Provider, version 4"ConfigurationPath "/etc/puppetlabs/code/environments/gitlab_runner_lookup/hiera.yaml"Data Provider "Nodes" Path "/etc/puppetlabs/code/environments/gitlab_runner_lookup/hieradata/nodes/.yaml"Original path: "nodes/%{trusted.certname}"Interpolation on "%{osfamily}" Global ScopeFound key: "osfamily" value: "Debian"Found key: "testhash" value: { "%{osfamily}" => {"subkey" => "Debian","%{osfamily}" => "value" }} Merged result: {"%{osfamily}" => { "subkey" => "Debian", "%{osfamily}" => "value"} }{code}And with environment data disabled, hiera returns:{code}# puppet lookup --environment=gitlab_runner_lookup --node --explain testhashData Binding "hiera" Found key: "testhash" value: {"Debian" => { "subkey" => "Debian", "Debian" => "value"} }{code} UPDATE This is per design - it does not make sense to interpolate into the top level keys. It is considered a bug in the hiera interpolation - it was never intended to work.
Add Comment
This message was sent by Atlassian JIRA (v6.4.14#64029-sha1:ae256fe)