If you have created a hash in your hiera data, I believe that hiera can only return that hash.
If you want a piece of it, you can process the hash after you get it out of hiera and into your manifest. I do not have a handy example to offer here, but maybe another list member can help with that. “Sometimes I think the surest sign that intelligent life exists elsewhere in the universe is that none of it has tried to contact us.” Bill Waterson (Calvin & Hobbes) ----- Original Message ----- From: "jdt" <[email protected]> To: [email protected] Sent: Thursday, May 16, 2013 7:49:49 AM Subject: [Puppet Users] hiera query question Hello, I have a yaml file with a hash of network interfaces (ifaces hash), each nic has an associated ipaddress and netmask. Using hiera ifaces fqdn=host.mycompany.com I can get all interfaces back. Is there a way using the hiera cli to get a specific value of a key within the hash? e.g. hiera ifaces fqdn=host.mycompany.com {"eth0"=>{"ipaddress"=>"10.4.115.48", "netmask"=>"255.255.255.0"}, "eth0:1"=>{"ipaddress"=>"10.4.115.58", "netmask"=>"255.255.255.0"}} Can I with a single hiera command get info of only the interface eth0? Or get just the ipaddress of interface eth0? Or was hiera not meant for this kind of use? Best Regards, Jo -- You received this message because you are subscribed to the Google Groups "Puppet Users" 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-users?hl=en . For more options, visit https://groups.google.com/groups/opt_out . -- You received this message because you are subscribed to the Google Groups "Puppet Users" 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-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
