Forum: CFEngine Help Subject: Re: About "new" templates correct usage or limitations Author: neilhwatson Link to topic: https://cfengine.com/forum/read.php?3,26723,26779#msg-26779
The traditional use of templates in Cfengine was to use one file with embedded variables. These variables where expanded in edit_line bundles. Now, this new templating system allows for classes/contexts in the template file. Thus we can say include this block of text if this class is true. Using either method Cfengine treats editing inserts one line at a time. Each line is compared against the promiser file. If that line already exists it is not inserted a second time. Blocks of text, via preserve_block or within the new BEGIN/END structure are treated as whole lines even if they are a multiple lines. Thus, append this block of text if this block is not already found in the file. Knowing this file edits become a bit simpler. In the case of a large promiser file you might break the file up into multiple templates. Then assemble it using multiple edits. _______________________________________________ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfengine