mirror of https://github.com/ansible/ansible.git
[stable-2.9] Address fixme and handle filter/test errors for collections better (#68047)
* Address fixme and handle fitler/test errors for collections better. Fixes #66721
* Re-arrange code
(cherry picked from commit ee6413a
)
Co-authored-by: Matt Martz <matt@sivel.net>
pull/69271/head
parent
ff3275f9bd
commit
6c2b372d1b
@ -0,0 +1,4 @@
|
||||
bugfixes:
|
||||
- collections - Handle errors better for filters and tests in collections,
|
||||
where a non-existent collection is specified, or importing the plugin
|
||||
results in an exception (https://github.com/ansible/ansible/issues/66721)
|
@ -0,0 +1,13 @@
|
||||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
|
||||
class FilterModule(object):
|
||||
|
||||
def filters(self):
|
||||
return {
|
||||
'broken': lambda x: 'broken',
|
||||
}
|
||||
|
||||
|
||||
raise Exception('This is a broken filter plugin')
|
Loading…
Reference in New Issue