In my lab, I want everything to be controlled by puppet. So I use puppet to set up the cron job that I mentioned in step 3) in the post Integrate puppet to foreman.
# Push puppet node facts to foreman
*/10 * * * * /etc/puppet/push_facts.rb
The manifest can be found here as well.
class sys_cron::push_facts {
cron { puppet_push_facts:
ensure => present,
command => “/etc/puppet/push_facts.rb”,
user => root,
minute => ‘*/5’,
}
}
Reference:
https://docs.puppetlabs.com/references/latest/type.html#cron