Nico De Ranter
2009-Jan-08 16:53 UTC
[Puppet Users] Executing a command once after an action.
Hi, I''m certain there must be an easy way to do this but I just can''t figure out how. I''m looking for a way to execute a script *once* after a certain operation (e.g. installing a package or a certain file) has occured. I can make the exec ''require'' the file or package but then it runs every time puppetd gets executed after the file or package gets installed. How can I do this? Thanks in advance, Nico -- With kind regards, Nico De Ranter Senior System Administrator Sony Techsoft Centre The Corporate Village · Da Vincilaan 7-D1 · B-1935 Zaventem · Belgium Phone: +32 (0)2 700 8641 Fax: +32 (0)2 700 8622 E-mail: nico.deranter@eu.sony.com Internet: www.sony-europe.com Sony Technology and Software Centre Europe A division of Sony Service Centre (Europe) N.V. Registered office: Technologielaan 7 · B-1840 Londerzeel · Belgium VAT BE 0413.825.160 · RPR Brussels Fortis Bank Londerzeel 293-0376800-10 GEBA-BE-BB --~--~---------~--~----~------------~-------~--~----~ 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+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
Jeffrey Hulten
2009-Jan-08 17:11 UTC
[Puppet Users] Re: Executing a command once after an action.
Instead of requiring the file, subscribe to it. Also, to only run when
the package changes set refreshonly to true.
file { "/test" :
source => "puppet:///test/testfile" }
exec { "run once on test file" :
cmd => "/bin/echo running",
refreshonly => true,
subscribe => File["/test"],
}
On Thu, Jan 8, 2009 at 8:53 AM, Nico De Ranter <nico@sonycom.com>
wrote:>
>
> Hi,
>
> I''m certain there must be an easy way to do this but I just
can''t figure
> out how.
>
> I''m looking for a way to execute a script *once* after a certain
> operation (e.g. installing a package or a certain file) has occured. I
> can make the exec ''require'' the file or package but then
it runs every
> time puppetd gets executed after the file or package gets installed.
>
> How can I do this?
>
> Thanks in advance,
>
> Nico
>
> --
> With kind regards,
>
> Nico De Ranter
> Senior System Administrator
>
> Sony Techsoft Centre
> The Corporate Village · Da Vincilaan 7-D1 · B-1935 Zaventem · Belgium
>
> Phone: +32 (0)2 700 8641
> Fax: +32 (0)2 700 8622
> E-mail: nico.deranter@eu.sony.com
> Internet: www.sony-europe.com
>
> Sony Technology and Software Centre Europe
> A division of Sony Service Centre (Europe) N.V.
> Registered office: Technologielaan 7 · B-1840 Londerzeel · Belgium
> VAT BE 0413.825.160 · RPR Brussels
> Fortis Bank Londerzeel 293-0376800-10 GEBA-BE-BB
>
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
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+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en
-~----------~----~----~----~------~----~------~--~---