title: failed_when with msg in ansible
body: <p>I am trying to validate the result of a lookup done via dig, but I am receiving a error.<br>
  Could someone help me?</p>
  
  <pre><code>  - name: Simple A record (IPV4 address) lookup for {{ kubeapi_server }}
      debug: msg="{{ lookup('dig', '{{ kubeapi_server }}' )}}"
    - debug:
        msg:
        - "DNS A Record for {{ lookup('dig', '{{ kubeapi_server }}' )}}"
      failed_when: msg.stdout != ""
  </code></pre>
  
  <p>Output</p>
  
  <pre><code>TASK [0_test : debug] ******************************************************
  fatal: [target1]: FAILED! =&gt; {"msg": "The conditional check 'msg.stdout != \"\"' failed. The error was: error while evaluating conditional (msg.stdout != \"\"): 'msg' is undefined"}
  </code></pre>