Forum: CFEngine Help Subject: Re: Config file where order matters Author: sauer Link to topic: https://cfengine.com/forum/read.php?3,25449,25455#msg-25455
I've been working on this for sudoers, where later entries override earlier entries. The way I'm currently doing it is to have a directory full of small templates which start with a number. It looks like the new lsdir function will make this easier in the future, but for now, I just have a simple module which uses classes to select files which should be included. Because of the numbered prefix, the module can easily return the slist of include files in order - which then get inserted in order with an insert_lines promise. That doesn't cover individual lines, though (unless you do one line per file, which is both horrible and plausible). I'm planning to start configuring the pam.conf/pam.d files in a few months, so hopefully someone will have a better suggestion by then. :) _______________________________________________ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfengine