community.general/lib/ansible/modules/windows/win_snmp.py
Dag Wieers d863027159 Windows: Add missing parameter types and doc fixes (#50232)
* Windows: Add missing parameter types and doc fixes

This PR includes:
- Adding missing parameter types
- Various documentation fixes

* Update lib/ansible/modules/windows/win_copy.py

Co-Authored-By: dagwieers <dag@wieers.com>

* Update lib/ansible/modules/windows/win_credential.py

Co-Authored-By: dagwieers <dag@wieers.com>

* Update lib/ansible/modules/windows/win_domain_computer.py

Co-Authored-By: dagwieers <dag@wieers.com>

* Update lib/ansible/modules/windows/win_domain_user.py

Co-Authored-By: dagwieers <dag@wieers.com>

* Update lib/ansible/modules/windows/win_environment.py

Co-Authored-By: dagwieers <dag@wieers.com>

* Update lib/ansible/modules/windows/win_psexec.py

Co-Authored-By: dagwieers <dag@wieers.com>

* Update lib/ansible/modules/windows/win_uri.py

Co-Authored-By: dagwieers <dag@wieers.com>

* Update lib/ansible/modules/windows/win_wait_for.py

Co-Authored-By: dagwieers <dag@wieers.com>

* Ensure docstrings are raw strings
2019-01-03 10:50:44 -06:00

80 lines
2 KiB
Python

#!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright: (c) 2018, Ansible, inc
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
ANSIBLE_METADATA = {
'metadata_version': '1.1',
'status': ['preview'],
'supported_by': 'community'
}
DOCUMENTATION = r'''
---
module: win_snmp
version_added: '2.8'
short_description: Configures the Windows SNMP service
description:
- This module configures the Windows SNMP service.
options:
permitted_managers:
description:
- The list of permitted SNMP managers.
type: list
community_strings:
description:
- The list of read-only SNMP community strings.
type: list
action:
description:
- C(add) will add new SNMP community strings and/or SNMP managers
- C(set) will replace SNMP community strings and/or SNMP managers. An
empty list for either C(community_strings) or C(permitted_managers)
will result in the respective lists being removed entirely.
- C(remove) will remove SNMP community strings and/or SNMP managers
type: str
choices: [ add, set, remove ]
default: set
author:
- Michael Cassaniti (@mcassaniti)
'''
EXAMPLES = r'''
---
- 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 = r'''
community_strings:
description: The list of community strings for this machine.
type: list
returned: always
sample:
- public
- snmp-ro
permitted_managers:
description: The list of permitted managers for this machine.
type: list
returned: always
sample:
- 192.168.1.1
- 192.168.1.2
'''