Hi, I have the following manifest that basically syncs the time for nodes really out of sync and ntpd can't drift the time back fast enough.
The problem is that when puppet executes the catalog, and puppet changes the time, puppet never finishes because it can't calculate the "run time" since puppet changed the time during the puppet run. Is this a bug? Should I do something different? For example: 1. puppet starts at 3:53 pm 2. tmesync module alters the time accordingly back 10 minutes to 3:43 3. puppet is done, but never reports that it finished and appears hung since it probably cant output a negative number anyways. 4. a restart of puppet seems to fix the issue until the time changes again. # Class: timesync # # This module is a bandaid to keep virtual machines in sync with the time server. # This will basically sync the time whenver the time drifts out further than xx seconds. # # Parameters: # # Actions: syncs the time with the timeserver # # Requires: timeoffset fact (esentially ntpdate -q ntpserver) # # Sample Usage: # class timesync { # time in seconds that the clock needs to be out of sync before calling ntpdate $seconds=60 $timeserver="0.pool.ntp.org" # only run max of six times per day schedule { timecheck: period => daily, repeat => 6, } # only execute if time is out of sync by specified seconds if ( $timeoffset > $seconds ){ exec{"synctime": path => ["/bin", "/usr/bin/", "/sbin", "/usr/sbin/"], # schedule => timecheck, command => "ntpdate $timeserver", } alert("Puppet had to sync the time as it was out of sync") } } Corey Osman co...@logicminds.biz Green I.T and Datacenter Automation Specialist -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.