diff options
Diffstat (limited to 'test/integration/targets/ansible-doc/collections/ansible_collections/testns/testcol/plugins/filter')
3 files changed, 72 insertions, 0 deletions
diff --git a/test/integration/targets/ansible-doc/collections/ansible_collections/testns/testcol/plugins/filter/filter_subdir/in_subdir.py b/test/integration/targets/ansible-doc/collections/ansible_collections/testns/testcol/plugins/filter/filter_subdir/in_subdir.py new file mode 100644 index 0000000..a8924e1 --- /dev/null +++ b/test/integration/targets/ansible-doc/collections/ansible_collections/testns/testcol/plugins/filter/filter_subdir/in_subdir.py @@ -0,0 +1,23 @@ +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +# Make coding more python3-ish +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type + +from ansible.utils.display import Display + +display = Display() + + +def nochange(a): + return a + + +class FilterModule(object): + ''' Ansible core jinja2 filters ''' + + def filters(self): + return { + 'noop': nochange, + 'nested': nochange, + } diff --git a/test/integration/targets/ansible-doc/collections/ansible_collections/testns/testcol/plugins/filter/grouped.py b/test/integration/targets/ansible-doc/collections/ansible_collections/testns/testcol/plugins/filter/grouped.py new file mode 100644 index 0000000..a10c7aa --- /dev/null +++ b/test/integration/targets/ansible-doc/collections/ansible_collections/testns/testcol/plugins/filter/grouped.py @@ -0,0 +1,28 @@ +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +# Make coding more python3-ish +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type + +from ansible.utils.display import Display + +display = Display() + + +def nochange(a): + return a + + +def meaningoflife(a): + return 42 + + +class FilterModule(object): + ''' Ansible core jinja2 filters ''' + + def filters(self): + return { + 'noop': nochange, + 'ultimatequestion': meaningoflife, + 'b64decode': nochange, # here to colide with basename of builtin + } diff --git a/test/integration/targets/ansible-doc/collections/ansible_collections/testns/testcol/plugins/filter/ultimatequestion.yml b/test/integration/targets/ansible-doc/collections/ansible_collections/testns/testcol/plugins/filter/ultimatequestion.yml new file mode 100644 index 0000000..a67654d --- /dev/null +++ b/test/integration/targets/ansible-doc/collections/ansible_collections/testns/testcol/plugins/filter/ultimatequestion.yml @@ -0,0 +1,21 @@ +DOCUMENTATION: + name: ultimatequestion + author: Terry Prachet + version_added: 'histerical' + short_description: Ask any question but it will only respond with the answer to the ulitmate one + description: + - read the book + options: + _input: + description: Anything you want, goign to ignore it anywayss ... + type: raw + required: true + +EXAMPLES: | + # set first 10 volumes rw, rest as dp + meaning: "{{ (stuff|ulmtimatequestion }}" + +RETURN: + _value: + description: guess + type: int |