Hi,
I need to fill an array in a loop. While I understand variable scoping I
found some information that it is possible.
https://stackoverflow.com/questions/41041549/puppet-adding-array-elements-in-a-loop/41047623
https://blog.thewatertower.org/2019/04/15/building-or-appending-to-an-array-using-a-lambda-in-puppet/
Unfortunately I'm not able to adapt it to my needs:
$array = []
[1, 2, 3].each |$variable| {
add $variable to $array
}
Any tips?
Thank you!
--
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 view this discussion on the web visit
https://groups.google.com/d/msgid/puppet-users/srerjj%24k3l%241%40ciao.gmane.io.