How to check the result of a lineinfile task?

Dear all,

how to check the result of a lineinfile task?

I got one that outputs the following:

        "backup": "",
        "changed": true,
        "diff": [
            {
                "after": "",
                "after_header": "/path/to/file (content)",
                "before": "",
                "before_header": "/path/to/file (content)"
            },
            {
                "after_header": "/path/to/file (file attributes)",
                "before_header": "/path/to/file (file attributes)"
            }
        ],
        "msg": "line added"

I see the line has been added, but there is no rc or similar. I could
test for '(changed==true and msg=="line added") or (changed==false)',
but that seems rather clunky. Any better ideas?

Johannes