On 11/04/18 18:21, jcbollinger wrote:
I'm writing a module for Puppet self-management, or at least I think I am.  I was surprised to not find very much along those lines on the Forge, and maybe I should take that as a bad sign, but I want to explore it at least a little bit.  Maybe I just didn't find the right search terms -- searching there for "puppet" is not very useful.

Anyway, I've run into a snag with a threshold issue: how to find the config file(s) to manage in the first place.  I know where Puppet stores its config files by default, for various versions of Puppet and for various operational contexts, but with the existence of the --confdir option that can be specified on a per-run basis, it is not safe to assume that the config files that informed the current Puppet run is in the default location (and those are the ones I want to manage).  In any case, I'm lazy, so I'd rather get Puppet to tell me what it already knows than try to recompute it.

But there does not seem to be a standard fact that communicates this information (at least, 'puppet facts' does not print one), and I'm not seeing any appealing ways to extract the necessary information from a custom fact's runtime context.  I do see at least one nasty, tricksome, system-dependent way, but I'm more likely to chuck the whole idea than go there.  Am I missing some clean way to write a custom fact for this purpose?  Or does someone have an alternative to suggest?

Have you read the documentation regarding $settings ?

- henrik


Visit my Blog "Puppet on the Edge"

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 
For more options, visit https://groups.google.com/d/optout.

Reply via email to