----- Original Message ----- > On Jan 31, 10:09 am, Nan Liu <n...@puppetlabs.com> wrote: > > On Mon, Jan 31, 2011 at 9:06 AM, Gabriel Filion <lelu...@gmail.com> > > wrote: > > Yeah, that would make manifests a lot more flexible. Here's a > > function > > that should work for this purpose and potentially other puppet > > configuration variables as well: > > You can also wedge this in to an inline template like: > inline_template('<%= Puppet.settings[:vardir] %>') > > The first (large) caveat is that this checks the setting on the puppet > master. I'm not sure if you want the value from the client. If so I > suspect you'd need to create a facter fact that parsed your > puppet.conf. > > I'm also not sure on the best way to access Puppet settings. It's been > a while since I've done this off hand. I know (previously?) settings > could be accessed differently based on their section(s) in > puppet.conf. [master] and [main] may have different settings, for > example. >
Since 2.6.0 you can just do notice($settings::vardir) -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. 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.