# Need some data filter from meta data which came from custom module.

**URL:** <https://forum.ansible.com/t/need-some-data-filter-from-meta-data-which-came-from-custom-module/32700>\
**Category:** Ansible Project\
**Created:** [April 16, 2020, 12:29pm UTC](https://forum.ansible.com/t/need-some-data-filter-from-meta-data-which-came-from-custom-module/32700 "2020-04-16T12:29:15Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Venu\_Devannagari](https://avatars.discourse-cdn.com/v4/letter/v/d2c977/32.png) [@Venu\_Devannagari](https://forum.ansible.com/u/Venu_Devannagari)\
**Post date:** [April 16, 2020, 12:29pm UTC](https://forum.ansible.com/t/need-some-data-filter-from-meta-data-which-came-from-custom-module/32700/1 "2020-04-16T12:29:15Z")

</div>

I am getting following output from my ansible custom module ‘{‘failed’: False, ‘meta’: {‘Unused Policy Rules IDS’: [0, 3, 4, 5, 6]}, ‘changed’: False}’ to one variable .I need to fetch only “{‘Unused Policy Rules IDS’: [0, 3, 4, 5, 6]”}.Can anyone help to resolve this issue.

---

<div class="post-metadata">

**Author:** ![Thanh\_Nguyen\_Duc](https://avatars.discourse-cdn.com/v4/letter/t/c89c15/32.png) [@Thanh\_Nguyen\_Duc](https://forum.ansible.com/u/Thanh_Nguyen_Duc)\
**Post date:** [April 16, 2020, 1:24pm UTC](https://forum.ansible.com/t/need-some-data-filter-from-meta-data-which-came-from-custom-module/32700/2 "2020-04-16T13:24:14Z")

</div>

Seem like you can register the result result and extract only the meta:  
register: result  
debug:  
var: result.meta

Anyway, you must see how is the data your module return:)

---

<div class="post-metadata">

**Author:** ![Venu\_Devannagari](https://avatars.discourse-cdn.com/v4/letter/v/d2c977/32.png) [@Venu\_Devannagari](https://forum.ansible.com/u/Venu_Devannagari)\
**Post date:** [April 16, 2020, 1:54pm UTC](https://forum.ansible.com/t/need-some-data-filter-from-meta-data-which-came-from-custom-module/32700/3 "2020-04-16T13:54:36Z")

</div>

Hi

Thanks for the reply my playbook give me the following output in one variable.

ok: [localhost → localhost] =\> {  
“changed”: false,  
“invocation”: {  
“module\_args”: {  
“forti\_ip”: “xxxxx”,  
“password”: “VALUE\_SPECIFIED\_IN\_NO\_LOG\_PARAMETER”,  
“username”: “xxxx”,  
“vdom”: “root”  
}  
},  
“meta”: [  
0,  
3,  
4,  
5,  
6  
]  
}

but I need to save this output to one remote machine where the same variable will be called there in data field the changed and failed params are came.

changed: [localhost] =\> {  
“changed”: true,  
“invocation”: {  
“module\_args”: {  
“data”: “{‘failed’: False, ‘meta’: [0, 3, 4, 5, 6], ‘changed’: False}”,  
“dirname”: “xxxxt”,  
“filename”: “fortigate.txt”,  
“password”: “xxxxx”,  
“remote\_machine”: “xxxxx”,  
“username”: “xxxxx”  
}  
},  
“meta”: “{‘failed’: False, ‘meta’: [0, 3, 4, 5, 6], ‘changed’: False}”
