help-cfengine
[Top][All Lists]
Advanced

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

Re: module macros are expanded too late - was Determining Solarispatch r


From: david . nelson
Subject: Re: module macros are expanded too late - was Determining Solarispatch revisions - thanks
Date: Tue, 27 Sep 2005 11:50:14 -0500


This works GREAT!  Thanks everybody!

In staying w/ the 'CFEngine' syntax, I used 'PrepModule(module:showrev, "")' instead.

So, in summary, I have:

groups:
    any::
        ShowRev = ( PrepModule(module:showrev, "") )


Thanks,

         /\/elson



address@hidden
Sent by: address@hidden

09/23/2005 03:26 PM

To
Ed Brown <address@hidden>, "Martin, Jason H" <address@hidden>
cc
address@hidden
Subject
Re: module macros are expanded too late - was Determining        Solarispatch revisions






> So I tested again, with this:
>
> control:
>    addinstallable = ( sl3 )
>    actionsequence = ( shellcommands )
>  classes:
>    bar = ( PrepModule(foo,"noargs") )
>  import:
>    sl3:: sl3.conf
>
> where the module foo just prints '+sl3', and the shellcommand in
> sl3.conf does indeed execute.  

Horrah!

> Curious.  I can't imagine when you might use 'bar' (the class defined
> based on the simple existence of the module), but I suppose if you only
> copied the module foo to certain classes of machines, it could be
> useful.
>
> Still, it seems like Steve's example should work.

Sorry.  It's my fault.  My example works.  I just figured out the
"something obvious" I was missing: I hadn't matched the module
reference with the actual module name!  In other words, I had...

classes:
  bogus = ( PrepModule(HasSL,"noargs") )

with the module script named/at

/var/cfengine/modules/module:HasSL

The correct config is...

classes:
  bogus = ( PrepModule(HasSL,"noargs") )

with the module script named/at

/var/cfengine/modules/HasSL

steve
- - -
systems & network manager
high energy physics
university of wisconsin



_______________________________________________
Help-cfengine mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/help-cfengine


reply via email to

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