Quantcast
Channel: Ask Puppet: Puppet DevOps Q&A Community - RSS feed
Viewing all articles
Browse latest Browse all 6104

how to create custom facts in puppet in RHOS server

$
0
0
I am new to puppet ..I have installed puppet server(3.6.2) and puppet agent (3.8.4)..i am trying to start with creating facts to achieve,I am following below steps: 1.added pluginsync=true under main section inside puppet.conf file in master server 2.added a file in(/var/lib/puppet/lib/facter/last_run.rb) the content of the file is [root@sasin ~]$cat /var/lib/puppet/lib/facter/last_run.rb require 'facter' Facter.add("last_run") do setcode do Facter::Util::Resolution.exec('date') end end my question is if i do puppet agent -t --pluginsync from my agent server..i don't see any facts are loaded into client. How does it work? If i do sudo facter -p last_run in master server..It works fine and displays the date

Viewing all articles
Browse latest Browse all 6104

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>