Puppet client runs outside of office hours

20 views
Skip to first unread message

kdo

unread,
Dec 11, 2012, 11:19:51 PM12/11/12
to puppet...@googlegroups.com
anyone have any smart ideas around scheduling puppet client runs during specific times ? such as outside of office hours ?

any options that can be set in the puppet.conf for example ?

Chris O'Donnell

unread,
Dec 11, 2012, 11:30:23 PM12/11/12
to puppet...@googlegroups.com
Run puppet agent via cron. Add in a random delay so that all the clients don't hit the server at the same time. I use the following script and set to run every 30 minutes:

#!/bin/bash

# Grab a random value between 0-1740 (29 minutes).
value=$RANDOM
while [ $value -gt 1740 ] ; do
  value=$RANDOM
done

# Sleep for that time.
sleep $value

# do puppet run
/usr/bin/puppet agent -t
Reply all
Reply to author
Forward
0 new messages