How to use custom facts with Puppet provisining??

26 views
Skip to first unread message

San

unread,
Jun 30, 2014, 5:33:32 AM6/30/14
to vagra...@googlegroups.com
Hi there,

How exactly do we use custom facts  with Vagrant (external facts work just fine)? I have several facts in my <module>/lib/facter directories  and during the vagrant up I can see those are reported to be loaded:


Info: Loading facts in /tmp/vagrant-puppet-4/modules-0/ostype/lib/facter/sa_ostype.rb
Info: Loading facts in /tmp/vagrant-puppet-4/modules-0/memsql/lib/facter/sa_memsql_nodeid.rb
Info: Loading facts in /tmp/vagrant-puppet-4/modules-0/ganglia/lib/facter/sa_gang_nodetype.rb
Info: Loading facts in /tmp/vagrant-puppet-4/modules-0/common/lib/facter/sa_runninginst.rb


but when I check on the node, using facter -p, I don't see any of them as none of then ends up at /usr/lib/ruby/vendor_ruby/facter at all. This is the puppet block I'm using:

config2.vm.provision :puppet do |ppt|
    ppt.options = "--verbose --debug"
    ppt.manifests_path = "puppet/manifests"
    ppt.manifest_file  = "nodes.pp"
    ppt.module_path = "puppet/modules"
end

Is there something that I'm missing here? Or, how can I get them available on the node as well so that I can call them natively from the Puppet on the node? Best!
Reply all
Reply to author
Forward
0 new messages