Issue #10789 has been updated by Patrick Otto.

Status changed from Needs Decision to Closed


----------------------------------------
Feature #10789: Adding the "keys" keyword to extract keys from a Hash
https://projects.puppetlabs.com/issues/10789

Author: Jerome Loyet
Status: Closed
Priority: Normal
Assignee: Nigel Kersten
Category: language
Target version: 
Affected Puppet version: 
Keywords: 
Branch: 


Hi,

we are using an custom ERB to fetch our configurations. We use Hashes a lot and 
we didn't find a way to extract keys from a Hash with native keywords. We 
always have to use inline_templates in association with split:

    $mailaliases_title = split(inline_template("<%= 
sys_mailaliases.keys.join('@@@@') %>"),'@@@@')
    system::mailalias::create {$mailaliases_title:}

It would be great to have this natively into the puppet language to be able to 
do something like:
    system::mailalias::create {keys($::sys_mailaliases):}

Thanks you very much


-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-bugs?hl=en.

Reply via email to