Another way this could work, by the way, is if I can somehow reference the 
"calling class filename". Ie, if 

/foo/class.pp:

class foo {
  document_me()
}

If I can somehow reference "/foo/class.pp:2", like some of the error log 
messages do, that would work as well.

--Matt

On Feb 22, 2013, at 10:35 AM, Matt Wise <[email protected]> wrote:

> Yeah, this is interesting... it will essentially report where the template 
> file came from. It doesn't get me the path name to the manifest that called 
> it, which is what i'm looking for.
> 
> On Feb 22, 2013, at 10:24 AM, Eric Sorenson <[email protected]> 
> wrote:
> 
>> Jordan Sissel wrote up a little thing to do this:  
>> https://github.com/jordansissel/puppet-examples/tree/master/where-art-thou/
>> 
>> -=Eric
>> 
>> On Friday, February 22, 2013 10:05:18 AM UTC-8, Matt W wrote:
>> I'm trying to create a function that I can call in a manifest like this:
>> 
>>   $doc = doc('apache::service')
>> 
>> In the function, I want it to actually find the filename for the 
>> 'apache::service' class... from there, I'm going to run some code that will 
>> generate the puppet-doc in text format, and then return it in a variable. 
>> Ultimately this is so that I can have nodes self-document themselves.
>> 
>> Right now I'm stuck on figuring out the filename from the classname though. 
>> Anyone have any tips on this? Is there a function in the Puppet ruby code 
>> somewhere that will translate a class-name into a file path?
>> 
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Puppet Users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected].
>> To post to this group, send email to [email protected].
>> Visit this group at http://groups.google.com/group/puppet-users?hl=en.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>  
>>  
> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/puppet-users?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>  
>  

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to