# Filter Return Value "results"

**URL:** <https://forum.ansible.com/t/filter-return-value-results/25172>\
**Category:** Ansible Project\
**Tags:** ubuntu\
**Created:** [August 3, 2017, 10:58am UTC](https://forum.ansible.com/t/filter-return-value-results/25172 "2017-08-03T10:58:14Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![theo.reber](https://avatars.discourse-cdn.com/v4/letter/t/dc4da7/32.png) [@theo.reber](https://forum.ansible.com/u/theo.reber)\
**Post date:** [August 3, 2017, 10:58am UTC](https://forum.ansible.com/t/filter-return-value-results/25172/1 "2017-08-03T10:58:14Z")

</div>

Hi

I`m new in Ansible and try to spin up droplets at Digital Ocean Cloud.

Playbook works fine.

I would like to filter the return value “results” to display only ip\_address and droplet id.

At the moment it shows all the json stuff from whole droplet.

tasks:

- name: Create Test Host at Digital Ocean

digital\_ocean:

state: present

command: droplet

ssh\_key\_ids: \*\*\*\*\*\*\*\*\*\*\*\*\*

name: “{{ item.name }}”

api\_token: \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*

size\_id: 512mb

region\_id: “{{ item.region }}”

image\_id: ubuntu-14-04-x64

unique\_name: yes

wait\_timeout: 500

with\_items:

- {name: “bfh01”, region: “nyc1”}

register: my\_droplet

- name: Print IP-Address from Droplets

debug:

msg=“IP is {{ item.droplet.ip\_address }}”

with\_items: “{{ (my\_droplet.results }}”

Thanks for help

Theo
