sorry, I've just accidentally sent previous unfinished email

files_dir = lookupvar("ssh_key_groups::path_to_keys") // lookup var does
not work for puppet-server anymore
files_path = env.modulepath.map{|d| d.sub("modules", "")+files_dir }.select
{ |d| Puppet::FileSystem.directory?(d) }.shift // this code looks like a
hack

On Tue, Dec 1, 2015 at 8:07 PM, Vasil Mikhalenya <bazi...@gmail.com> wrote:

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



-- 
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 puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAPc4iSA1OJtOfOjHAkOJsaJ1-%3DGPHNybuPXevxMkDA4X_tzv4g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to