Look at "empty_file_before_editing". You need to know that cfengine doesn't actually empty the file that you are promising - it makes a copy, does the edits on the copy, and overwrites the existing file if it needs to. So when you say "empty_file_before_editing", it starts the edits on a clean slate. That's one way to re-write an entire file...
-Dan On Oct 19, 2010, at 3:33 PM, no-re...@cfengine.com wrote: > Forum: Cfengine Help > Subject: Re: Strange behaviour with insert_lines > Author: babudro > Link to topic: https://cfengine.com/forum/read.php?3,18780,18788#msg-18788 > > Hmmm, I'm not seeing the "light" yet. What then would be the recommended > method of re-writing an entire file (such as ntp.conf) so that it remains > convergent? I can't find an example of such a task or an example of > preserve_block in the Cf3 Ref. documentation. > > _______________________________________________ > Help-cfengine mailing list > Help-cfengine@cfengine.org > https://cfengine.org/mailman/listinfo/help-cfengine _______________________________________________ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfengine