??????????????
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 173

Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 174

Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 175

Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 176

Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 177

Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 178
ó ßUdac@`sƒddlmZmZmZeZidd6dgd6dd6ZdZd Zd Z dd l m Z dd l m Z dd l Z yddlmZmZWnek r­ZnXddlmZddlmZddlmZmZmZmZmZmZmZmZd„Z de!fd„ƒYZ"d„Z#d„Z$e%d„Z&e'd„Z(e"j)d„Z*d„Z+e,dkre+ƒnd S(i(tabsolute_importtdivisiontprint_functions1.1tmetadata_versiontpreviewtstatust communityt supported_bysî --- module: efs short_description: create and maintain EFS file systems description: - Module allows create, search and destroy Amazon EFS file systems version_added: "2.2" requirements: [ boto3 ] author: - "Ryan Sydnor (@ryansydnor)" - "Artem Kazakov (@akazakov)" options: encrypt: description: - A boolean value that, if true, creates an encrypted file system. This can not be modified after the file system is created. type: bool default: 'no' version_added: 2.5 kms_key_id: description: - The id of the AWS KMS CMK that will be used to protect the encrypted file system. This parameter is only required if you want to use a non-default CMK. If this parameter is not specified, the default CMK for Amazon EFS is used. The key id can be Key ID, Key ID ARN, Key Alias or Key Alias ARN. version_added: 2.5 purge_tags: description: - If yes, existing tags will be purged from the resource to match exactly what is defined by I(tags) parameter. If the I(tags) parameter is not set then tags will not be modified. type: bool default: 'yes' version_added: 2.5 state: description: - Allows to create, search and destroy Amazon EFS file system default: 'present' choices: ['present', 'absent'] name: description: - Creation Token of Amazon EFS file system. Required for create and update. Either name or ID required for delete. id: description: - ID of Amazon EFS. Either name or ID required for delete. performance_mode: description: - File system's performance mode to use. Only takes effect during creation. default: 'general_purpose' choices: ['general_purpose', 'max_io'] tags: description: - "List of tags of Amazon EFS. Should be defined as dictionary In case of 'present' state with list of tags and existing EFS (matched by 'name'), tags of EFS will be replaced with provided data." targets: description: - "List of mounted targets. It should be a list of dictionaries, every dictionary should include next attributes: - subnet_id - Mandatory. The ID of the subnet to add the mount target in. - ip_address - Optional. A valid IPv4 address within the address range of the specified subnet. - security_groups - Optional. List of security group IDs, of the form 'sg-xxxxxxxx'. These must be for the same VPC as subnet specified This data may be modified for existing EFS using state 'present' and new list of mount targets." throughput_mode: description: - The throughput_mode for the file system to be created. - Requires botocore >= 1.10.57 choices: ['bursting', 'provisioned'] version_added: 2.8 provisioned_throughput_in_mibps: description: - If the throughput_mode is provisioned, select the amount of throughput to provisioned in Mibps. - Requires botocore >= 1.10.57 type: float version_added: 2.8 wait: description: - "In case of 'present' state should wait for EFS 'available' life cycle state (of course, if current state not 'deleting' or 'deleted') In case of 'absent' state should wait for EFS 'deleted' life cycle state" type: bool default: 'no' wait_timeout: description: - How long the module should wait (in seconds) for desired state before returning. Zero means wait as long as necessary. default: 0 extends_documentation_fragment: - aws - ec2 sî # EFS provisioning - efs: state: present name: myTestEFS tags: name: myTestNameTag purpose: file-storage targets: - subnet_id: subnet-748c5d03 security_groups: [ "sg-1a2b3c4d" ] # Modifying EFS data - efs: state: present name: myTestEFS tags: name: myAnotherTestTag targets: - subnet_id: subnet-7654fdca security_groups: [ "sg-4c5d6f7a" ] # Deleting EFS - efs: state: absent name: myTestEFS s„ creation_time: description: timestamp of creation date returned: always type: str sample: "2015-11-16 07:30:57-05:00" creation_token: description: EFS creation token returned: always type: str sample: "console-88609e04-9a0e-4a2e-912c-feaa99509961" file_system_id: description: ID of the file system returned: always type: str sample: "fs-xxxxxxxx" life_cycle_state: description: state of the EFS file system returned: always type: str sample: "creating, available, deleting, deleted" mount_point: description: url of file system with leading dot from the time when AWS EFS required to add a region suffix to the address returned: always type: str sample: ".fs-xxxxxxxx.efs.us-west-2.amazonaws.com:/" filesystem_address: description: url of file system valid for use with mount returned: always type: str sample: "fs-xxxxxxxx.efs.us-west-2.amazonaws.com:/" mount_targets: description: list of mount targets returned: always type: list sample: [ { "file_system_id": "fs-a7ad440e", "ip_address": "172.31.17.173", "life_cycle_state": "available", "mount_target_id": "fsmt-d8907871", "network_interface_id": "eni-6e387e26", "owner_id": "740748460359", "security_groups": [ "sg-a30b22c6" ], "subnet_id": "subnet-e265c895" }, ... ] name: description: name of the file system returned: always type: str sample: "my-efs" number_of_mount_targets: description: the number of targets mounted returned: always type: int sample: 3 owner_id: description: AWS account ID of EFS owner returned: always type: str sample: "XXXXXXXXXXXX" size_in_bytes: description: size of the file system in bytes as of a timestamp returned: always type: dict sample: { "timestamp": "2015-12-21 13:59:59-05:00", "value": 12288 } performance_mode: description: performance mode of the file system returned: always type: str sample: "generalPurpose" tags: description: tags on the efs instance returned: always type: dict sample: { "name": "my-efs", "key": "Value" } (tsleep(ttimeN(t ClientErrort BotoCoreError(t to_native(t AnsibleModule(t HAS_BOTO3t boto3_conntcamel_dict_to_snake_dicttec2_argument_spectget_aws_connection_infotansible_dict_to_boto3_tag_listtcompare_aws_tagstboto3_tag_list_to_ansible_dictc`st‡fd†|DƒƒS(Nc3`s|]}|ˆ|fVqdS(N((t.0titem(tkey(sD/usr/lib/python2.7/site-packages/ansible/modules/cloud/amazon/efs.pys îs(tdict(Rtitems((RsD/usr/lib/python2.7/site-packages/ansible/modules/cloud/amazon/efs.pyt _index_by_keyíst EFSConnectioncB`s¿eZdZdZdZdZdZd„Zd„Zd„Z d„Z d „Z d „Z dd „Zdd „Zd „Zd„Zd„Zd„Zd„Zd„Zdd„Zd„ZRS(itcreatingt availabletdeletingtdeletedc K`sdt|ddddd|||_||_||_|jjdƒ|_|jjdƒ|_dS(Nt conn_typetclienttresourcetefstregiontwaitt wait_timeout(Rt connectiontmoduleR%tparamstgetR&R'(tselfR)R%taws_connect_params((sD/usr/lib/python2.7/site-packages/ansible/modules/cloud/amazon/efs.pyt__init__ús    ck`std|jj|}xþ|D]ö}|d|dR@tget_security_groups(R,RBttargetsttarget((sD/usr/lib/python2.7/site-packages/ansible/modules/cloud/amazon/efs.pyRA*s     cK`std|jj|S(sG Returns security groups for selected instance of EFS RG(R;R(t%describe_mount_target_security_groups(R,RB((sD/usr/lib/python2.7/site-packages/ansible/modules/cloud/amazon/efs.pyRI<s cC`s5ttd|jjd|ƒƒ}|r1|dp4dS(s: Returns ID of instance by instance name R/R0R3N(tfirst_or_defaultR;R(R<tNone(R,tnametinfo((sD/usr/lib/python2.7/site-packages/ansible/modules/cloud/amazon/efs.pytget_file_system_idFs   cC`s>ttd|jjd|d|ƒƒ}|r7|dp=|jS(s= Returns state of filesystem by EFS id/name R/R0R3R8(RMR;R(R<t STATE_DELETED(R,ROtfile_system_idRP((sD/usr/lib/python2.7/site-packages/ansible/modules/cloud/amazon/efs.pytget_file_system_stateQs   c`satd|jjd|ƒ}ˆrWtˆtƒs<ˆg‰nt‡fd†|ƒ}nt|ƒS(sd Returns states of mount targets of selected EFS with selected state(s) (optional) R:R3c`s|dˆkS(NR8((RK(tstates(sD/usr/lib/python2.7/site-packages/ansible/modules/cloud/amazon/efs.pytjs(R;R(RHt isinstanceR@tfilter(R,RSRURJ((RUsD/usr/lib/python2.7/site-packages/ansible/modules/cloud/amazon/efs.pytget_mount_targets_in_state]s   cC`st|jdƒS(sK Ensure boto3 includes provisioned throughput mode feature tupdate_file_system(thasattrR((R,((sD/usr/lib/python2.7/site-packages/ansible/modules/cloud/amazon/efs.pytsupports_provisioned_modenscK`s2ttd|jj|ƒ}|r.|dp1dS(sC Returns throughput mode for selected EFS instance R/tThroughputModeN(RMR;R(R<RN(R,RBRP((sD/usr/lib/python2.7/site-packages/ansible/modules/cloud/amazon/efs.pytget_throughput_modets   cK`s.ttd|jj|ƒ}|jddƒS(sC Returns throughput mode for selected EFS instance R/tProvisionedThroughputInMibpsN(RMR;R(R<R+RN(R,RBRP((sD/usr/lib/python2.7/site-packages/ansible/modules/cloud/amazon/efs.pyt#get_provisioned_throughput_in_mibps€s   c `sÌt}ˆjˆƒ}i} ˆ| d<|| d<|rB|| d= 1.10.57R_sFprovisioned_throughput_in_mibps parameter requires botocore >= 1.10.57c`s ˆjˆƒS(N(RT((ROR,(sD/usr/lib/python2.7/site-packages/ansible/modules/cloud/amazon/efs.pyRV¥ss!Unable to create file system: {0}t exceptionc`s ˆjˆƒS(N(RT((ROR,(sD/usr/lib/python2.7/site-packages/ansible/modules/cloud/amazon/efs.pyRV¶sN(tFalseRTRNR\R)t fail_jsontSTATE_DELETINGRRtwait_forR(tcreate_file_systemtTrueR tformatR t tracebackt format_excRtresponseR R>R'( R,ROtperformance_modetencryptt kms_key_idtthroughput_modetprovisioned_throughput_in_mibpstchangedtstateR*te((ROR,sD/usr/lib/python2.7/site-packages/ansible/modules/cloud/amazon/efs.pyRj‹sF           !! c `s•t}ˆjˆƒ}|ˆjˆjgkr‘ˆjˆƒ}ˆjd|ƒ}ˆjd|ƒ}tƒ} |rˆ||krˆ|| dtSTATE_CREATINGRQR^R`RtlenRiR'R(RZRkR R)RgRlR RmRnRRoR ( R,RORsRtRuRvtfs_idt current_modetcurrent_throughputR*Rw((ROR,sD/usr/lib/python2.7/site-packages/ansible/modules/cloud/amazon/efs.pyRZ½s4     !!c`s÷t}ˆj|ƒ‰|dk rÌttˆjdˆƒƒ||ƒ\}} | ryˆjjdˆd| ƒWntk r½} ˆj j ddj t | ƒƒdt jƒt| jƒnAtk rý} ˆj j ddj t | ƒƒdt jƒƒnXt}n|rÌy#ˆjjdˆdt|ƒƒWntk r} ˆj j ddj t | ƒƒdt jƒt| jƒnAtk r¿} ˆj j ddj t | ƒƒdt jƒƒnXt}qÌn|dk róˆjˆjg‰t‡‡‡fd†d ƒtd ˆjdˆƒƒ} td |ƒ}t| |tƒ\} } }g| D]/}td d d g| |||ƒsR|^qR}t|ƒ|}t| ƒ|} |rþx)|D]!}ˆjjd | |d ƒq´Wt‡‡‡fd†d ƒt}n| rZx(| D] }ˆjjdˆ||q Wt‡‡‡fd†d ˆjƒt}ng| D]8}d||kra| |d||dkra|^qa}|róx?|D]7}ˆjj d | |d d||j!ddƒƒq¬Wt}qón|S(sS Change attributes (mount targets and tags) of filesystem by name R3tTagKeysRdsUnable to delete tags: {0}ReR9sUnable to create tags: {0}c`stˆjˆˆƒƒS(N(RyRY((Rztincomplete_statesR,(sD/usr/lib/python2.7/site-packages/ansible/modules/cloud/amazon/efs.pyRVsitSubnetIdt IpAddresstNetworkInterfaceIdRFc`stˆjˆˆƒƒS(N(RyRY((RzR~R,(sD/usr/lib/python2.7/site-packages/ansible/modules/cloud/amazon/efs.pyRVsc`stˆjˆˆƒƒS(N(RyRY((RzR~R,(sD/usr/lib/python2.7/site-packages/ansible/modules/cloud/amazon/efs.pyRV)sRGN("RfRQRNRRR?R(t delete_tagsR R)RgRlR RmRnRRoR Rkt create_tagsRRxRhRiRRAt dict_difft targets_equalR@tdelete_mount_targettcreate_mount_targetR't#modify_mount_target_security_groupsR+(R,ROREt purge_tagsRJRsRttresultttags_need_modifyttags_to_deleteRwtcurrent_targetsttargets_to_createt intersectionttargets_to_deletetsidRutsecurity_groups_to_update((RzR~R,sD/usr/lib/python2.7/site-packages/ansible/modules/cloud/amazon/efs.pytconverge_file_systemÝsŠ *  !!  !!           (   c`s¿t}ˆjˆ|ƒ}|ˆjˆjgkrt‡‡fd†ˆjƒ|sdˆjˆƒ}nˆj|ƒˆjjd|ƒt }nˆj r»t‡‡fd†ˆj ˆj ƒn|S(s2 Removes EFS instance by id/name c`s ˆjˆƒS(N(RT((ROR,(sD/usr/lib/python2.7/site-packages/ansible/modules/cloud/amazon/efs.pyRVFsR3c`s ˆjˆƒS(N(RT((ROR,(sD/usr/lib/python2.7/site-packages/ansible/modules/cloud/amazon/efs.pyRVQs( RfRTRxR>RiRQtdelete_mount_targetsR(tdelete_file_systemRkR&RRR'(R,RORSRŠRv((ROR,sD/usr/lib/python2.7/site-packages/ansible/modules/cloud/amazon/efs.pyR•>s"     c`st‡‡fd†dƒˆjˆˆjƒ}x%|D]}ˆjjd|dƒq5Wt‡‡fd†dƒt|ƒdkS(s2 Removes mount targets by EFS id c`stˆjˆˆjƒƒS(N(RyRYRx((RSR,(sD/usr/lib/python2.7/site-packages/ansible/modules/cloud/amazon/efs.pyRV]siRFc`stˆjˆˆjƒƒS(N(RyRYRh((RSR,(sD/usr/lib/python2.7/site-packages/ansible/modules/cloud/amazon/efs.pyRVfs(RiRYR>R(R†Ry(R,RSRJRK((RSR,sD/usr/lib/python2.7/site-packages/ansible/modules/cloud/amazon/efs.pyR”Xs N(t__name__t __module__tDEFAULT_WAIT_TIMEOUT_SECONDSRxR>RhRRR.RCR?RARIRQRNRTRYR\R^R`RjRZR“R•R”(((sD/usr/lib/python2.7/site-packages/ansible/modules/cloud/amazon/efs.pyRñs*      2 a ck`sÔtd„|jƒDƒƒ}d}x«trÏyK||}x||D] }|VqEWd|krt|d|dqsit NextMarkert NextmarkertMarkertErrortCodetThrottlingExceptioniXiN(RRRkR RoR(tattrt map_methodRBtargsR&tdatatelmRw((sD/usr/lib/python2.7/site-packages/ansible/modules/cloud/amazon/efs.pyR;ms"    #  cC`s9x2|D]*}||kr||||krtSqWtS(sC Method compare two mount targets by specified attributes (RfRk(tkeystatbR((sD/usr/lib/python2.7/site-packages/ansible/modules/cloud/amazon/efs.pyR……s  cC`sgt|r|jƒn |jƒƒ}t|r9|jƒn |jƒƒ}||@}||A|||AfS(sD Helper method to calculate difference of two dictionaries (tsetR¥R(tdict1tdict2tby_keytkeys1tkeys2R((sD/usr/lib/python2.7/site-packages/ansible/modules/cloud/amazon/efs.pyR„s$$ cC`sx|D]}|SW|S(sC Helper method to fetch first element of list (if exists) ((RtdefaultR((sD/usr/lib/python2.7/site-packages/ansible/modules/cloud/amazon/efs.pyRMœs cC`svtƒ}xftrq|ƒ|krm|dkr]tƒ||kr]tdt|ƒdƒ‚q tdƒq nPq WdS(sN Helper method to wait for desired value returned by callback method isWait timeout exceeded (s sec)iN(t timestampRkt RuntimeErrorR=R(tcallbackR™ttimeoutt wait_start((sD/usr/lib/python2.7/site-packages/ansible/modules/cloud/amazon/efs.pyRi¥s   c"`sTtƒ}|jtdtdtdddtƒdtdtdddd d gdd ƒd tdtdddd1ƒd tdtddƒd tdtdddd1ƒdtdtdddd1ƒdtdtdddiƒdtdtdddgƒdtdtdddddgddƒdtdtdddddgdd1ƒdtdtddƒdtdtdddtƒdtdtddddƒƒ ƒtd|ƒ}ts¸|jd d!ƒnt |d"tƒ\}}}t |||}|j j dƒ}|j j d ƒ}|j j dƒ}id#d$6d%d&6d'd(6‰g|j j dƒD](} t‡fd)†| j ƒDƒƒ^qI} id*d6d+d6} |j j dƒ} |j j d ƒ} | |j j dƒ}|j j d ƒ}|j j dƒ}|j j dƒ}t|j j dƒƒjƒ}t}|d krÝ|sD|jd d,ƒn|j||| | ||ƒ}|jƒrŒ|j|||ƒp†|}n|jd|d|d |d| d|d|ƒp¿|}t|jd-|ƒƒ}nH|d kr%| r | r |jd d.ƒn|j||ƒ}d1}n|r:t|ƒ}n|jd/|d0|ƒd1S(2s Module action handler RqtrequiredttypetboolR®RvR=tchoicestpresenttabsentRrR‰tidRORERRJR@Rptgeneral_purposetmax_ioRstburstingt provisionedRttfloatR&R'tintit argument_specRdsboto3 required for this moduletboto3R€t ip_addressRGtsecurity_groupsRt subnet_idc3`s%|]\}}ˆ||fVqdS(N((RRR™(ttarget_translations(sD/usr/lib/python2.7/site-packages/ansible/modules/cloud/amazon/efs.pys ØstgeneralPurposetmaxIOs%Name parameter is required for createR0s2Either name or id parameter is required for deleteRuR$N(RtupdateRRfRNRkR RRgRRR*R+RR=tlowerRjR\RZR“RMRCR•Rt exit_json(RÁR)R%t_R-R(RORzREtxRJtperformance_mode_translationsRqRrRpR‰RsRtRvRuRŠ((RÆsD/usr/lib/python2.7/site-packages/ansible/modules/cloud/amazon/efs.pytmain´sp  ''' A   !  t__main__(-t __future__RRRRµt __metaclass__tANSIBLE_METADATAt DOCUMENTATIONtEXAMPLEStRETURNR RR¯Rmtbotocore.exceptionsR R t ImportErrorRwtansible.module_utils._textR tansible.module_utils.basicR tansible.module_utils.ec2RRRRRRRRRtobjectRR;R…RfR„RNRMR˜RiRÏR–(((sD/usr/lib/python2.7/site-packages/ansible/modules/cloud/amazon/efs.pyts8   X\ : ÿ}   H