Ansible parse JSON with YAML
<p>I'm trying to assign a variable to match IP address shown in API call I'm making to an online service provider. </p>

<p>Here is the JSON data I'm receiving:</p>

<pre><code>TASK [manager : debug] *********************************************************
ok: [localhost] =&gt; {
    "msg": [
        {
            "address": "10.0.3.224",
            "family": "inet",
            "netmask": "24",
            "scope": "global"
        },
        {
            "address": "fe80::216:3eff:feb2:7330",
            "family": "inet6",
            "netmask": "64",
            "scope": "link"
        }
    ]
}
</code></pre>

<p>How can I go about parsing the first address output and assign its value to a variable in YAML </p>

<p>this is what I have tried </p>

<pre><code>- debug: msg={{ output.stdout|from_json }} 
</code></pre>

<p>but I'm unable to get the IP address. </p>