Debian Codegraph @

test/integration/targets/no_log/library/module.py

raw
1 #!/usr/bin/python
2 # -*- coding: utf-8 -*-
3 # Copyright (c) 2019 Ansible Project
4 # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
5
6 from __future__ import annotations
7
8 from ansible.module_utils.basic import AnsibleModule
9
10
11 def main():
12 module = AnsibleModule(
13 argument_spec={
14 'state': {},
15 'secret': {'no_log': True},
16 'subopt_dict': {
17 'type': 'dict',
18 'options': {
19 'str_sub_opt1': {'no_log': True},
20 'str_sub_opt2': {},
21 'nested_subopt': {
22 'type': 'dict',
23 'options': {
24 'n_subopt1': {'no_log': True},
25 }
26 }
27 }
28 },
29 'subopt_list': {
30 'type': 'list',
31 'elements': 'dict',
32 'options': {
33 'subopt1': {'no_log': True},
34 'subopt2': {},
35 }
36 }
37
38 }
39 )
40 module.exit_json(msg='done', values=', '.join([str(v) for v in module.params.values() if v]))
41
42
43 if __name__ == '__main__':
44 main()