Skip to content

Puppet 4 Repetition - map

My series about Repetition and Loops in Puppet 4 continues with this article about the map function. The main difference between map and each is the handling of the return value. The map function uses the return value of the code block to build a new collection. This allows us to transform one collection into another collection by changing one element at a time.

Continue reading "Puppet 4 Repetition - map"

Repetition in Puppet

For a long time the Puppet language had only limited support for repetition and loops. Puppet 4 and the Future Parser eventually added new functions to evaluate a block multiple times. This article is the first in a series that will illustrate the new functions and also present some use-cases.

Continue reading "Repetition in Puppet"