On 29 May 2010 09:33, Nigel Kersten <nig...@google.com> wrote: > > On Fri, May 28, 2010 at 4:19 PM, James Turnbull > <ja...@lovedthanlost.net>wrote: > >> -----BEGIN PGP SIGNED MESSAGE----- >> Hash: SHA1 >> >> Nigel Kersten wrote: >> > I mentioned we had a custom fact for the client certname in IRC the >> > other day and someone poked fun at me as it's apparently built in. >> > >> > For the life of me I can't work out what variable it is. Anyone know? >> > >> > (our certnames bear no relationship to any other attribute, fqdn etc) >> >> It is not built-in - someone has misled you young man. >> > > Anyone see any problems with doing it like this? > > > require 'puppet' > > Facter.add("certname") do > setcode do > Puppet[:config] = "/etc/puppet/puppet.conf" > Puppet.parse_config > Puppet[:certname] > end > end > > This is nice. Can we go the whole hog and provide all configuration options as facts? Could have a unique name space of something like CONF_variable --> CONF_certname
For now, I'd like to use Nigel's code to bulk load these options, and it got me thinking that the configuration file location must be known by the client as well. How do I get it? Cheers John -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-us...@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.