On Mon, Oct 03, 2011 at 12:08:23PM +0100, Jonathan Gazeley wrote:
> On 03/10/11 11:14, Stefan Schulte wrote:
> > On Mon, Oct 03, 2011 at 11:00:18AM +0100, Jonathan Gazeley wrote:
> >> Hi all,
> >>
> >> I'm experiencing some difficulty getting custom facts to run. I've
> >> installed them on the puppetmaster in:
> >>
> >> ${modulepath}/${module}/lib/facter/*.rb
> >>
> >> and from there they appear to be copied properly onto the clients, where
> >> they end up in:
> >>
> >> /var/lib/puppet/lib/facter/*.rb
> >>
> >> On all clients, in puppet.log, the output of puppet-agent mentions
> >> "Loading facts" and seems to do the right thing. However, running facter
> >> on the client, the facts do not show up, even with --debug and with sudo.
> >>
> >> On the puppetmaster, they do show up in facter output as expected.
> >>
> >>    So what's going wrong? I'm running CentOS 6 and Puppet 2.6.6.
> >>
> >> Thanks,
> >> Jonathan
> >>
> >
> > I guess facter as a standalone executable doesn't look into
> > /var/lib/puppet. Try running
> >
> >      FACTERLIB=/var/lib/puppet/lib/facter facter
> >
> > as described in the custom facts guide [1]
> >
> > [1] http://docs.puppetlabs.com/guides/custom_facts.html#an-example
> >
> > -Stefan
> 
> Thank you. This fix enables me to view the facts on the command line. 
> Will any further action be necessary to use the facts in Puppet?
> 
> Jonathan

no, you should be able to refer to a custom fact immediatly if your
agent is configured to do pluginsync (which you apparently did enable
already).

-Stefan

Attachment: pgpRiO5JxGpSK.pgp
Description: PGP signature

Reply via email to