On Tuesday, June 26, 2012 8:12:05 PM UTC-5, Mike Reed wrote: > > exec { "purge_linux-image-2.6.32-38-server" : > command => "/usr/bin/apt-get -y purge > linux-image-2.6.32-38-server" , > require => Exec['purge_linux-headers-2.6.32-38'] , > } > > #This is done so the system starts using the new headers/image > exec { "reboot_after_dist_upgrade" : > command => "/sbin/reboot" , > subscribe => Exec["purge_linux-image-2.6.32-38-server"] , > refreshonly => true , > } >
That combination is wrong if you do not in fact intend for Puppet to reboot the machine on every run. The problem is that Exec[" purge_linux-image-2.6.32-38-server"] runs its command every time, and any time an Exec runs its command is considered a change (thus triggering subscribers to refresh). You can avoid that by setting an appropriate command in the 'onlyif' or 'unless' parameter of that Exec; these plus 'creates' are how an Exec determines whether it is already in sync. John -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/ORPq_sllUnYJ. 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.