Ansible return value - Extract a specific line
<p>So I got my role working now, the result is now in "var" and I see an output. First of all here is the role which I have written:</p>

<pre><code>- name: create a server
  os_server:
    state: present
    flavor: m1.nano
    auth:
      auth_url: ****
      username: ****
      password: ****
      project_name: admin
      domain_id: ****
    name: ansibletest
#   region_name: RegionOne
    image: 4e7ab5c8-4b39-4c77-b68d-cf2ea7e1df1a
    key_name: ansible
    timeout: 200
    auto_ip: yes
    nics:
      - net-id: a5a73ab9-3ee5-49a6-bea0-f44f9e376ca0    
  register: result
- debug: var=result
</code></pre>

<p>And I get a long output of this like this one:</p>

<pre><code>TASK [openstack : debug] *******************************************************
ok: [172.20.22.21] =&gt; {
    "result": {
        "changed": false,
        "id": "6f40f396-7ef8-4e0e-9769-2b9cea898269",
            .........
            "accessIPv4": "172.20.22.58",
            .......
                    {
                        ..........
                    },
                    {
                        ............
                        "addr": "172.20.22.58",
                        ......
                    }
                ]
            },
            ........
            },
            "interface_ip": "172.20.22.58",
            .................
                    .............
                ]
            },
            "os-extended-volumes:volumes_attached": [],
            "private_v4": "10.0.100.92",
            "progress": 0,
            "public_v4": "172.20.22.58",
            ................
                {
                   ...........
    }
}
</code></pre>

<p>I only need the IP address (in this case it's the <code>172.20.22.58</code> contained in <code>"accessIPv4"</code>) - is there any way to "filter" the output to just retrieve this value?</p>