Using cf-engine 3.0.2b4 on Solaris10/Sparc with PCRE.
Classes defined in a common bundle are usually globally visible. If that
class is defined with a and/or expression that includes a classmatch
however, they are not (for me at least).
Below is what I hope is a fairly reproducible test case. Note
that 'sawagent' is visible in testbundle, but 'andexpr' is not, even
though 'andexpr' using exactly the same classmatch as 'sawagent'.
body common control {
bundlesequence => { "testbundle" };
}
bundle common g {
classes:
"sawagent" expression => classmatch("agent.*");
"andexpr" and => { "any", classmatch("agent.*") };
# If you replace 'andexpr' with the following line, it will be visible in
testbundle
# "andexpr" and => { "any", "sawagent" };
}
bundle agent testbundle {
classes:
# If you uncomment out the following line 'andexpr' will become defined
# "andexpr" and => { "any", classmatch("agent.*") };
reports:
sawagent::
"'sawagent' is defined";
andexpr::
"'andexpr' is defined";
}
_______________________________________________
Bug-cfengine mailing list
Bug-cfengine@cfengine.org
https://cfengine.org/mailman/listinfo/bug-cfengine