Ask Your Question
0

external facts are ignored by facter

asked 2014-10-29 19:08:45 -0500

mothbitten gravatar image

Hello!

Running puppet 3.7.2 on both the master and the client. The issue is that although external facts are being copied to the client during the puppet run, the do not turn up when I run facter -p.

They do run when I run "facter --external-dir=/var/lib/puppet/facts.d/"

Do I have to set something up in puppet.conf for facter to see that directory by default?

Thanks!

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
2

answered 2014-11-04 23:08:28 -0500

joshc gravatar image

Currently, external facts are not loaded by facter when using the -p|--puppet command line argument. So you will need to specify an --external-dir to see them when running just facter.

However, if you are running puppet, then your external facts will be loaded, e.g. if you have an external fact foo, then you can verify the external fact is loaded by running:

puppet apply -e "notice($foo)"

See https://tickets.puppetlabs.com/browse/FACT-696 for more details.

edit flag offensive delete link more
0

answered 2015-12-22 05:52:30 -0500

Hi there,

This:

puppet apply -e "notice($foo)"

Only gets the global environment's value

This is the correct way to get the facter value:

puppet apply -e "notice($::foo)"

Mine seems to not work

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2014-10-29 19:08:45 -0500

Seen: 445 times

Last updated: Dec 22 '15