could you define the filename as a variable first, somewhere within the
class
eg
$filename = "/tmp/foo";

and pick it up in the template
< %= filename %>

I've not tried it myself but that might work

Paul

2009/2/19 Ohad Levy <[email protected]>

> Hi,
>
> I'm looking to find a way to get the target filename inside a template.
> (e.g. if I have
> file {"/tmp/foo": content => template("foo")} I want to have a variable
> represent "/tmp/foo" inside the template.
>
> I've already tried using file, scope etc, but looking at the code, it
> doesn't seems that i can access the filename inside the template (unless
> using a define and than using $name).
>
> Anyone has a better idea?
>
> Thanks,
> Ohad
>
> >
>


-- 
Paul Matthews
----------------------------------------------------------------------

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

Reply via email to