Perhaps I'm misunderstanding but it seems to me that warning actions are outside of the normal promise classes. It would be nice if instead they were a fourth class. For example consider this promise.
files: any:: "/tmp/foo" action => warn_now, perms => system( "0600", "nwatson", "bin" ), classes => cdefine( "/tmp/foo_kept", "/tmp/foo_repaired", "/tmp/foo_failed" ); Using this I can nicely log if the promise is kept, repaired or not kept. However, this particular promise is supposed to be passive or warn only. Warnings seem to happen outside of any control. That is they automatically log fixed strings with a '!!' prefix. What if instead these acted differently? I see two possibilities. First a warning only action defines another class meaning that the promise needs to be repaired but only a warning was issued. classes => cdefine( "/tmp/foo_warning", "/tmp/foo_kept", "/tmp/foo_repaired", "/tmp/foo_failed" ); The other option would be to keep the existing three possible classes and define the failed class when in warning mode. Since the promise was not kept a failure to keep the promise seems logical. Is there a way to do this that I haven't seen? Sincerely, -- Neil Watson 416-673-3465
CONFIDENTIALITY WARNING This communication, including any attachments, is for the exclusive use of addressee and may contain proprietary and/or confidential information. If you are not the intended recipient, any use, copying, disclosure, dissemination or distribution is strictly prohibited. If you are not the intended recipient, please notify the sender immediately by return e-mail, delete this communication and destroy all copies. AVERTISSEMENT RELATIF À LA CONFIDENTIALITÉ Ce message, ainsi que les pièces qui y sont jointes, est destiné à l’usage exclusif de la personne à laquelle il s’adresse et peut contenir de l’information personnelle ou confidentielle. Si le lecteur de ce message n’en est pas le destinataire, nous l’avisons par la présente que toute diffusion, distribution, reproduction ou utilisation de son contenu est strictement interdite. Veuillez avertir sur-le-champ l’expéditeur par retour de courrier électronique et supprimez ce message ainsi que toutes les pièces jointes.
_______________________________________________ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfengine