my notes

puppet

puppet custom fact

We will ad custom puppet fact that will show ruby path.

create file

/etc/puppet/modules/YOU_MODULE_NAME/lib/facter/rubypath.rb

add following ruby code


Facter.add(:rubypath) do
setcode 'which ruby'
end

run on puppet gent

facter --puppet rubypath

Custom facts from modules are only used on puppet runs.

Tags

puppet cheatsheet


puppet config print
puppet config print runinterval
/usr/bin/puppet config set runinterval 1200
puppet parser validate init.pp

Regenerating a Puppet Agent Certificate


puppet resource service puppet ensure=stopped
rm -rf /var/lib/puppet/ssl/
puppet resource service puppet ensure=running

Tags

puppet