??????????????
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@sidd6dgd6dd6ZdZdZdZd d lZd d lZd d lmZd d lm Z d d l m Z m Z d dl mZd dlmZmZd dlmZmZyd d lZWnek rnXddgZdefdYZeedZedZedZedZedZ dZ!dZ"dZ#dZ$dZ%dZ&d Z'd!Z(ed"Z)eed#Z*ed$Z+d%Z,e-d&Z.d'Z/e0d(kre/nd S()s1.1tmetadata_versiontstableinterfacetstatustcoret supported_bys --- module: aws_s3 short_description: manage objects in S3. description: - This module allows the user to manage S3 buckets and the objects within them. Includes support for creating and deleting both objects and buckets, retrieving objects as files or strings and generating download links. This module has a dependency on boto3 and botocore. notes: - In 2.4, this module has been renamed from C(s3) into M(aws_s3). version_added: "1.1" options: aws_access_key: description: - AWS access key id. If not set then the value of the AWS_ACCESS_KEY environment variable is used. aliases: [ 'ec2_access_key', 'access_key' ] aws_secret_key: description: - AWS secret key. If not set then the value of the AWS_SECRET_KEY environment variable is used. aliases: ['ec2_secret_key', 'secret_key'] bucket: description: - Bucket name. required: true dest: description: - The destination file path when downloading an object/key with a GET operation. version_added: "1.3" encrypt: description: - When set for PUT mode, asks for server-side encryption. default: True version_added: "2.0" type: bool encryption_mode: description: - What encryption mode to use if C(encrypt) is set default: AES256 choices: - AES256 - aws:kms version_added: "2.7" expiration: description: - Time limit (in seconds) for the URL generated and returned by S3/Walrus when performing a mode=put or mode=geturl operation. default: 600 headers: description: - Custom headers for PUT operation, as a dictionary of 'key=value' and 'key=value,key=value'. version_added: "2.0" marker: description: - Specifies the key to start with when using list mode. Object keys are returned in alphabetical order, starting with key after the marker in order. version_added: "2.0" max_keys: description: - Max number of results to return in list mode, set this if you want to retrieve fewer than the default 1000 keys. default: 1000 version_added: "2.0" metadata: description: - Metadata for PUT operation, as a dictionary of 'key=value' and 'key=value,key=value'. version_added: "1.6" mode: description: - Switches the module behaviour between put (upload), get (download), geturl (return download url, Ansible 1.3+), getstr (download object as string (1.3+)), list (list keys, Ansible 2.0+), create (bucket), delete (bucket), and delobj (delete object, Ansible 2.0+). required: true choices: ['get', 'put', 'delete', 'create', 'geturl', 'getstr', 'delobj', 'list'] object: description: - Keyname of the object inside the bucket. Can be used to create "virtual directories", see examples. permission: description: - This option lets the user set the canned permissions on the object/bucket that are created. The permissions that can be set are 'private', 'public-read', 'public-read-write', 'authenticated-read' for a bucket or 'private', 'public-read', 'public-read-write', 'aws-exec-read', 'authenticated-read', 'bucket-owner-read', 'bucket-owner-full-control' for an object. Multiple permissions can be specified as a list. default: private version_added: "2.0" prefix: description: - Limits the response to keys that begin with the specified prefix for list mode default: "" version_added: "2.0" version: description: - Version ID of the object inside the bucket. Can be used to get a specific version of a file if versioning is enabled in the target bucket. version_added: "2.0" overwrite: description: - Force overwrite either locally on the filesystem or remotely with the object/key. Used with PUT and GET operations. Boolean or one of [always, never, different], true is equal to 'always' and false is equal to 'never', new in 2.0. When this is set to 'different', the md5 sum of the local file is compared with the 'ETag' of the object/key in S3. The ETag may or may not be an MD5 digest of the object data. See the ETag response header here U(https://docs.aws.amazon.com/AmazonS3/latest/API/RESTCommonResponseHeaders.html) default: 'always' aliases: ['force'] version_added: "1.2" region: description: - "AWS region to create the bucket in. If not set then the value of the AWS_REGION and EC2_REGION environment variables are checked, followed by the aws_region and ec2_region settings in the Boto config file. If none of those are set the region defaults to the S3 Location: US Standard. Prior to ansible 1.8 this parameter could be specified but had no effect." version_added: "1.8" retries: description: - On recoverable failure, how many times to retry before actually failing. default: 0 version_added: "2.0" s3_url: description: - S3 URL endpoint for usage with Ceph, Eucalyptus and fakes3 etc. Otherwise assumes AWS. aliases: [ S3_URL ] dualstack: description: - Enables Amazon S3 Dual-Stack Endpoints, allowing S3 communications using both IPv4 and IPv6. - Requires at least botocore version 1.4.45. type: bool default: "no" version_added: "2.7" rgw: description: - Enable Ceph RGW S3 support. This option requires an explicit url via s3_url. default: false version_added: "2.2" type: bool src: description: - The source file path when performing a PUT operation. version_added: "1.3" ignore_nonexistent_bucket: description: - "Overrides initial bucket lookups in case bucket or iam policies are restrictive. Example: a user may have the GetObject permission but no other permissions. In this case using the option mode: get will fail without specifying ignore_nonexistent_bucket: True." version_added: "2.3" type: bool encryption_kms_key_id: description: - KMS key id to use when encrypting objects using C(aws:kms) encryption. Ignored if encryption is not C(aws:kms) version_added: "2.7" requirements: [ "boto3", "botocore" ] author: - "Lester Wade (@lwade)" - "Sloane Hertel (@s-hertel)" extends_documentation_fragment: - aws - ec2 s - name: Simple PUT operation aws_s3: bucket: mybucket object: /my/desired/key.txt src: /usr/local/myfile.txt mode: put - name: Simple PUT operation in Ceph RGW S3 aws_s3: bucket: mybucket object: /my/desired/key.txt src: /usr/local/myfile.txt mode: put rgw: true s3_url: "http://localhost:8000" - name: Simple GET operation aws_s3: bucket: mybucket object: /my/desired/key.txt dest: /usr/local/myfile.txt mode: get - name: Get a specific version of an object. aws_s3: bucket: mybucket object: /my/desired/key.txt version: 48c9ee5131af7a716edc22df9772aa6f dest: /usr/local/myfile.txt mode: get - name: PUT/upload with metadata aws_s3: bucket: mybucket object: /my/desired/key.txt src: /usr/local/myfile.txt mode: put metadata: 'Content-Encoding=gzip,Cache-Control=no-cache' - name: PUT/upload with custom headers aws_s3: bucket: mybucket object: /my/desired/key.txt src: /usr/local/myfile.txt mode: put headers: 'x-amz-grant-full-control=emailAddress=owner@example.com' - name: List keys simple aws_s3: bucket: mybucket mode: list - name: List keys all options aws_s3: bucket: mybucket mode: list prefix: /my/desired/ marker: /my/desired/0023.txt max_keys: 472 - name: Create an empty bucket aws_s3: bucket: mybucket mode: create permission: public-read - name: Create a bucket with key as directory, in the EU region aws_s3: bucket: mybucket object: /my/directory/path mode: create region: eu-west-1 - name: Delete a bucket and all contents aws_s3: bucket: mybucket mode: delete - name: GET an object but don't download if the file checksums match. New in 2.0 aws_s3: bucket: mybucket object: /my/desired/key.txt dest: /usr/local/myfile.txt mode: get overwrite: different - name: Delete an object from a bucket aws_s3: bucket: mybucket object: /my/desired/key.txt mode: delobj s msg: description: msg indicating the status of the operation returned: always type: str sample: PUT operation complete url: description: url of the object returned: (for put and geturl operations) type: str sample: https://my-bucket.s3.amazonaws.com/my-key.txt?AWSAccessKeyId=&Expires=1506888865&Signature= expiry: description: number of seconds the presigned url is valid for returned: (for geturl operation) type: int sample: 600 contents: description: contents of the object as string returned: (for getstr operation) type: str sample: "Hello, world!" s3_keys: description: list of object keys returned: (for list operation) type: list sample: - prefix1/ - prefix1/key1 - prefix1/key2 iN(turlparse(tSSLError(tto_textt to_native(tAnsibleAWSModule(tcalculate_etagtHAS_MD5(tget_aws_connection_infot boto3_conntXNotImplementedtNotImplementedt Sigv4RequiredcBseZRS((t__name__t __module__(((sG/usr/lib/python2.7/site-packages/ansible/modules/cloud/amazon/aws_s3.pyR=sc Cst}y?|r.|jd|d|d|n|jd|d|Wntjjk r}t|jdd}|dkrt}q|dkr|tkrq|j|dd |n0tjj k r}|j|dd |nX|S( NtBuckettKeyt VersionIdtErrortCodeiitmsgs5Failed while looking up object (during key check) %s.( tTruet head_objecttbotocoret exceptionst ClientErrortinttresponsetFalset fail_json_awst BotoCoreError( tmodulets3tbuckettobjtversiontvalidatetexiststet error_code((sG/usr/lib/python2.7/site-packages/ansible/modules/cloud/amazon/aws_s3.pyt key_checkAs  cCs@t|||d|}t|||||||}||kS(NR'(tget_etagR (R#t local_fileR$R%R&R'ts3_etagt local_etag((sG/usr/lib/python2.7/site-packages/ansible/modules/cloud/amazon/aws_s3.pyt etag_compareWscCsQ|r'|jd|d|d|}n|jd|d|}|sIdS|dS(NRRRtETag(RtNone(R$R%R&R'R,((sG/usr/lib/python2.7/site-packages/ansible/modules/cloud/amazon/aws_s3.pyR-^s !cCst}y|jd|Wntjjk r}t|jdd}|dkr^t}q|dkry|tkryq|j|dd|n[tjj k r}|j|ddn0tjj k r}|j|dd|nX|S( NRRRiiRs8Failed while looking up bucket (during bucket_check) %s.sInvalid endpoint provided( Rt head_bucketRRRRRR R!tEndpointConnectionErrorR"(R#R$R%R(R)R*R+((sG/usr/lib/python2.7/site-packages/ansible/modules/cloud/amazon/aws_s3.pyt bucket_checkhs  cCsp|jr"|jdddtni}|dkrA||dRRRR"R!tformat( R#R$R%tprefixtmarkertmax_keysROt param_namet param_valuetkeysR*((sG/usr/lib/python2.7/site-packages/ansible/modules/cloud/amazon/aws_s3.pyt list_keyss .!cCs|jr"|jdddtnyt|||}|tkrGtSx`t|d|D]L}g|D]}i|d6^qg}|rZ|jd|di|d6qZqZW|jd|tSWn<tj j tj j fk r}|j |dd|nXdS( NRs0DELETE operation skipped - running in check modeR7RRtDeletetObjectss Failed while deleting bucket %s.( R=R>RR6R RStdelete_objectst delete_bucketRRRR"R!(R#R$R%R)R_tkeytformatted_keysR*((sG/usr/lib/python2.7/site-packages/ansible/modules/cloud/amazon/aws_s3.pyRds   $!cCs|jr"|jdddtny4|jd|d||jdd|dtWn<tjjtjjfk r}|j|dd|nXdS(NRs0DELETE operation skipped - running in check modeR7RRsObject deleted from bucket %s.s!Failed while trying to delete %s.( R=R>Rt delete_objectRRRR"R!(R#R$R%R&R*((sG/usr/lib/python2.7/site-packages/ansible/modules/cloud/amazon/aws_s3.pyt delete_keys !c Cs|jr"|jdddtnyi|d6|d6dd6}|rZ|jd|d RRAt put_objectRBtput_object_aclRRRRRFRGR!R"(R#R$R%R&tencryptRARJR*((sG/usr/lib/python2.7/site-packages/ansible/modules/cloud/amazon/aws_s3.pyt create_dirkeys$   $cCstjj|rtStSdS(N(tostpathR)RR (Rt((sG/usr/lib/python2.7/site-packages/ansible/modules/cloud/amazon/aws_s3.pyt path_checkscCs|jddj}idd6dd6dd6d d 6d d 6d d6dd6dd6dd6dd6dd6dd6dd6dd6dd 6d!d"6d#d$6d%d&6d'd(6d)d*6}||kr||SdS(+Nt-RiR<RJt CacheControlt cachecontroltContentDispositiontcontentdispositiontContentEncodingtcontentencodingtContentLanguagetcontentlanguaget ContentTypet contenttypetExpirestexpirestGrantFullControltgrantfullcontrolt GrantReadt grantreadt GrantReadACPt grantreadacpt GrantWriteACPt grantwriteacptMetadatatmetadatat RequestPayert requestpayerRltserversideencryptiont StorageClasst storageclasstSSECustomerAlgorithmtssecustomeralgorithmtSSECustomerKeytssecustomerkeytSSECustomerKeyMD5tssecustomerkeymd5Rnt ssekmskeyidtWebsiteRedirectLocationtwebsiteredirectlocation(treplacetlower(toptiont temp_optiontallowed_extra_args((sG/usr/lib/python2.7/site-packages/ansible/modules/cloud/amazon/aws_s3.pytoption_in_extra_argss c  Cs|jr"|jdddtnyi} |rE|jd| dRRARR3t mimetypest guess_typet upload_fileRRRR"R!RBRpRRFRGtgenerate_presigned_url(R#R$R%R&tsrctexpiryRRqtheaderstextraRtextra_args_optiont content_typeR*RJR((sG/usr/lib/python2.7/site-packages/ansible/modules/cloud/amazon/aws_s3.pyt upload_s3filesN          &!$ !c Cs |jr"|jdddtnyC|rL|jd|d|d|}n|jd|d|}Wntjjk r}|jddd krd t|krt q|jdddkr|j |dd |qn0tjj k r}|j |dd |nX|r0ii|d6d6ni} xt d|dD]} y0|j |||| |jdddtWqJtjjtjj fk r}| |kr|j |dd|qqJtk r}| |kr|j |ddqqJXqJWdS(NRs-GET operation skipped - running in check modeR7RRRRRtInvalidArgumentsrequire AWS Signature Version 4t403t404sCould not find the key %s.RiisGET operation completesFailed while downloading %s.ss3 download failed(RR(R=R>Rt get_objectRRRRRRR!R"tranget download_fileR( R#R$R%R&tdesttretriesR'ReR*toptional_kwargstx((sG/usr/lib/python2.7/site-packages/ansible/modules/cloud/amazon/aws_s3.pytdownload_s3file$s0 !)  !  cCs<|jr"|jdddtny|r\t|jd|d|d|dj}n(t|jd|d|dj}|jddd |dtWntjjk r}|j d d d krd t |krt q8|j |dd|n0tjj k r7}|j |dd|nXdS(NRs-GET operation skipped - running in check modeR7RRRRjsGET operation completetcontentsRRRsrequire AWS Signature Version 4s7Failed while getting contents of object %s as a string.(R=R>RRRtreadRRRRRRR!R"(R#R$R%R&R'R(RR*((sG/usr/lib/python2.7/site-packages/ansible/modules/cloud/amazon/aws_s3.pytdownload_s3strIs 1( ) c CsyR|jdddi|d6|d6d|}|jddd |d |d |Wn8tjjtjjfk r}|j|dd nXdS( NRRRRRRRs Download url:RRR7s"Failed while getting download url.(RR>RRRR"R!(R#R$R%R&RR7RR*((sG/usr/lib/python2.7/site-packages/ansible/modules/cloud/amazon/aws_s3.pytget_download_url[s &!cCs'|dk rt|jdkStSdS(s, Return True if s3_url has scheme fakes3:// tfakes3tfakes3sN(sfakes3R(R3RtschemeR (ts3_url((sG/usr/lib/python2.7/site-packages/ansible/modules/cloud/amazon/aws_s3.pyt is_fakes3es c Cs|rT|rTt|}td|ddddd|jdkd|d ||}nt|rt|}|j}|jd krd} |dkrd }qnd } |dkrd }ntd|ddddd|d d| |jt|fd|jd k|}ntd|ddddd|d ||}|jddkr{|jddkr{t j j dd|d} n| d?krt r|j d@dAnt |dBt\}}}|ddkr(dC}n|}|jjd"rl|jd"} | j dDrl| dE} qln| r| dkr|j d@dFn| rd.t j krt j d.}n|r|dk rdG|kr|j d@dHn|r|jdI r|j d@dJn|r1| r1|j d@dKn|rdx*dLdMdNgD]}|j|dqGWnt|||||}| }g|jjd#D]}||kr|^q}g|jjd#D]}||kr|^q} g|jjd#D]$}||kr||kr|^q}!|!r?|j d@dO|!nt|||dP|}"|r| dekr|" r|j d@dQn| dkrt|||| d%| dP|}#|#tkr| r|j d@dR| | fq|j d@dS| nt|rm| d(krm| d>kr3|jd@dTdUtnt||||| d%| rm|jd@dVdUtqmny#t|||| ||d%| Wqtk rt|||||dWt}t|||| ||d%| qXn| dkrt|s|j d@dXn|"r9t|||| d%| dP|}#n ||jd#kst||||| rt|||| |dUtqn| |jd#= 1.4.45srgw flavour requires s3_urltvalidate_certstsecurity_tokent profile_names Unknown permission specified: %sR(sSource bucket cannot be found.s)Key %s with version id %s does not exist.sKey %s does not exist.s6Local object already exists and overwrite is disabled.R7sYLocal and remote object are identical, ignoring. Use overwrite=always parameter to force.Rs#Local object for PUT does not existsobject parameter is requiredsObject deleted from bucket %s.sBucket parameter is required.s)Bucket %s and all keys have been deleted.s"Target bucket (%s) cannot be foundsBucket already exists.sBucket created successfullys$Bucket %s and key %s already exists.s(Bucket and Object parameters must be settfailed(salwaysRR(s us-east-1RiN(RsputR(!RRR3R R RARBtbooleanR t fail_jsonR t startswithRstenvirontbotocore_at_leasttpopRR6R,RuR>R1RRR@RRRhRdR`tendswithRrR((RR#R%RqRRRR[R\RRR&R'RRZRRRRRRtobject_canned_acltbucket_canned_aclRtec2_urlRRHReR$R(RJt bucket_aclt object_aclt error_aclt bucketrtntkeyrtnt deletertnR)tdirobjtcreated((sG/usr/lib/python2.7/site-packages/ansible/modules/cloud/amazon/aws_s3.pytmains\-          11= !  # &  $ $" %           (   #    !  !   t__main__(1tANSIBLE_METADATAt DOCUMENTATIONtEXAMPLEStRETURNRRst+ansible.module_utils.six.moves.urllib.parseRtsslRtansible.module_utils.basicRRtansible.module_utils.aws.coreR tansible.module_utils.aws.s3R R tansible.module_utils.ec2R R Rt ImportErrorRFt ExceptionRR3RR,R1R-R6R@RSR`RdRhRrRuRRRRRRR RRR(((sG/usr/lib/python2.7/site-packages/ansible/modules/cloud/amazon/aws_s3.pytsR   ^             1 %  !