On Thu, Dec 16, 2010 at 7:10 AM, Arnau Bria <[email protected]> wrote:
> Hi,
>
> I have this code:
>
> define software_mount ($vo_name) {
> [...]
> device => "server:/$vo_name",
> [...]
> }
>
> And I'd like to use $vo_name a type name, so I could use it like:
>
> software_mount { ['vo_name1' , 'vo_name2', ..., 'vo_nameN' ] }
>
> or even:
>
> software_mount { ['vo_name1' , 'vo_name2', ..., 'vo_nameN' ] : vo_name =>
> $namevar }
>
>
> I've been playing with $namevar inside the define, but all my tries fail
> (I have a collection of errros and has no sense to post all of them).
>
> Anyone could give a hand on this?
If you want to use the resource title, simply use $title or $name
within the define.
define software_mount {
notify { $name: }
}
software_mount {
["foo", "bar"]:
}
Thanks,
Nan
--
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.