How stable will the iterator (each) function be?
I've come across the each function in the experimental features for v3.2: http://docs.puppetlabs.com/puppet/3/reference/langexperimental3_2.html, e.g.
puppet apply --parser future -e '$a = [1,2,3] $a.each |$value| { notice $value }'
I would really like to use something like this:
$sources.each |$src| {
firewall { "100 allow connection on $port from $source":
port => $port,
source => $source,
}
}
Since the firewall resource is already being created from another resource that's specified in hiera, it's difficult to specify separate entries for each firewall souce. The "each" function is exactly what Puppet has ...
I did find an alternative method of iterating over an array from here https://ask.puppetlabs.com/question/1041/how-to-iterate-over-an-array-and-create-a-resource-for-each/ but the syntax is unclear, and it relies on the ...(more)
I have heard from people at PuppetLabs that the future parser can slow things down. In particular, the "each" iterator is treated as a custom resource that depends on other custom resources.