On Thu, Dec 15, 2011 at 03:11:25PM -0500, Mark Burgess wrote: >This is not true. The file editing has been greatly simplified in appearance >but it now a lot *more* powerful in cf3. It is expressed more convergently >however so more consistent syntax, unlike 2.
Oh, that I agree with--the syntax is certainly more consistent, and that's a very good thing. But, and this is a personal view, I find it harder to "edit files" in CF3 than I did in CF2. Of course, in both cases, I try to avoid it as much as possible as it generally seems is fraught with peril. :-/ >If you need some tips help us to improve the special topics guide on >editing by suggesting examples we can give, and you might find a >present in your stocking! ;-) Well, that's a nice piece of bait to put on a hook... I'd like to see a solid example of managing a well structured configuration file that is *NOT* strictly line based. It's one thing to append stuff to /etc/aliases as needed. It's another thing entirely to add new <Location> blocks to httpd.conf. Or ensure that only certain shares are defined in smb.conf (adding *and* removing as needed) based on various class and variable definitions. As a related issue, I will also still echo others' comments that templates are entirely too difficult to manage. I've also said this before myself: I believe that there should be an intrinsic "template()" function that handles all of the internal workings needed for sane templating. Ideally you should be able to do something like this (and I'm expanding on the classes => abilities as well, since I'm daydreaming...): vars: smb_shares slist => readstringlist( '/data/smb_shares.lst', '#', "\n\n", "1000", "64000"); files: "/etc/samba/smb.conf" perms => mog('644','root','root'), create => true, template_from => template('/templates/smb.conf'), classes => { promise_repaired('bounce_smbd', 'bounce_nmbd'), promise_kept(canonify("smbd.conf okay")), repair_failed('smbd_conf_error'), cancel_notkept(canonify("smbd.conf okay")), }; -- Jesse Becker NHGRI Linux support (Digicon Contractor) _______________________________________________ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfengine