Anons79 Mini Shell

Directory : /lib/python2.7/site-packages/ansible/modules/storage/purestorage/
Upload File :
Current File : //lib/python2.7/site-packages/ansible/modules/storage/purestorage/purefa_smtp.pyo

�
�Udac@`s�ddlmZmZmZeZidd6dgd6dd6ZdZd	Zd
Z	ddl
mZddlm
Z
mZd
�Zd�Zd�Zedkr�e�ndS(i(tabsolute_importtdivisiontprint_functions1.1tmetadata_versiontpreviewtstatust	communitytsupported_bys�
---
module: purefa_smtp
version_added: '2.9'
author:
  - Pure Storage ansible Team (@sdodsley) <[email protected]>
short_description: Configure FlashArray SMTP settings
description:
- Set or erase configuration for the SMTP settings.
- If username/password are set this will always force a change as there is
  no way to see if the password is different from the current SMTP configuration.
- Pure Storage Ansible Team (@sdodsley) <[email protected]>
options:
  state:
    description:
    - Set or delete SMTP configuration
    default: present
    type: str
    choices: [ absent, present ]
  password:
    description:
    - The SMTP password.
    type: str
  user:
    description:
    - The SMTP username.
    type: str
  relay_host:
    description:
    - IPv4 or IPv6 address or FQDN. A port number may be appended.
    type: str
  sender_domain:
    description:
    - Domain name.
    type: str
extends_documentation_fragment:
- purestorage.fa
s�
- name: Delete existing SMTP settings
  purefa_smtp:
    state: absent
    fa_url: 10.10.10.2
    api_token: e31060a7-21fc-e277-6240-25983c6c4592

- name: Set SMTP settings
  purefa_smtp:
    sender_domain: purestorage.com
    password: account_password
    user: smtp_account
    relay_host: 10.2.56.78:2345
    fa_url: 10.10.10.2
    api_token: e31060a7-21fc-e277-6240-25983c6c4592
t
(t
AnsibleModule(t
get_systemtpurefa_argument_specc	C`spt}|js\y&|jdddddddd�Wq\tk
rX|jdd�q\Xn|jd|�d	S(
sDelete SMTP settingst
sender_domainttusernametpasswordt
relay_hosttmsgsDelete SMTP settings failedtchangedN(tTruet
check_modetset_smtpt	Exceptiont	fail_jsont	exit_json(tmoduletarrayR((sS/usr/lib/python2.7/site-packages/ansible/modules/storage/purestorage/purefa_smtp.pytdelete_smtpMs	&
cC`s�t}|j�}|js�|jdr�|d|jdkr�y!|jd|jd�t}Wq�tk
r�|jdd�q�Xnt}|jdr�|d|jdkr�y!|jd|jd�t}Wq�tk
r�|jdd�q�Xnt}|jdray.|jd|jdd|jd�t}Wqgtk
r]|jdd	�qgXnt}t|py|py|�}n|j	d
|�dS(sSet SMTP settingsRRsSet SMTP sender domain failed.RsSet SMTP relay host failed.tusert	user_nameRs"Set SMTP username/password failed.RN(
Rtget_smtpRtparamsRRRtFalsetboolR(RRRtcurrent_smtptchanged_sendert
changed_relayt
changed_creds((sS/usr/lib/python2.7/site-packages/ansible/modules/storage/purestorage/purefa_smtp.pytcreate_smtpXs4	$

$


$

cC`st�}|jtdtdddddddg�dtdd�d	tddd
t�dtdd�dtdd���dd	gg}t|d
|dt�}|jd}t|�}|dkr�t||�n,|dkr�t||�n|j	dt
�dS(NtstatettypetstrtdefaulttpresenttchoicestabsentRRtno_logRRtrequired_togethertsupports_check_modeR(RtupdatetdictRR	RR
RR&RR (t
argument_specR/RR'R((sS/usr/lib/python2.7/site-packages/ansible/modules/storage/purestorage/purefa_smtp.pytmainzs$	!		
t__main__N(t
__future__RRRR(t
__metaclass__tANSIBLE_METADATAt
DOCUMENTATIONtEXAMPLEStRETURNtansible.module_utils.basicR	tansible.module_utils.pureR
RRR&R4t__name__(((sS/usr/lib/python2.7/site-packages/ansible/modules/storage/purestorage/purefa_smtp.pyt<module>s


'		"	

Anons79 File Manager Version 1.0, Coded By Anons79
Email: [email protected]