[email protected] writes: > Forum: Cfengine Help > Subject: Re: List variable in inputs > Author: dfriedman > Link to topic: https://cfengine.com/forum/read.php?3,17074,17120#msg-17120 > > So does this mean it's not possible to have a dynamic list of input files, > period?
If the variables in inputs are defined in the included file then yes, it
fails: create a slist variable in "bundle common g" in site.cf and use it
in promises inputs:
Can't stat file "/home/dad/.cfagent/inputs/@(g.inputs)" for parsing
!!! System error for stat: "No such file or directory"
If the variables in inputs are defined in promises.cf, then no, this
works:
## promises.cf
body common control
{
bundlesequence => { "base", @(test.bundles) };
inputs => {"test.cf", @(g.inputs) };
}
bundle common g
{
vars:
any::
"inputs" slist => {"test2.cf"};
}
bundle agent base
{
reports:
debian::
"In base";
}
## test.cf
bundle common test
{
vars:
any::
"bundles" slist => { "test", @(test2.bundles) };
"inputs" slist => { "test2.cf" };
}
bundle agent test
{
reports:
debian::
"In test";
}
## test2.cf
bundle common test2
{
vars:
any::
"bundles" slist => { "test2" };
}
bundle agent test2
{
reports:
debian::
"In test2";
}
Regards.
--
Daniel Dehennin
Récupérer ma clef GPG:
gpg --keyserver pgp.mit.edu --recv-keys 0x6A2540D1
pgp5GMCCvRtsl.pgp
Description: PGP signature
_______________________________________________ Help-cfengine mailing list [email protected] https://cfengine.org/mailman/listinfo/help-cfengine
