Ask Your Question

how to deploy custom facts to specific servers

asked 2016-01-25 08:41:47 -0500

ze_gitan gravatar image

I'm fairly new to puppet and seem to be having issues deploying custom facts. What we're trying to do is check the version of java and a few vendor components on a select number of servers. For this reason, we were wanting to deploy facts to just these servers. So we created a custom module javanodein the following manner

->  javanode
        -> facter

I can see that the fact is pulling in the information that we're looking for, so I decided to give it a run to make sure it got deployed appropriately. To test that it wouldn't be deployed unless we wanted to push it to a node, I made no calls to the module and just ran a quick

sudo puppet agent --test --debug --noop

To my surprise, I saw the following:

Notice: /File[/var/lib/puppet/lib/facter/java.rb]/ensure: defined content as '{md5}b547450e9b0697c20604a70e9cd17d0c'

I've tried this on multiple nodes and see the same result. Could someone point me in the direction of what I may be doing wrong? We're currently running facter 1.7.3 and puppet 3.3.2.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2016-01-25 11:20:16 -0500

hesco gravatar image

As I understand it, facts are deployed on all nodes managed by the master from which they are served. So you need to write them with the resiliency to understand when they are not needed, so they return reasonable values under such circumstances. If java is not deployed? What value do you want returned for $::java_version?

edit flag offensive delete link more


This is correct. For additional information, see the docs on configuring facts:

lavaman gravatar imagelavaman ( 2016-01-25 12:54:17 -0500 )edit

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


Asked: 2016-01-25 08:41:47 -0500

Seen: 274 times

Last updated: Jan 25 '16