[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: processing order, preprocessing, etc.
From: |
Mark . Burgess |
Subject: |
Re: processing order, preprocessing, etc. |
Date: |
Sun, 22 Dec 2002 10:13:59 +0100 (MET) |
The documentation is all at www.cfengine.org - all these questions
are answered there,
cheers,
M
On 22 Dec, Luke A. Kanies wrote:
> Hello,
>
> I'm trying to understand how cfengine works, and how I might use it, and
> I'm having trouble understanding how it processes its config files. Is
> this documented well anywhere?
>
> For instance, what's the affect of having multiple control sections in the
> same file? Is it equivalent to a single control section? Are all of the
> control sections processed, and then the other sections, or is it all just
> done linearly? Is everything prepocessed, and then executed, such that
> the last variable assignment or class definition is what matters, or can
> variable assignment and then reassignment in a config make a difference?
>
> What about if I import configs? I know that the parent file is parsed
> entirely before the child is, but are the children all parsed in the
> specified order every time? What if I have a "shellcommands" section in
> the parent, and a control section in each child which sets a variable that
> the parent "shellcommands" section uses and then lists "shellcommands" in
> the actionsequence; will shellcommands be run for each child file, with
> that file's variable setting, or just once with the last setting, or for
> each child but with the last setting?
>
> Is there documentation I can read that describes this without me having to
> test every case?
>
> If I have a control section that looks like the following:
>
> control:
> actionsequence = ( shellcommands )
> variable = ( true )
>
> and a "shellcommands" section which uses that variable:
>
> shellcommands:
> "/bin/echo $(variable) > /tmp/testing"
>
> What happens if I later reassign that variable? (Can I only assign
> variables in control sections or modules?) Will the shellcommands section
> be run again? From initial testing, it looks like I have to redefine the
> shellcommands section, even though I haven't changed it. That implies
> that the config is parsed once and variables are interpolated in that
> step, rather than the section being compiled with the reference to the
> variable intact. Is this so?
>
> Anyway, if anyone has pointers on this whole process, and maybe where it's
> documented, that would be great.
>
> Thanks,
> Luke
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Work: +47 22453272 Email: Mark.Burgess@iu.hio.no
Fax : +47 22453205 WWW : http://www.iu.hio.no/~mark
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- processing order, preprocessing, etc., Luke A. Kanies, 2002/12/22
- Re: processing order, preprocessing, etc.,
Mark . Burgess <=
- Re: processing order, preprocessing, etc., Mark . Burgess, 2002/12/22
- Re: processing order, preprocessing, etc., Luke A. Kanies, 2002/12/22
- Re: processing order, preprocessing, etc., Mark . Burgess, 2002/12/22
- Re: processing order, preprocessing, etc., Kai Großjohann, 2002/12/22
- Re: processing order, preprocessing, etc., Luke A. Kanies, 2002/12/22
- Re: processing order, preprocessing, etc., Kai Großjohann, 2002/12/22
- Message not available
- Re: processing order, preprocessing, etc., Kai Großjohann, 2002/12/23
- Message not available
- Re: processing order, preprocessing, etc., Thomas Glanzmann, 2002/12/22