On Wednesday, 25 April 2018 15:01:00 UTC+1, Michael Di Domenico wrote:
>
> in the past i'd copy my ruby facts into 
> /usr/share/ruby/vendor_ruby_facter (which probably wasnt right)
>

No... That's definitely not right :-)  Puppet has had a feature called 
"pluginsync" for a while now, which downloads ruby code (types, providers, 
facts) from a Puppet Master before it does anything on a Puppet Agent.  The 
Agent will write it's downloaded Ruby code into /var/lib/puppet/lib/ 
(/opt/puppetlabs/puppet/cache/lib in Puppet 5), and it will keep it 
synchronised so you can't pollute it.

Probably the simplest thing for you to do right now is create a new module 
(call it yourcompany_stdlib ?) and put all your Facts in there.  Custom 
Facts distributed from a module live in MODULEROOT/lib/facter/, here some 
examples from Puppetlabs' stdlib. You just put your .rb files in this 
directory:

https://github.com/puppetlabs/puppetlabs-stdlib/tree/master/lib/facter

Then if you add that module to your Puppet Master, your Agents will 
magically synchronise them down - Puppet 3 and Puppet 5 (you don't need to 
"include" or do anything in a manifest).

I'd link you some puppet.com Docs too, but right now I'm getting 5xx Cloud 
Flare errors.  If it's working for you, look around for how to distribute 
custom facts in a module.

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/850309c4-67bc-4091-80aa-b3dbadef6e45%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to