Debian Codegraph @

test/integration/targets/deprecations/library/willremove.py

raw
1 # -*- coding: utf-8 -*-
2 # Copyright: 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 DOCUMENTATION = r"""
9 ---
10 module: willremove
11 version_added: hysterical
12 short_description: does nothing
13 description: does nothing, this is deprecation test
14 deprecated:
15 removed_in: '3.30'
16 why: cause i wanna!
17 alternatives: no soup for you!
18 options:
19 one:
20 description:
21 - first option
22 type: bool
23 default: no
24 two:
25 description:
26 - second option
27 notes:
28 - Just noop to test module deprecation
29 seealso:
30 - module: removeoption
31 author:
32 - Ansible Core Team
33 attributes:
34 action:
35 support: full
36 async:
37 support: full
38 bypass_host_loop:
39 support: none
40 check_mode:
41 support: full
42 diff_mode:
43 support: none
44 platform:
45 platforms: all
46 """
47
48 EXAMPLES = r"""
49 - name: useless
50 willremove:
51 one: true
52 two: /etc/file.conf
53 """
54
55 RETURN = r"""
56 """
57
58 from ansible.module_utils.basic import AnsibleModule
59
60
61 def main():
62 module = AnsibleModule(
63 argument_spec=dict(
64 one=dict(type='bool', default='no'),
65 two=dict(type='str'),
66 ),
67 supports_check_mode=True
68 )
69
70 one = module.params['one']
71 two = module.params['two']
72
73 result = {'yolo': 'lola'}
74
75 module.exit_json(**result)
76
77
78 if __name__ == '__main__':
79 main()