Hi,
I would recommend another approach for this issue. Defining the
bundlesequence only if a class is defined sound dangerous to me. You'd
rather define a list of bundles in a common bundle, and use this list in
your bundle sequence
bundle common g {
vars :
machines::
"bs" slist => { "garbage_collection",
"main",
"cfengine",
"executor",
"server",
"restart",
"cfbackup"
};
!machines::
"bs" slist => { "some_other_bundle" };
classes:
"machines" or => { "ipv4_192_168_28_67", "ipv4_192_168_28_72" };
}
body common control {
bundlesequence => { "update", @(g.bs) };
}
Regards,
Nicolas
On 23/09/2010 16:25, [email protected] wrote:
> Forum: Cfengine Help
> Subject: !!! No bundlesequence in the common control body
> Author: cell
> Link to topic: https://cfengine.com/forum/read.php?3,18446,18446#msg-18446
>
> Hi,
>
> I am playing with Cfengine 3 for a while. I was able to solve almost every
> problem I ran into except one. When I define class which contains IP
> addresses of some of my hosts like this:
>
>
> bundle common g
> {
> classes:
> "machines" or => { "ipv4_192_168_28_67",
> "ipv4_192_168_28_72" };
> }
>
> Define class like this is working for me, I see it listed between other
> classes of cf-promises -v. Using this class in agents is working but not in
> common control bundle.
>
>
>
> and then I want to define different bundles for every class like this:
>
>
> body common control
> {
>
> machines::
>
> bundlesequence => { "update",
> "garbage_collection",
> "main",
> "cfengine",
> "executor",
> "server",
> "restart",
> "cfbackup"
> };
>
> inputs => { "update.cf",
> "site.cf",
> "library.cf",
> "cfengine_stdlib.cf",
> "cf-execd.cf",
> "cf-serverd.cf",
> "restart.cf",
> "cf-backup.cf"
> };
>
> version => "0.1";
> lastseenexpireafter => "24";
> }
>
>
>
> and then I run cf-promises and it is not working. I've got this error after
> checking promises.cf using command cf-promises:
>
>
> r...@rain:/var/lib/cfengine3/inputs# cf-promises -f promises.cf
> Bundle "update" listed in the bundlesequence is not a defined bundle
> Bundle "garbage_collection" listed in the bundlesequence is not a defined
> bundle
> Bundle "main" listed in the bundlesequence is not a defined bundle
> Bundle "cfengine" listed in the bundlesequence is not a defined bundle
> Bundle "executor" listed in the bundlesequence is not a defined bundle
> Bundle "server" listed in the bundlesequence is not a defined bundle
> Bundle "restart" listed in the bundlesequence is not a defined bundle
> Bundle "cfbackup" listed in the bundlesequence is not a defined bundle
> Fatal cfengine error: Errors in promise bundles
> r...@rain:/var/lib/cfengine3/inputs# cf-promises -f promises.cf
> !!! No bundlesequence in the common control body
>
>
> I'll be very glad if somebody knows what's the problem, because I would like
> to define different bundles for different classes of hosts.
>
> Cfengine version: 3.0.5+dfsg-1
> OS: it was tested on Debian Lenny 5.0.4 and also some new ubuntu
>
> _______________________________________________
> Help-cfengine mailing list
> [email protected]
> https://cfengine.org/mailman/listinfo/help-cfengine
>
--
Nicolas CHARLES
Normation SAS - http://www.normation.com
44 rue Cauchy – 94110 ARCUEIL
+33 (0)1 83 62 26 96 - +33 (0)6 14 63 25 18
_______________________________________________
Help-cfengine mailing list
[email protected]
https://cfengine.org/mailman/listinfo/help-cfengine