Puppet cron job configuration


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

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s