win_snmp – Configures the Windows SNMP service
New in version 2.8.
Synopsis
- This module configures the Windows SNMP service.
 
Parameters
| Parameter | Choices/Defaults | Comments | 
|---|---|---|
|  action   string    |   
  |   add will add new SNMP community strings and/or SNMP managersset 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.   |  
Examples
---
  - hosts: Windows
    tasks:
      - name: Replace SNMP communities and managers
        win_snmp:
          communities:
            - public
          managers:
            - 192.168.1.2
          action: set
  - hosts: Windows
    tasks:
      - name: Replace SNMP communities and clear managers
        win_snmp:
          communities:
            - public
          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   |  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']   |  
Status
- This module is not guaranteed to have a backwards compatible interface. [preview]
 - This module is maintained by the Ansible Community. [community]
 
Authors
- Michael Cassaniti (@mcassaniti)
 
Hint
If you notice any issues in this documentation you can edit this document to improve it.
    © 2012–2018 Michael DeHaan
© 2018–2019 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
    https://docs.ansible.com/ansible/2.8/modules/win_snmp_module.html