�
�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 e d k r� e � n d S( i ( t absolute_importt divisiont print_functions 1.1t metadata_versiont previewt statust communityt supported_bys(
---
module: purefa_syslog
version_added: '2.9'
short_description: Configure Pure Storage FlashArray syslog settings
description:
- Configure syslog configuration for Pure Storage FlashArrays.
- Add or delete an individual syslog server to the existing
list of serves.
author:
- Pure Storage Ansible Team (@sdodsley) <[email protected]>
options:
state:
description:
- Create or delete syslog servers configuration
default: present
type: str
choices: [ absent, present ]
protocol:
description:
- Protocol which server uses
required: true
type: str
choices: [ tcp, tls, udp ]
port:
description:
- Port at which the server is listening. If no port is specified
the system will use 514
type: str
address:
description:
- Syslog server address.
This field supports IPv4, IPv6 or FQDN.
An invalid IP addresses will cause the module to fail.
No validation is performed for FQDNs.
type: str
required: true
extends_documentation_fragment:
- purestorage.fa
s�
- name: Delete existing syslog server entries
purefa_syslog:
address: syslog1.com
protocol: tcp
state: absent
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
- name: Set array syslog servers
purefa_syslog:
state: present
address: syslog1.com
protocol: udp
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 d d | j d } | j d rG | d | j d } n | } | j d t � d } | r� x� t d t | � � D]h } | | | k r | | =y | j d | � t } PWq� t k
r� | j d d j | � � q� Xq q Wn | j
d
| � d S( s Delete Syslog Servert protocols ://t addresst portt :t syslogserveri t msgs# Failed to remove syslog server: {0}t changedN( t Falset paramst gett Truet ranget lent sett Exceptiont fail_jsont formatt exit_json( t modulet arrayR t noport_addresst full_addresst address_listR
( ( sU /usr/lib/python2.7/site-packages/ansible/modules/storage/purestorage/purefa_syslog.pyt
delete_syslogP s"