ansible2 -- filter_plugins

40 views
Skip to first unread message

Ben Cohen

unread,
Oct 6, 2015, 7:33:07 PM10/6/15
to ansible...@googlegroups.com
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

Brian Coca

unread,
Oct 8, 2015, 10:44:54 AM10/8/15
to Ansible Project
afaik filters have not changed and should 'just work'

--
Brian Coca
Reply all
Reply to author
Forward
0 new messages