On 04-06-10 07:41, Mark Burgess wrote:
>> I am trying to switch from cfengine2 to cfengine3. We make use of the
>> PrepModule to set some useful GLOBAL classes with the aid of a script. Just
>> print/echo +<class> to stdout. Can this be accomplished with cfengine3.
>
> There is a use-module function, but you can also embed modules simply as
> commands:
> promises in Cfengine 3. Since there is no actionsequence, only a bundle
> sequence you can
> just arrange to place a module probe into a bundle/method early on.
>
Thanks for the pointer. Just for record did not find it in the manual and
maybe it is also useful for other people. I replaced the cf2 PrepModule
syntax with:
bundle common g
{
classes:
GOTINIT expression => usemodule("init_lisa","");
}
placed an executable file in the modules directory named: init_lisa
{{{
#!/bin/sh
echo +BAS
}}}
This will activated the class BAS and it is a GLOBAL class.
~
--
********************************************************************
* Bas van der Vlies e-mail: [email protected] *
* SARA - Academic Computing Services Amsterdam, The Netherlands *
********************************************************************
_______________________________________________
Help-cfengine mailing list
[email protected]
https://cfengine.org/mailman/listinfo/help-cfengine