# map extract not working?

**URL:** <https://forum.ansible.com/t/map-extract-not-working/21272>\
**Category:** Ansible Project\
**Created:** [April 26, 2016, 1:56am UTC](https://forum.ansible.com/t/map-extract-not-working/21272 "2016-04-26T01:56:43Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Arthur\_Tsang](https://avatars.discourse-cdn.com/v4/letter/a/c68b51/32.png) [@Arthur\_Tsang](https://forum.ansible.com/u/Arthur_Tsang)\
**Post date:** [April 26, 2016, 1:56am UTC](https://forum.ansible.com/t/map-extract-not-working/21272/1 "2016-04-26T01:56:43Z")

</div>

Hi all,

I have a group named cluster in my inventory file, which has 2 nodes, swarm1 & swarm2.

and the following playbook, trying to use map(‘extract’) to get the IP address of the other node. I can print out the ip just fine by accessing the hostvars directly, but not when i use map. what’s wrong?

---

<div class="post-metadata">

**Author:** ![Johannes\_Kastl](https://avatars.discourse-cdn.com/v4/letter/j/bbe5ce/32.png) [@Johannes\_Kastl](https://forum.ansible.com/u/Johannes_Kastl)\
**Post date:** [May 3, 2016, 5:20am UTC](https://forum.ansible.com/t/map-extract-not-working/21272/2 "2016-05-03T05:20:36Z")

</div>

I would say your syntax is wrong. Apparently ansible does not know  
your filter called extract.

Johannes
