Ok...your definition of if_ok seems non-standard (I always understood it to
be define X if kept *or repaired). Maybe your one should be called
kept_or_repaired.

I am not really sure why you are getting non-convergent behavior...although
this looks strange:

cf3  -> Looking at pattern ^(smtp_host)\s+(?!smtp.example.net$).*$

Why is there a $ before the closing bracket? I am not even sure what effect
that has on the regex if not an outright error...

On Thu, Dec 9, 2010 at 8:11 AM, Daniel Dehennin <
daniel.dehen...@baby-gnu.org> wrote:

> Michael Potter <mega...@gmail.com> writes:
>
> > I think the problem is you are using if_ok to set "SomeSMTPHostReplaced".
> > Try using if_repaired instead...
>
> Seemes that the problem is that the promise is repaired at every run.
>
> The difference between if_ok and if_repaired body classes is for the
> definition of "NoSMTPHostReplaced" in my example:
>
> #v+
> body classes if_ok(notchanged, changed)
> {
>    promise_kept => { "$(notchanged)" };
>    promise_repaired => { "$(changed)" };
> }
> #v-
>
> Seems there is something[1] I did not understand.
>
> Regards.
>
> Footnotes:
> [1]  some things is more accurate ;-)
>
> --
> Daniel Dehennin
> Récupérer ma clef GPG:
> gpg --keyserver pgp.mit.edu --recv-keys 0x6A2540D1
> _______________________________________________
> Help-cfengine mailing list
> Help-cfengine@cfengine.org
> https://cfengine.org/mailman/listinfo/help-cfengine
>
_______________________________________________
Help-cfengine mailing list
Help-cfengine@cfengine.org
https://cfengine.org/mailman/listinfo/help-cfengine

Reply via email to