On Nov 8, 2010, at 8:02 AM, Marc Baudoin wrote:

> Daniel V. Klein <d...@klein.com> écrit :
>> IMHO, the better strategy is to put everything (common and specific) in the 
>> inputs
> 
> I'd rather have only what's needed for each type of host instead
> of loading everything.

I know - but I told you what I thought was a better solution :-) The 
compilation costs are minimal, and then more importantly, you don't have the 
problem of "this compiles on this machine, but not on that" :-)  What I am 
suggesting gives you all the control you want without making you tweak so many 
dials and buttons.

> 
>> and then select what is executed in the bundle sequence.  But better still 
>> is to have all the common stuff in the bundleseuquence, and then a single 
>> module which has a number of class-selected methods promises for the 
>> specific stuff.
> 
> Which makes two places to look for what bundles need to be
> executed.

bundlesequence => { common1, common2, common3, machine_specific };

bundle agent machine_specific
{
methods:
    class1::
        "any" usebundle => foo;
        "any" usebundle => baz;
    class2::
        "any" usebundle => gar;
    class1|class2::
        "any" usebundle => bletch;
}

It's pretty simple.  Oh, I *have* implemented this on a large (nationwide) 
Cfengine deployment involving quite a large variety of OSs and system purposes. 
 It works, and it is easy to use and understand.  YMMV, depending on how much 
you insist on forcing Cfengine to do something the way you want it to work, 
instead of guiding Cfengine to do it the way it was designed :-)

-Dan

> 
> -- 
> Marc Baudoin
> STG Interactive
> _______________________________________________
> Help-cfengine mailing list
> Help-cfengine@cfengine.org
> https://cfengine.org/mailman/listinfo/help-cfengine

_______________________________________________
Help-cfengine mailing list
Help-cfengine@cfengine.org
https://cfengine.org/mailman/listinfo/help-cfengine

Reply via email to