1

facter does not show the custom facts while Puppetboard does.

According to this source the paramater -p is required to show all facts including the custom once. I have tried it but the outcome seems to be identical to the outcome of facter.

I tried facter --custom-dir=/var/lib/puppet/lib/facter and it results in: invalid option: --custom-dir=/var/lib/puppet/lib/facter

The question is why facter does not show custom puppet facts and how to solve this issue?

  • According to puppet doc you need to specify --custom-dir to see all the facts.. facter --custom-dir=<custom_fact_dir> – chetangb Jun 25 '15 at 20:09
  • Here is the link : docs.puppetlabs.com/facter/latest/… – chetangb Jun 25 '15 at 20:10
  • I guess you can try exporting the fact load path export LOAD_PATH=$LOAD_PATH:your_custom_path and give a try – chetangb Jun 25 '15 at 20:13
  • @chetangb Thank you for the advices. I have updated the question. – 030 Jun 25 '15 at 20:37
  • Try: facter -p --debug – Belmin Fernandez Jun 25 '15 at 21:05
2

Quoting from facter --help:

-p, --puppet (Deprecated: use puppet facts instead) Load the Puppet libraries, thus allowing Facter to load Puppet-specific facts.

With current versions of puppet you can see all the facts with this. You may need to tell it the path to the modules for it to be able to pick up any custom facts from them. eg:

puppet facts --basemodulepath /path/to/modules:/path/to/other/modules

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.