Forum: Cfengine Help
Subject: Re: conditional import of inputs -- i.e. using classes to control
inputs
Author: Seva Gluschenko
Link to topic: https://cfengine.com/forum/read.php?3,22083,22084#msg-22084
Alexey,
the body container parser doesn't allow for classes definition, so you cannot
move classes into body common control definition.
Next, in the body common control you cannot use soft classes for altering its
options, only hard classes do the job. (Or at least, that was true in the past,
and I didn't hear that was changed.) What you can actually do is to define an
slist in a common bundle, e.g.:
bundle common g
{
vars:
italy::
"countryside" slist => { "italy.cf" };
germany::
"countryside" slist => { "germany.cf" };
classes:
"italy" expression => classmatch("mil.*");
"germany" expression => classmatch("berl.*");
}
body common control
{
inputs => { "common.cf", @(g.countryside) };
}
Finally, common bundle are evaluated automatically, there's no need to include
them into the bundlesequence.
_______________________________________________
Help-cfengine mailing list
[email protected]
https://cfengine.org/mailman/listinfo/help-cfengine