# Ansible Play error - Template error while templating string: no filter named 'map'. String:

**URL:** <https://forum.ansible.com/t/ansible-play-error-template-error-while-templating-string-no-filter-named-map-string/28860>\
**Category:** Ansible Project\
**Tags:** aws\
**Created:** [October 24, 2018, 9:08am UTC](https://forum.ansible.com/t/ansible-play-error-template-error-while-templating-string-no-filter-named-map-string/28860 "2018-10-24T09:08:49Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kishore\_Ponniah](https://avatars.discourse-cdn.com/v4/letter/k/74df32/32.png) [@Kishore\_Ponniah](https://forum.ansible.com/u/Kishore_Ponniah)\
**Post date:** [October 24, 2018, 9:08am UTC](https://forum.ansible.com/t/ansible-play-error-template-error-while-templating-string-no-filter-named-map-string/28860/1 "2018-10-24T09:08:49Z")

</div>

Hello all,

This is the continuation of my other Post creating direct connect gateway. This is the same but using assume roles and cross-account deployment. I have added loops but there are 2 sections which are not working (debug role arns & assume cross account roles). Can some one help?

Error:

TASK [debug role arns] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
task path: /home/ec2-user/environment/aws-rxgt-mgmt-platform/ansible/rxgt-ps-rxgtmgmt-playbook.yaml:29  
fatal: [infrastructure]: FAILED! =\> {  
“msg”: “template error while templating string: no filter named ‘map’. String: {{ rxgt\_identity\_account[‘deploy\_accounts’]|map(‘extract’, rxgt\_identity\_account[‘account\_config’])|list }}”  
}

---

<div class="post-metadata">

**Author:** ![Kishore\_Ponniah](https://avatars.discourse-cdn.com/v4/letter/k/74df32/32.png) [@Kishore\_Ponniah](https://forum.ansible.com/u/Kishore_Ponniah)\
**Post date:** [October 25, 2018, 10:11am UTC](https://forum.ansible.com/t/ansible-play-error-template-error-while-templating-string-no-filter-named-map-string/28860/2 "2018-10-25T10:11:07Z")

</div>

Hello all,

I have managed to sort out this issue. I had an old version of Python-Jinja2 in my virtual environment. Once upgraded it resolved.

Thanks
