Forum: Cfengine Help Subject: Re: insert_lines locator doesn't work Author: bbomgardner Link to topic: https://cfengine.com/forum/read.php?3,20075,20086#msg-20086
I'm puzzled by this as well... Using select_region is an alternative for editing a file like this. You could use this to achieve what you want: body common control { bundlesequence => { "test" }; } bundle agent test { files: "/tmp/yum.conf" edit_line => append_after_main; } bundle edit_line append_after_main { insert_lines: "Please insert me" select_region => mysection; } body select_region mysection { select_start => "\"; select_end => "\[.*\]"; } _______________________________________________ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfengine