community.windows.win_snmp module – Configures the Windows SNMP service
Note
This module is part of the community.windows collection (version 2.4.0).
It is not included in ansible-core
.
To check whether it is installed, run ansible-galaxy collection list
.
To install it, use: ansible-galaxy collection install community.windows
.
To use it in a playbook, specify: community.windows.win_snmp
.
Synopsis
This module configures the Windows SNMP service.
Parameters
Parameter |
Comments |
---|---|
Choices:
|
|
The list of read-only SNMP community strings. |
|
The list of permitted SNMP managers. |
Examples
- 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
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
The list of community strings for this machine. Returned: always Sample: |
|
The list of permitted managers for this machine. Returned: always Sample: |