On Wed, Oct 10, 2012 at 1:23 PM, Patrick
<patrick.rohrb...@googlemail.com> wrote:
> hello,
>
> i want to create some files with an array:
>
> class files (
> ...
>     $type = [ "file1", "file2", "file3", "file4", "file5", "file5" ]
> ) {
>
>
> define rsyslog($owner = root, $group = root, $mode = 644,
>                  $ensure = present) {
>
>     file {"/etc/rsyslog.d/$type.conf":

You could use $name here instead of $type,

>     ensure  => $ensure,
>     owner   => $owner,
>     group   => $group,
>     mode    => $mode,
>     content => template('template.erb'),
>   }
> }
> rsyslog { $type: }

-- 
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