Debian Codegraph @

test/integration/targets/module_utils/library/test_no_log.py

raw
1 #!/usr/bin/python
2 # (c) 2021 Ansible Project
3 # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
4
5 from __future__ import annotations
6
7
8 from ansible.module_utils.basic import AnsibleModule, env_fallback
9
10
11 def main():
12 module = AnsibleModule(
13 argument_spec=dict(
14 explicit_pass=dict(type='str', no_log=True),
15 fallback_pass=dict(type='str', no_log=True, fallback=(env_fallback, ['SECRET_ENV'])),
16 default_pass=dict(type='str', no_log=True, default='default_password'),
17 normal=dict(type='str', default='plaintext'),
18 suboption=dict(
19 type='dict',
20 options=dict(
21 explicit_sub_pass=dict(type='str', no_log=True),
22 fallback_sub_pass=dict(type='str', no_log=True, fallback=(env_fallback, ['SECRET_SUB_ENV'])),
23 default_sub_pass=dict(type='str', no_log=True, default='default_sub_password'),
24 normal=dict(type='str', default='plaintext'),
25 ),
26 ),
27 ),
28 )
29
30 module.exit_json(changed=False)
31
32
33 if __name__ == '__main__':
34 main()