# ansible2 -- filter\_plugins

**URL:** <https://forum.ansible.com/t/ansible2-filter-plugins/19448>\
**Category:** Ansible Project\
**Created:** [October 6, 2015, 11:32pm UTC](https://forum.ansible.com/t/ansible2-filter-plugins/19448 "2015-10-06T23:32:55Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![cohen.ben](https://avatars.discourse-cdn.com/v4/letter/c/c89c15/32.png) [@cohen.ben](https://forum.ansible.com/u/cohen.ben)\
**Post date:** [October 6, 2015, 11:32pm UTC](https://forum.ansible.com/t/ansible2-filter-plugins/19448/1 "2015-10-06T23:32:55Z")

</div>

I wanted to start looking at ansible 2 now that its in beta – most things are working for me out of the box – but I have a very simple custom filter that I need to use which isn’t being discovered:

sts-infrastructure (master)\> cat filter\_plugins/wrap.py

def wrap(list):

return [‘"’ + x + ‘"’ for x in list]

class FilterModule(object):

def filters(self):

return {

‘wrap’: wrap

}

I know a ansible2 migration guide is in the works – I’m assuming this will be a really quick fix though … Does anybody know how to define a custom filter in ansible2? Or have a link to a WIP of the migration guide?

Thanks,  
Ben

---

<div class="post-metadata">

**Author:** ![Brian\_Coca](https://avatars.discourse-cdn.com/v4/letter/b/6de8d8/32.png) [@Brian\_Coca](https://forum.ansible.com/u/Brian_Coca)\
**Post date:** [October 8, 2015, 2:44pm UTC](https://forum.ansible.com/t/ansible2-filter-plugins/19448/2 "2015-10-08T14:44:45Z")

</div>

afaik filters have not changed and should 'just work'
