summaryrefslogtreecommitdiffstats
path: root/test/integration/targets/no_log/library/module.py
blob: d4f3c565cff9c0c14615b4650416335cb2398ab1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright (c) 2019 Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)

from __future__ import absolute_import, division, print_function
__metaclass__ = type

from ansible.module_utils.basic import AnsibleModule


def main():
    module = AnsibleModule(
        argument_spec={
            'state': {},
            'secret': {'no_log': True},
            'subopt_dict': {
                'type': 'dict',
                'options': {
                    'str_sub_opt1': {'no_log': True},
                    'str_sub_opt2': {},
                    'nested_subopt': {
                        'type': 'dict',
                        'options': {
                            'n_subopt1': {'no_log': True},
                        }
                    }
                }
            },
            'subopt_list': {
                'type': 'list',
                'elements': 'dict',
                'options': {
                    'subopt1': {'no_log': True},
                    'subopt2': {},
                }
            }

        }
    )
    module.exit_json(msg='done')


if __name__ == '__main__':
    main()