Puppet Custom Facts

53 views
Skip to first unread message

Steve Harp

unread,
Feb 3, 2015, 11:45:13 AM2/3/15
to puppet...@googlegroups.com
Hi Guys,

I've created some custom facts in /etc/puppet/MODULE_NAME/lib/facter/.  When I run puppet I'm having facts that aren't even defined in a module being called by the node deployed to the agent.  This is causing the facts to fail on the agent.

For instance, if I have the following custom fact files:
/etc/puppet/modules/abc/lib/facter/abc.rb
/etc/puppet/modules/xyz/lib/facter/xyz.rb

When I define a node calling only module abc, it also delivers the fact file defined under module xyz.  On the agent, I end up with abc.rb AND xyz.rb.

Am I doing something wrong or is this normal?

Thanks..... 
 

Wolf Noble

unread,
Feb 3, 2015, 12:11:03 PM2/3/15
to puppet...@googlegroups.com
Hi Steve,

All custom facts are delivered to all nodes within a puppetmaster's control. IOW, having a module that has a custom fact will deploy that fact to every node, regardless of if that node uses, or is aware of the fact, or module in question.

It is generally expected that the fact author will ensure that the behavior of a dormant custom fact is as close to a noop as possible.



February 3, 2015 at 10:45 AM
--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/00d60c9a-5c35-4a85-a552-9505be073f28%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Steve Harp

unread,
Feb 3, 2015, 12:25:07 PM2/3/15
to puppet...@googlegroups.com
Thanks Wolf.

Sad news but now I know and I can structure my facts to deal with it.
Reply all
Reply to author
Forward
0 new messages