�
�Udac @` s� d d l m Z m Z m Z e Z i d d 6d g d 6d d 6Z d Z d Z d
Z d d l
m Z d d l m
Z
m Z d
� Z d � Z d � Z d � Z e d k r� e � n d S( i ( t absolute_importt divisiont print_functions 1.1t metadata_versiont previewt statust communityt supported_byse
---
module: purefa_snmp
version_added: '2.9'
short_description: Configure FlashArray SNMP Managers
description:
- Manage SNMP managers on a Pure Storage FlashArray.
- Changing of a named SNMP managers version is not supported.
- This module is not idempotent and will always modify an
existing SNMP manager due to hidden parameters that cannot
be compared to the play parameters.
author:
- Pure Storage Ansible Team (@sdodsley) <[email protected]>
options:
name:
description:
- Name of SNMP Manager
required: True
type: str
state:
description:
- Create or delete SNMP manager
type: str
default: present
choices: [ absent, present ]
auth_passphrase:
type: str
description:
- SNMPv3 only. Passphrase of 8 - 32 characters.
auth_protocol:
type: str
description:
- SNMP v3 only. Hash algorithm to use
choices: [ MD5, SHA ]
community:
type: str
description:
- SNMP v2c only. Manager community ID. Between 1 and 32 characters long.
host:
type: str
description:
- IPv4 or IPv6 address or FQDN to send trap messages to.
user:
type: str
description:
- SNMP v3 only. User ID recognized by the specified SNMP manager.
Must be between 1 and 32 characters.
version:
type: str
description:
- Version of SNMP protocol to use for the manager.
choices: [ v2c, v3 ]
default: v2c
notification:
type: str
description:
- Action to perform on event.
default: trap
choices: [ inform, trap ]
privacy_passphrase:
type: str
description:
- SNMPv3 only. Passphrase to encrypt SNMP messages.
Must be between 8 and 63 non-space ASCII characters.
privacy_protocol:
type: str
description:
- SNMP v3 only. Encryption protocol to use
choices: [ AES, DES ]
extends_documentation_fragment:
- purestorage.fa
s�
- name: Delete existing SNMP manager
purefa_snmp:
name: manager1
state: absent
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
- name: Create v2c SNMP manager
purefa_snmp:
name: manager1
community: public
host: 10.21.22.23
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
- name: Create v3 SNMP manager
purefa_snmp:
name: manager2
version: v3
auth_protocol: MD5
auth_passphrase: password
host: 10.21.22.23
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
- name: Update existing SNMP manager
purefa_snmp:
name: manager1
community: private
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
t
( t
AnsibleModule( t
get_systemt purefa_argument_specc C` s
t } | j s�y | j | j d � } Wn1 t k
r\ | j d d j | j d � � n X| d | j d k r� | j d d � q�| j d d k ry? | j | j d d | j d d | j d d | j d �Wq�t k
r| j d d
j | j d � � q�Xq�| j d r�| j d r�ys | j | j d d
| j d
d | j d d | j d d | j d d | j d d | j d d | j d �Wq�t k
r�| j d d
j | j d � � q�Xq�| j d r�| j d r�yf | j | j d d | j d d
| j d
d | j d d | j d d | j d d | j d �Wq�t k
r�| j d d
j | j d � � q�Xq�| j d rD| j d rDyf | j | j d d | j d d | j d d | j d d | j d d | j d d | j d �Wq�t k
r@| j d d
j | j d � � q�Xq�| j d r�| j d r�yL | j | j d d | j d d | j d d | j d d | j d �Wq�t k
r�| j d d
j | j d � � q�Xq�| j d d � n | j d | � d S( s Update SNMP Managert namet msgs9 Failed to get current configuration for SNMP manager {0}.t versions3 Changing an SNMP managers version is not supported.t v2cR t notificationt hosts"