Forum: CFEngine Help Subject: Re: Dynamic inputs and maplist function Author: sauer Link to topic: https://cfengine.com/forum/read.php?3,26595,26693#msg-26693
I recently did something similar with my inputs, and found that the includes don't seem to like certain variables - specifically variables with a context. The promises.cf file is parsed in a single pass, so everything has to be defined top-down in order (though the common control can be at the top of the file), and I think that's where the variable context limitation is apparently coming in to play. Id think there woul dbe an exception made for contexts like sys and const, but maybe that was overlooked (I'm way out on a speculative limb here now). Getting back to more concrete examples, I'm doing something like this: agent:: "i" int => "1"; "s" int => "1"; agent&(aix|linux):: "i" int => "1"; "s" int => "1"; !FROM_CRON:: "include" slist => getindices( "i" ); "sequence" slist => getindices( "s" ); If I include $(sys.workdir) in any of the include array paths, that element stops being included (and then I get warnings about include's value changing when the file is parsed again later, after that element is added to the i array). Your particular mileage may vary. _______________________________________________ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfengine