Debian Codegraph @

test/integration/targets/config/lookup_plugins/bogus.py

raw
1 # (c) 2021 Ansible Project
2 # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
3
4 from __future__ import annotations
5
6
7 DOCUMENTATION = """
8 name: bogus
9 author: Ansible Core Team
10 version_added: hysterical
11 short_description: returns what you gave it
12 description:
13 - this is mostly a noop
14 options:
15 _terms:
16 description: stuff to pass through
17 test_list:
18 description: does nothing, just for testing values
19 type: list
20 choices:
21 - Dan
22 - Yevgeni
23 - Carla
24 - Manuela
25 """
26
27 EXAMPLES = """
28 - name: like some other plugins, this is mostly useless
29 debug: msg={{ q('bogus', [1,2,3])}}
30 """
31
32 RETURN = """
33 _list:
34 description: basically the same as you fed in
35 type: list
36 elements: raw
37 """
38
39 from ansible.plugins.lookup import LookupBase
40
41
42 class LookupModule(LookupBase):
43
44 def run(self, terms, variables=None, **kwargs):
45
46 self.set_options(var_options=variables, direct=kwargs)
47 dump = self.get_option('test_list')
48
49 return terms