Change your yaml file to: files:  - a  - b  - c Then puppet will read it in as 
an array. Pass the array to a define and the define will run once for each 
element of the array

Steven
 > Date: Sat, 17 Nov 2012 03:27:20 +0100
> From: jso...@srce.hr
> To: puppet-users@googlegroups.com
> Subject: [Puppet Users] Creating files from array?
> 
> Hi.
> 
> I have the following array in the hiera:
> 
> files: - a
>         - b
>         - c
> 
> and I want to create files:
> 
> file_a
> file_b
> file_c
> 
> from template "file".
> 
> 
> Is there a clean way to do it because as far as i know puppet DL doesn't 
> support loops...
> 
> 
> -- 
> Jakov Sosic
> www.srce.unizg.hr
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Puppet Users" group.
> To post to this group, send email to puppet-users@googlegroups.com.
> To unsubscribe from this group, send email to 
> puppet-users+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/puppet-users?hl=en.
> 
                                          

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to