Hi all,

Could you suggest the right way to determine the path to the current
environment in puppet function? I want to store some data outside the
modules in the "files" directory in the git work-copy that pulled in each
environment and be able to detect the path to the "files".


files_dir = lookupvar("ssh_key_groups::path_to_keys")
files_dir = "files"

files_path = env.modulepath.map{|d| d.sub("modules", "")+files_dir }.select
{ |d| Puppet::FileSystem.directory?(d) }.shift

-- 
Best regards,
Vasil Mikhalenya

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAPc4iSCJy6gew4V0pmSeGPbE0t5O%2BpvG1ZTE65W0o%3D7v%3DDYCMg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to