Forum: CFEngine Help Subject: Re: "real" templates Author: mark Link to topic: https://cfengine.com/forum/read.php?3,23837,23840#msg-23840
Well, if we are talking edit files, then you can embed loops by separating the loop part as a separate promise. It isn't that much work, and you can always leave a marker in the file to search for with select_line_matching of select_edit_region, etc. bundle agent something { files: "/my/file/template_pre" insert_type => "file"; expand_scalars => "true" , edit_line => extras; } bundle edit_line extras { vars: "list" slist => { "one" "two", "three" }; insert_lines: "server $(list)"; # locate line to insert?? } If I get time, I'll make an example of this tomorrow. M _______________________________________________ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfengine