Issue #2988 has been updated by James Turnbull.

Target version changed from Puppet - 0.25.4 to Puppet - 0.25.5


----------------------------------------
Feature #2988: inconsistent array flattening
http://projects.reductivelabs.com/issues/2988

Author: Dan Bode
Status: Accepted
Priority: Normal
Assigned to: 
Category: 
Target version: 0.25.5
Affected version: 0.25.1
Keywords: 
Branch: 


arrays are not flattened when defined using array variables, but they are 
flattened when arrays are defined in the array.

I wanted at least document this inconsistent behavior, below, c != d (at least 
from the perspective of templates). 

#test.pp
<pre>
$a = ['a1', 'a2']
$b = ['b1', 'b2']
# c is not flattened
$c = [$a, $b]
# d is flattened
$d = [['a1', 'a2'], ['b1', 'b2']]
file {'/tmp/arrayflattest':
  content => template('/etc/puppet/templates/arrayflattest.erb'),
}
</pre>
#arrayflattest.pp
<pre>
<% c.each do |val| -%>
c val: <%= val %>
<% end -%>
<% d.each do |val| -%>
d val: <%= val %>
<% end -%>
</pre>
#arrayflattest
<pre>
c:a1a2
c:b1b2
d:a1
d:a2
d:b1
d:b2
</pre>


-- 
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://reductivelabs.com/redmine/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