Friday, June 7, 2013

puppet loop (for each) example

This is the way to copy multiple files, install multiple packages and so on.
# define function
define print1() {
   notify{"the message is: ${name}": }
}


# use it (with hiera)
print1{["one", "two", "three"]: }