Also, this is accepted : collect([1,2,3]) |$x| { file { "/tmp/b$x": content => collect([1,2,3]) |$y| { $y }; } }
and this isn't : collect([1,2,3]) |$x| { file { "/tmp/b$x": content => collect([1,2,3]) |$y| { $y + 0 }; } } Error: Failed to apply catalog: Parameter content failed on File[/tmp/b2]: Munging failed for value 1 in class content: can't convert Fixnum into String at /etc/puppet/manifests/site.pp:4 but this is : each([1,2,3]) |$x| { file { "/tmp/ab$x": content => each([1,2,3]) |$y| { $y + 1 }; } } It also seems that "collect" isn't too useful compared to "each" : * you can use collect everywhere you would use collect * "each" seems to return the original collection unchanged -- 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 puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.