community.windows.win_snmp – Configures the Windows SNMP service
community.windows.win_snmp – Configures the Windows SNMP service
Note
This plugin is part of the community.windows collection (version 1.2.0).
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 | Choices/Defaults | Comments |
---|---|---|
action string |
|
|
community_strings list / elements=string |
The list of read-only SNMP community strings. | |
permitted_managers list / elements=string |
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 | Returned | Description |
---|---|---|
community_strings list / elements=string |
always |
The list of community strings for this machine.
Sample: ['public', 'snmp-ro'] |
permitted_managers list / elements=string |
always |
The list of permitted managers for this machine.
Sample: ['192.168.1.1', '192.168.1.2'] |
Authors
- Michael Cassaniti (@mcassaniti)
© 2012–2018 Michael DeHaan
© 2018–2021 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/2.11/collections/community/windows/win_snmp_module.html