Forum: CFEngine Help
Subject: methods organization in the 'main' bundle
Author: neilhwatson
Link to topic: https://cfengine.com/forum/read.php?3,25027,25027#msg-25027
For those that use main bundle and a collection of methods I have questions
about organization. Eventually the main bundle can become quite large. What
have folks done at that time? Do you break it up into multiple mains on the
same level? Do you instead call sub mains from the top main?
Flat mains
main1.cf:
bundle agent main1 {
methods:
"any" usebundle => bundle1;
"any" usebundle => bundle2;
"any" usebundle => bundle3;
}
main2.cf:
bundle agent main1 {
methods:
"any" usebundle => bundle4;
"any" usebundle => bundle5;
"any" usebundle => bundle6;
}
Sub mains
main.cf:
bundle agent main1 {
methods:
"any" usebundle => submain1;
"any" usebundle => submain2;
}
submain1.cf:
bundle agent submain1{
methods:
"any" usebundle => bundle1;
"any" usebundle => bundle2;
}
The bundles in each main would be organized in some logical manner. These
examples are clean but in practice main can be very crowded with vars and
classes promises in addition to methods.
_______________________________________________
Help-cfengine mailing list
[email protected]
https://cfengine.org/mailman/listinfo/help-cfengine