Forum: Cfengine Help Subject: Re: Getting a long list of files into Cfengine Author: sauer Link to topic: https://cfengine.com/forum/read.php?3,21000,21105#msg-21105
Re: Cfengine Help: Getting a long list of files into Cfengine new March 10, 2011 10:51PM Could you please take a look at special variable $(this.promiser) ? Section 12.6.4 in the reference manual today. Combine that with "transformer" and you can use an external command (like sed) to edit your files. If anyone has a better suggestion (totally done in Cfengine), I'd love to hear it. Well, that will lead to spawning a few thousand processes every time the promise is evaluated. That's kindof a lot of fork() overhead that I'd prefer to avoid, particularly since it never quiesces. But I guess it'd work better than the "no solution available" that I currently have. :) Ok, that's not entirely accurate; I upgraded my test machine to the current version, and the module protocol does allow really big strings passed in as an array. So that's cool, though I cant use it enterprise-wide for a while, as I mentioned. :/ I still like my idea of having an action or something which can do an push(files, $(this.promiser)). Haivng the ability to append/prepend to a list would be awfully handy. What about bundling something in a usemethod; can a sub-method modify variables in the caller's context (assuming the variable's modify policy is set to allow changes)? _______________________________________________ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfengine