Fantastic thank you Nan, I'll give this a try tonight.  It should be easy 
to modify yours to do what I need, thank you for sharing it :)

On Tuesday, August 7, 2012 10:52:42 PM UTC+1, Nan Liu wrote:
>
> On Tue, Aug 7, 2012 at 11:13 AM, Krzysztof Wilczynski 
> <[email protected] <javascript:>> wrote: 
> > Hi James, 
> > 
> > [...] 
> >> How could I acheive this please?  I'd rather not hard-code the full 
> path as this would be brittle - how can I "resolve" the puppet:/// url to 
> the actual file location please? 
> > 
> > Using "puppet:///" and "file:///" in a way similar to what the File type 
> offers from within a custom function is actually not that straight-forward, 
> sadly. There is a lot of code which deals with resolving these URLs that 
> deals with SSL certificates (since you can request an artifact from 
> different Puppet Master), etc. I found it not that easy to work with 
> outside of the File type, but perhaps somebody was more successful than I 
> was (?) :-) 
>
> Here's a function that loads a files in puppet module path which you 
> can alter to suit your needs: 
> https://gist.github.com/3289446 
>
> This uses the same path as templates so instead of puppet:///, just 
> module_file(module_name/file_name), and you can look at the template 
> function for some ideas as well. 
>
> Nan 
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/gWjFE5nJ5o8J.
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