Ask Your Question

sync external custom facts

asked 2015-10-11 22:46:17 -0500

vikas027 gravatar image

updated 2015-10-12 14:56:54 -0500

This is my scenario

SERVER: CentOS 7.1 - puppet server v2.1.1 or puppet version 4.2.2

AGENT: CentOS 6.5 - puppet agent v1.2.4 or puppet version 4.2.2

I have created a yaml (structured data facts) file on these locations on the puppet server, which is working fine on server

root@puppet:~# ls -l /opt/puppetlabs/puppet/cache/lib/facter/ /opt/puppetlabs/puppet/cache/facts.d/
-rw-r--r-- 1 root root 297 Oct 12 03:20 /opt/puppetlabs/puppet/cache/facts.d/
-rw-r--r-- 1 root root 297 Oct 12 13:58 /opt/puppetlabs/puppet/cache/lib/facter/
root@puppet:~# facter -p box32.interfaces_ipv4.eth0.bootproto

But this fact is not being sync across my agents.

root@box32:~# facter -p box32.interfaces_ipv4.eth0.bootproto


Is the only way to sync custom facts is to create a module and store a fact <MODULEPATH>/<MODULE>/facts.d/ ?

Thanks in advance for your time on this.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2015-10-12 20:05:52 -0500

lupin gravatar image

Based on the docs.

On Unix/Linux/Mac OS X:

/etc/facter/facts.d/ # Puppet Open Source
/etc/puppetlabs/facter/facts.d/ # Puppet Enterprise
edit flag offensive delete link more


Thank you. I figured out that after I took help from someone from IRC. I wonder, why this is not shown in `puppet config print | grep facts`. I had even tried to look for facter and facts.d directories, but couldn't find these. Lastly, it worked after I'd created the directories.

vikas027 gravatar imagevikas027 ( 2015-10-12 23:22:44 -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: 2015-10-11 22:44:39 -0500

Seen: 187 times

Last updated: Oct 12 '15