Forum: CFEngine Help Subject: Re: Body file control inputs? Author: sauer Link to topic: https://cfengine.com/forum/read.php?3,26943,26975#msg-26975
This is a part of modular self-documentation. If you define a structure where you're configuring a web server, then you can encapsulate the logic to define what kind of web server inside the web.cf. Maybe web servers with hostnames in one range configure Apache httpd, and others configure Tomcat. Your promises.cf just includes web.cf and puts the "web" bundle in the bundle sequence, and to find out more about how web servers are defined, you look at the web bundle in in web.cf to see if apache.cf or tomcat.cf are included (and called from web using methods promises). With the current structure where you can only include files based on logic which does one top-down pass through promises.cf, you have to define (and thus document) all of your include file logic within promises.cf. Or, the alternative is to include all possible files in one mostrous policy, which is more file I/O time and more variable resolution time (potentially including expensive modules, execresult and whatnot). Say you have a couple of expensive execs required to define some stuff neccesary on a couple of systems. You have to jump through some relatively complicated hoops to avoid incurring that expense during the variable resolution phase on all of the other systems. If you have more than a couple of those cases, promises.cf starts to become quite a bit more complicated to manage by hand. _______________________________________________ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfengine