help-cfengine
[Top][All Lists]
Advanced

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

Re: Module variables being set late


From: Mark . Burgess
Subject: Re: Module variables being set late
Date: Wed, 7 Jan 2004 21:11:33 +0100 (MET)


On  7 Jan, Chip Seraphine wrote:
> 
> Ugh.  I tried something like that, and it still didn't help-- what I need to 
> run prior-to is in an imported file.   (The "imports always run last" thing 
> makes me nuts-- it isn't really last, and since it is outside of the 
> actionsequence you can't control *when* it runs.)
> 
> So it looks like this:
> 
> cfagent.conf
>               |
>               |- cf.import1
>               |               \- Run MyModule which sets "MyModuleRan" class
>               |
>               |-cf.import2
>                               \- Something that depends on "MyModuleRan"
> 
> What I was hoping was that dotting the clas sonto the module action line 
> ("module:MyModule.someclass") would cause the reset of cfengine to get the 
> hint that this class's dependencies must run AFTER the module.  That doesn't 
> seem to work.
> 
> Of course, the *real* fix would be if things just ran in the place where I 
> asked them to run.  I'm once again a victim of the multiple passes....

Oh come on, Chip you are just being silly. Take a moment and relax. If you 
follow
the suggested structure and use cfagent.conf only to import the content
of the configuration, then it never matters that imports are done "at the end".

You are just griping about minor inconveniences and misinterpreting the
results. There are two reasons why imports are done at the end: one is
technical (it makes parsing much more difficult since cfengine
does not have a separate preprocessor) and the other is that is makes
the parsing predictable.

If variables are not being set at the right place, it might be a bug
in which case I would prefer a specific description of the problem
(preferably without dumping an entire configuration file in the mail ;)).

I am hoping to be able to do some work on cfengine in the next few weeks,
so now it the time,

Mark

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Work: +47 22453272            Email:  address@hidden
Fax : +47 22453205            WWW  :  http://www.iu.hio.no/~mark
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~





reply via email to

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