On Mon, Dec 06, 2010 at 03:08:27PM -0800, russell.fulton
wrote:> Hi
>
> I need to run a command if any one of a number of files change. I can
> handle this with having an exec and a subscribe clause listing the
> dependencies but I want the command to be run once per run, i.e. after
> all the possible updates have happened.
That is exactly what puppet will do.
exec {''/bin/echo "executed" >> /tmp/list'':
refreshonly => true,
subscribe => [
Exec[''first''],
Exec[''second''],
],
}
exec {''first'': command => ''/bin/echo
first''}
exec {''second'': command =>''/bin/echo
second''}
If you''re running this you will get
<Resource> Triggered ''refresh'' from 2 events and you
will only have one
line in /tmp/list
-Stefan