[Puppet Users] Re: execute more commands (beginner talking)

Reno
Wed, 21 Oct 2009 16:23:50 -0000

Yes I agree,

for example what you will do if I want to run the touch command only
if /usr/bin/apt-get -q -q update has run without error?

 exec { subscribe-echo:
               command     => "/usr/bin/apt-get -q -q update",
               logoutput   => false,
               refreshonly => true,
               subscribe   => file["/etc/apt/sources.list"]
       }

 exec { "touch /home/ciao":
    cwd => "/home",
    path => "/usr/bin:/usr/sbin:/bin"
}




On Oct 21, 4:56 pm, Brice Figureau <brice-pup...@daysofwonder.com>
wrote:
> On Wed, 2009-10-21 at 08:53 -0700, Reno wrote:
> > hi and thanks for the help
>
> > I use a more simple ( to me ) but effective solution:
>
> >  exec { "touch /home/ciao":
> >     cwd => "/home",
> >     path => "/usr/bin:/usr/sbin:/bin"
> > }
>
> You can''t guarantee this exec won''t run _before_ your
other exec if you
> don''t add strict ordering metaparameters (require/before).
> --
> Brice Figureau
> Follow the latest Puppet Community evolutions onwww.planetpuppet.org!