Created
October 6, 2013 17:43
-
-
Save bionix/6856917 to your computer and use it in GitHub Desktop.
A puppet cron job snippet for a poll cron task for puppet runs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# establishes a cron entry that runs the puppet agent every 30 minutes, starting | |
# at a time that is derived from the primary ip-address | |
# largely based on http://projects.puppetlabs.com/projects/1/wiki/Cron_Patterns | |
$timeoffset1 = ip_to_cron(1,29) | |
$timeoffset2 = $timeoffset1 + 30 | |
cron { "puppet": | |
ensure => present, | |
command => "puppet agent --onetime --no-daemonize --environment ${environment} --fqdn ${hostname}.${dnsdomain} --logdest syslog > /dev/null 2>&1", | |
user => "root", | |
minute => [ $timeoffset1, $timeoffset2 ], | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment