On 11/10/2010 10:18 AM, luke.bigum wrote:
> Hi list,
>
> When declaring multiple resources at once with an array like this:
>
> file { [ "foo", "bar" ]: ... }
>
> Is there a way to access the current array element so as to pass this
> value as a parameter? So the "foo" resource has a parameter value
> "foo" and "bar" with a parameter value "bar"?
I think what you want is to use $name. it corresponds to the resource
name that is currently being worked on.
file { [ "foo", "bar" ]: path => "/blah/${name}.txt", ... }
--
Gabriel Filion
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en.