Hi, The string before the methods is only informative (and to stay consistent in the CF syntax) If you want to execute this method only if ONE is set, then you'll need :
methods: ONE:: "ONE" usebundle => bundle2 ("234"); Best regards Nicolas On 28/09/2010 10:19, no-re...@cfengine.com wrote: > Forum: Cfengine Help > Subject: Classes, methods: bug or what is wrong? > Author: absinfo_...@yahoo.com > Link to topic: https://cfengine.com/forum/read.php?3,18517,18517#msg-18517 > > Hi, > > I'm an Cfengine newbie, tried to use classes for achieving "per-host" or > "per-farm" promises, but something goes wrong. > > From the following code, isn't it supposed that bundle2 should not run if > the agent executing the promise is not from "ONE" class? > > Many thanks in advance! > > /Eduard > > Content for /tmp/1.cf > > body common control > { > bundlesequence => { "one" }; > } > > bundle agent one > { > > classes: > "ONE" or => { "someserver", "Saturday" }; > methods: > "ONE" usebundle => bundle2 ("234"); > > } > > bundle agent bundle2 (p1) > { > reports: > debian:: > "$(p1)"; > } > > > The results: > > depsrv1 ~ # cf-agent -f /tmp/1.cf -I -K > R: 234 > depsrv1 ~ # _______________________________________________ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfengine