Forum: CFEngine Help Subject: Re: indentation and insert_lines Author: sauer Link to topic: https://cfengine.com/forum/read.php?3,27160,27268#msg-27268
Gregory Matthews Wrote: ------------------------------------------------------- > The only other way to do it that I've found is to > define the file as a > slist of lines which can be iterated over: > > edit_line => insert_lines( $(eth00) ), > > But in that case you cannot use "edit_defaults => > empty" (you end up > with only the last line in the file). So, you pass the actual list in, as in "$(securettypath)" perms => mog("644", "root", "security"), create => "true", edit_defaults => empty, edit_line => insert_lines("@(harden_securetty.ttys)"), classes => if_repaired("edited_securetty"), comment => "Set perms and content of $(securettypath)", handle => "manage_securetty"; You seemingly need to fully qualify the list name for that to work, though. Which is what I did there. _______________________________________________ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfengine