Debian Codegraph @

ansible_collections/community/windows/plugins/modules/win_snmp.py

raw
1 #!/usr/bin/python
2 # -*- coding: utf-8 -*-
3
4 # Copyright: (c) 2018, Ansible, inc
5 # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
6
7 DOCUMENTATION = r'''
8 ---
9 module: win_snmp
10 short_description: Configures the Windows SNMP service
11 description:
12 - This module configures the Windows SNMP service.
13 options:
14 permitted_managers:
15 description:
16 - The list of permitted SNMP managers.
17 type: list
18 elements: str
19 community_strings:
20 description:
21 - The list of read-only SNMP community strings.
22 type: list
23 elements: str
24 action:
25 description:
26 - C(add) will add new SNMP community strings and/or SNMP managers
27 - C(set) will replace SNMP community strings and/or SNMP managers. An
28 empty list for either C(community_strings) or C(permitted_managers)
29 will result in the respective lists being removed entirely.
30 - C(remove) will remove SNMP community strings and/or SNMP managers
31 type: str
32 choices: [ add, set, remove ]
33 default: set
34 author:
35 - Michael Cassaniti (@mcassaniti)
36 '''
37
38 EXAMPLES = r'''
39 - name: Replace SNMP communities and managers
40 community.windows.win_snmp:
41 community_strings:
42 - public
43 permitted_managers:
44 - 192.168.1.2
45 action: set
46
47 - name: Replace SNMP communities and clear managers
48 community.windows.win_snmp:
49 community_strings:
50 - public
51 permitted_managers: []
52 action: set
53 '''
54
55 RETURN = r'''
56 community_strings:
57 description: The list of community strings for this machine.
58 type: list
59 returned: always
60 sample:
61 - public
62 - snmp-ro
63 permitted_managers:
64 description: The list of permitted managers for this machine.
65 type: list
66 returned: always
67 sample:
68 - 192.168.1.1
69 - 192.168.1.2
70 '''