(Resending to the entire list) I'm suggesting an email is only sent when Cfengine attempts to repair a promise, not evaluate every single one. And filtering would certainly be used, no matter what, I'm sure. :)
As for the nodename example, it depends on how you write the promise. If you do bundle edit_line fix_nodename { delete_lines: ".*"; insert_lines: "$(sys.uqhost)"; } Then Cfengine will "repair" the file every time, right? You'd want something more like this (untested): bundle edit_line fix_nodename { delete_lines: "$(sys.uqhost)" not_matching => "true"; insert_lines: "$(sys.uqhost)"; } The second would only delete incorrect lines if there are any and then only insert the hostname line if there isn't one, meaning that if the file is already correct, neither promise needs to be repaired. Justin -----Original Message----- From: nwat...@symcor.com [mailto:nwat...@symcor.com] Sent: Friday, February 05, 2010 11:02 AM To: Justin Lloyd Cc: help-cfengine@cfengine.org; help-cfengine-boun...@cfengine.org Subject: Re: Email notification of repairs I don't see how this could scale. Even a small policy can have dozens of promises. A email for each one would just flood my mailbox. > For example, if I have a promise to ensure that a Solaris system?s > hostname is in /etc/nodename, I should write the promise so that it > doesn?t do anything if the file is correct, rather than just > recreating the correct file every time the agent runs, regardless of > whether the file?s contents are already correct. You've lost me here. If /etc/nodname has the correct contents Cfengine will not recreate the file it will do nothing. This is normal. Sincerely, -- Neil Watson 416-673-3465 This electronic communication and any attachments may contain confidential and proprietary information of DigitalGlobe, Inc. If you are not the intended recipient, or an agent or employee responsible for delivering this communication to the intended recipient, or if you have received this communication in error, please do not print, copy, retransmit, disseminate or otherwise use the information. Please indicate to the sender that you have received this communication in error, and delete the copy you received. DigitalGlobe reserves the right to monitor any electronic communication sent or received by its employees, agents or representatives. _______________________________________________ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfengine