I only just noticed this, but I was actually modifying your gist KW to add 
the puppet:/// parsing.  I've forked it but can't see how to create a 
pull-request for it (I'm fairly new to gihub I'm afraid).

Anyway, for anyone else wanting the function I've posted it here: 
https://gist.github.com/3307835.

The next limitation is that it doesn't resolve template paths.  That should 
probably be in a separate function anyway.

Thank you both for your help.

James.

On Monday, August 6, 2012 10:22:51 AM UTC+1, j4m3s wrote:
>
> Hi
>
> I'm struggling with a relatively straightforward custom function.  All it 
> is designed to do is check for the existence of a file (on the 
> puppetmaster).  It works fine when I specify the full path to the file, but 
> I would like to refer to a file in the module's files directory (e.g. 
> "puppet:///modules/apache/local-modules").
>
> 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?
>
> (btw I need the function in order to execute classes/ types conditionally 
> depending ont he presence of files - it's for a defined type).
>
> Thanks, James.
>

-- 
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/-/DGEdCsT0K6UJ.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to