Ask Your Question

Deploying Custom Facts from Modules

asked 2014-06-13 12:10:33 -0600

kemra102 gravatar image

I have created a custom fact (to get the PHP version installed on the server) and have added it here /etc/puppet/modules/custom/lib/facter/phpversion.rb.

This gets deployed to clients as /var/lib/puppet/lib/facter/phpversion.rb.

When running facter the custom fact does not load, but when running facter -p it does. I want this fact to be available to catalogue runs (I don't intent to only use this manually at all) but as this does not show on a standard facter run I don't believe it will be available?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2014-06-13 13:33:25 -0600

ramindk gravatar image

It will be available.

facter -p adds puppet's libdir to the load path to load module based facts. That happens automatically when the Puppet agent runs.

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


Asked: 2014-06-13 12:10:33 -0600

Seen: 486 times

Last updated: Jun 13 '14