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_banner.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_banner
version_added: '2.9'
short_description: Configure Pure Storage FlashArray GUI and SSH MOTD message
description:
- Configure MOTD for Pure Storage FlashArrays.
- This will be shown during an SSH or GUI login to the array.
- Multiple line messages can be achieved using \\n.
author:
- Pure Storage Ansible Team (@sdodsley) <[email protected]>
options:
  state:
    description: Set ot delete the MOTD
    default: present
    type: str
    choices: [ present, absent ]
  banner:
    description: Banner text, or MOTD, to use
    type: str
    default: "Welcome to the machine..."
extends_documentation_fragment:
- purestorage.fa
s;
- name: Set new banner text
  purefa_banner:
    banner: "Banner over\ntwo lines"
    state: present
    fa_url: 10.10.10.2
    api_token: e31060a7-21fc-e277-6240-25983c6c4592

- name: Delete banner text
  purefa_banner:
    state: absent
    fa_url: 10.10.10.2
    api_token: e31060a7-21fc-e277-6240-25983c6c4592
t
(t
AnsibleModule(t
get_systemtpurefa_argument_speccC`s�t}yM|jds)|jdd�n|jsL|jd|jd�nt}Wn!tk
rv|jdd�nX|jd|�dS(sSet MOTD banner texttbannertmsgsInvalid MOTD banner givensFailed to set MOTD banner texttchangedN(tFalsetparamst	fail_jsont
check_modetsettTruet	Exceptiont	exit_json(tmoduletarrayR((sU/usr/lib/python2.7/site-packages/ansible/modules/storage/purestorage/purefa_banner.pyt
set_banner=s
	

cC`sXt}y|jdd�t}Wn!tk
rC|jdd�nX|jd|�dS(sDelete MOTD banner textRtR
s)Failed to delete current MOTD banner textRN(RRRRRR(RRR((sU/usr/lib/python2.7/site-packages/ansible/modules/storage/purestorage/purefa_banner.pyt
delete_bannerNs

c
C`st�}|jtdtdddd�dtddddddd	g���dddgfg}t|d
|dt�}|jd}t|�}|jdt�d}|dkr�|s�||jdkr�t	||�n"|d	kr|rt
||�n|jdt�dS(
NRttypetstrtdefaultsWelcome to the machine...tstatetpresenttchoicestabsenttrequired_iftsupports_check_modeR(RtupdatetdictR	RRR
tgetRRRR(t
argument_specR#RRRtcurrent_banner((sU/usr/lib/python2.7/site-packages/ansible/modules/storage/purestorage/purefa_banner.pytmainYs 	%		
&t__main__N(t
__future__RRRRt
__metaclass__tANSIBLE_METADATAt
DOCUMENTATIONtEXAMPLEStRETURNtansible.module_utils.basicR	tansible.module_utils.pureR
RRRR*t__name__(((sU/usr/lib/python2.7/site-packages/ansible/modules/storage/purestorage/purefa_banner.pyt<module>s


			

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