community.windows.win_snmp
Configures the Windows SNMP service
- This module configures the Windows SNMP service.
Parameter |
Choices/Defaults |
Comments |
action
string
|
Choices:
- add
set ←
- remove
|
add will add new SNMP community strings and/or SNMP managers
set will replace SNMP community strings and/or SNMP managers. An empty list for either community_strings or permitted_managers will result in the respective lists being removed entirely.
remove will remove SNMP community strings and/or SNMP managers
|
community_strings
list
|
|
The list of read-only SNMP community strings.
|
permitted_managers
list
|
|
The list of permitted SNMP managers.
|
- name: Replace SNMP communities and managers
community.windows.win_snmp:
community_strings:
- public
permitted_managers:
- 192.168.1.2
action: set
- name: Replace SNMP communities and clear managers
community.windows.win_snmp:
community_strings:
- public
permitted_managers: []
action: set
Common return values are documented here, the following are the fields unique to this module:
Key |
Returned |
Description |
community_strings
list
|
always |
The list of community strings for this machine.
Sample:
['public', 'snmp-ro']
|
permitted_managers
list
|
always |
The list of permitted managers for this machine.
Sample:
['192.168.1.1', '192.168.1.2']
|
- Michael Cassaniti (@mcassaniti)