Forum: CFEngine Help Subject: Re: An advanced policy using template and variable substitution Author: toddnni Link to topic: https://cfengine.com/forum/read.php?3,24105,24111#msg-24111
Mike, that is nice, but have you tried to use delete_lines:: to delete all unnecessary lines from the file? I think that this might work instead of md5 sum check. vars: any:: "to_keep_list" slist => { "#", "@(kernel_tunables)" }; delete_lines: any:: ".*" comment => "Dont' delete needed sysctl variables or commented lines.", delete_select => if_doesnt_start_with("@(to_keep_list)"); with body delete_select if_doesnt_start_with(list) { delete_if_not_startwith_from_list => { @(list) }; } _______________________________________________ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfengine