Noticed that I get duplicate lines when cfengine is applying the promise of
replace_patterns and insert_lines.
For example, the line exists in a file but is incorrect. It appears that
replace_patterns corrects the entry, but insert_lines also inserts the entry as
well. Without having to go through and establish a class for each line edited
(to check if it exists or not), is this syntax incorrect?
bundle agent my_test {
files:
"/etc/system"
edit_line => config_etc_system;
}
bundle edit_line config_etc_system {
replace_patterns:
any::
"set ufs:ldl_minlogsize=(?!0x2000000$).*+" replace_with => all("set
ufs:ldl_minlogsize=0x2000000");
insert_lines:
any::
"set ufs:ldl_minlogsize=0x2000000";
}
Thanks, Jim
_______________________________________________
Help-cfengine mailing list
[email protected]
https://cfengine.org/mailman/listinfo/help-cfengine