On Sat, Jul 21, 2012 at 9:36 PM, eduardo <[email protected]> wrote:
> Dears all,
>
> I need set variable $puppet_base_dir on my prerequisites class with
> confdir parameter value of puppetmaster. I need the variable to be
> used as base directory path of a file named myfile, which it's read it
> in custom function. I'm trying to avoid absolute path '/etc/pupet/
> files/myfile' , I want to get it from puppetmaster configuration so i
> can do something like ${puppet_base_dir}/files/myfile .
>
> To do it, I create a custom function which have only one line of
> code :
>
> puppet_dir = %x{puppet master --configprint confdir}.chomp
>
> I'm thinking might be a dumb solution.
>
> Is there a simple way to do it ?.
>
> Thanks in advanced.
> eduardo.
>
$settings::confdir
This will have the variable you are looking for.
See
http://docs.puppetlabs.com/guides/faq.html#are-there-variables-available-other-than-those-provided-by-facter
and http://docs.puppetlabs.com/references/stable/configuration.html#confdir
Thanks,
James Glenn
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
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.