[Puppet Users] How to iterate over an array? (with a counter)

James Patterson
Wed, 20 Jun 2012 21:39:02 -0000

Given an array, I''d like to iterate over it with a counter to produce
something like this from a template:

foo.0 = ARRAYVALUE0
foo.1 = ARRAYVALUE1
foo.2 = ARRAYVALUE2

(where ARRAYVALUEn is replaced by the value, and the foo.n is
incremented for each value)

The puppet templates support iteration, but I don''t see how to also
increment a counter to get the behaviour above? Is this possible?
Thanks.

--
  James Patterson
  jamespatterson@operamail.com

--
http://www.fastmail.fm - Or how I learned to stop worrying and
                          love email again