help-cfengine
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Order of Execution


From: Christian Pearce
Subject: Re: Order of Execution
Date: Wed, 05 Jan 2005 12:14:40 -0500

I believe is talked about once every three months.  I suppose the best
way to handle this is to create scope for the actionsequence.  Everytime
a new actionsequence is reached it gets push onto a stack of some sort. 
Once that particular cfengine script is done executing.  Then the
original actionsequence takes over.

The other way would be to change it for the rest of the execution. 
Which I can't see being useful.  If anything you might want to localize
the sequence for a particular script.

I know Mark went ahead and added the second pass of execution to
cfengine.  I believe my script takes advantage of this.

Add this to the cfwiki.org wishlist.  Maybe in the next year someone
will be interested in developing scope.  Then again I could be totally
wrong.  If my time frees up I would certainly entertain taking this on.

Then again I am interested in what Mark has to say about this. 
Considering it might upset some of the cfengine core principles.  To me
this would be a much better way to handle this.  Considering how many
people want to do this.

actionsequence = ( shellcommands.firstpass shellcomands
shellcommands.lastpass )

Any they only want the class firstpass to be valid during the execution
of shellcommands.  Maybe this scoping would help.

On Wed, 2005-01-05 at 12:00, Pau Capdevila/Upcnet wrote:
> In a modularized set of scripts (main and imports).
> Is it possible to redefine the action sequence in an imported script?
> 
> It is misleading that many things of the main script apply but not the
> order defined in a inner control section.
> 
> If not it would be a nice feature to see implemented if possible.
> 
> Pau
> 
> on Wed, 05 Jan 2005 08:34:18 -050 Christian Pearce
> <pearcec@perfectorder.com> wrote
>                                 To:
> "Brian E. Seppanen"
> <seppy@chartermi.net>
>                                 cc:
> help-cfengine@gnu.org
>                            Subject:
> Re: Order of Execution
> Maybe this will work.  This isn't code complete.
> 
> cfagent.conf 
> 
>    control:
> 
>                 actionsequence = ( copy shellcommands
> shellcommands.secondrun )
> 
>    import:
>                 cf.solaris
>                 cf.dns
> 
> cf.solaris
> 
>    copy:
>        [Code to copy file to /tmp/a]
> 
> 
>    shellcomands:
> 
>                 secondrun::
>                                  echo "How are you today?" >> /tmp/a
> 
> cf.dns
> 
>    shellcommmands:
> 
>        any::
>             echo "Hello World" > /tmp/a
> 
> 
> ______________________________________________________________________
> _______________________________________________
> Help-cfengine mailing list
> Help-cfengine@gnu.org
> http://lists.gnu.org/mailman/listinfo/help-cfengine
-- 
Christian Pearce
http://www.commnav.com
http://www.perfectorder.com





reply via email to

[Prev in Thread] Current Thread [Next in Thread]