??????????????
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@`sVddlmZmZmZeZdZddlZddl Z ddl Z ddl Z ddl j ZddlmZddlmZmZddlmZddlmZddlmZmZdd lmZeƒZd Zi d d 6d d6dd6dd6dd6dd6dd6dd6dd6dd6dd 6d!d"6Zd#efd$„ƒYZ dS(%i(tabsolute_importtdivisiontprint_functionsƒ author: - xuxinkun connection: kubectl short_description: Execute tasks in pods running on Kubernetes. description: - Use the kubectl exec command to run tasks in, or put/fetch files to, pods running on the Kubernetes container platform. version_added: "2.5" requirements: - kubectl (go binary) options: kubectl_pod: description: - Pod name. - Required when the host name does not match pod name. default: '' vars: - name: ansible_kubectl_pod env: - name: K8S_AUTH_POD kubectl_container: description: - Container name. - Required when a pod contains more than one container. default: '' vars: - name: ansible_kubectl_container env: - name: K8S_AUTH_CONTAINER kubectl_namespace: description: - The namespace of the pod default: '' vars: - name: ansible_kubectl_namespace env: - name: K8S_AUTH_NAMESPACE kubectl_extra_args: description: - Extra arguments to pass to the kubectl command line. - Please be aware that this passes information directly on the command line and it could expose sensitive data. default: '' vars: - name: ansible_kubectl_extra_args env: - name: K8S_AUTH_EXTRA_ARGS kubectl_kubeconfig: description: - Path to a kubectl config file. Defaults to I(~/.kube/config) default: '' vars: - name: ansible_kubectl_kubeconfig - name: ansible_kubectl_config env: - name: K8S_AUTH_KUBECONFIG kubectl_context: description: - The name of a context found in the K8s config file. default: '' vars: - name: ansible_kubectl_context env: - name: k8S_AUTH_CONTEXT kubectl_host: description: - URL for accessing the API. default: '' vars: - name: ansible_kubectl_host - name: ansible_kubectl_server env: - name: K8S_AUTH_HOST - name: K8S_AUTH_SERVER kubectl_username: description: - Provide a username for authenticating with the API. default: '' vars: - name: ansible_kubectl_username - name: ansible_kubectl_user env: - name: K8S_AUTH_USERNAME kubectl_password: description: - Provide a password for authenticating with the API. - Please be aware that this passes information directly on the command line and it could expose sensitive data. We recommend using the file based authentication options instead. default: '' vars: - name: ansible_kubectl_password env: - name: K8S_AUTH_PASSWORD kubectl_token: description: - API authentication bearer token. - Please be aware that this passes information directly on the command line and it could expose sensitive data. We recommend using the file based authentication options instead. vars: - name: ansible_kubectl_token - name: ansible_kubectl_api_key env: - name: K8S_AUTH_TOKEN - name: K8S_AUTH_API_KEY client_cert: description: - Path to a certificate used to authenticate with the API. default: '' vars: - name: ansible_kubectl_cert_file - name: ansible_kubectl_client_cert env: - name: K8S_AUTH_CERT_FILE aliases: [ kubectl_cert_file ] client_key: description: - Path to a key file used to authenticate with the API. default: '' vars: - name: ansible_kubectl_key_file - name: ansible_kubectl_client_key env: - name: K8S_AUTH_KEY_FILE aliases: [ kubectl_key_file ] ca_cert: description: - Path to a CA certificate used to authenticate with the API. default: '' vars: - name: ansible_kubectl_ssl_ca_cert - name: ansible_kubectl_ca_cert env: - name: K8S_AUTH_SSL_CA_CERT aliases: [ kubectl_ssl_ca_cert ] validate_certs: description: - Whether or not to verify the API server's SSL certificate. Defaults to I(true). default: '' vars: - name: ansible_kubectl_verify_ssl - name: ansible_kubectl_validate_certs env: - name: K8S_AUTH_VERIFY_SSL aliases: [ kubectl_verify_ssl ] N(t AnsibleLoader(t AnsibleErrortAnsibleFileNotFound(t shlex_quote(tto_bytes(tConnectionBasetBUFSIZE(tDisplaytkubectls-ctkubectl_containers-ntkubectl_namespaces --kubeconfigtkubectl_kubeconfigs --contexttkubectl_contexts--servert kubectl_hosts --usernametkubectl_usernames --passwordtkubectl_passwords--client-certificatet client_certs --client-keyt client_keys--certificate-authoritytca_certs--insecure-skip-tls-verifytvalidate_certss--tokent kubectl_tokent ConnectioncB`s}eZdZeZeZeZe Z d Z d„Z d„Zd d„Zd ed„Zd„Zd„Zd„Zd„ZRS( s! Local kubectl based connections cO`stt|ƒj||||Ždj|jƒ}||krM|||_n<tjj|jƒ|_|js‰t dj|jƒƒ‚ndS(Ns {0}_commands{0} command not found in PATH( tsuperRt__init__tformatt transportt transport_cmdt distutilstspawntfind_executableR(tselft play_contextt new_stdintargstkwargstcmd_arg((sF/usr/lib/python2.7/site-packages/ansible/plugins/connection/kubectl.pyRÚs  c C`s†|jg}|jg}t|jƒjƒ}x"|jdƒD]}|jdƒrÒ|j|ƒdkrÒ|j|ƒ }|jdj|j |t |ƒj ƒƒƒ|jdj|j |t |ƒj ƒƒƒq=|jdƒ r=|j|ƒr=|j j|ƒr=|j |}|||j|ƒg7}|jdƒrN||dg7}qNq=q=Wd j|j ƒ}|j|ƒr®||j|ƒj d ƒ7}||j|ƒj d ƒ7}n|jd j|j ƒƒ} | sÞ|jj} n|d d| g7}|d d| g7}dj|j ƒ} |j| ƒrZ|d|j| ƒg7}|d|j| ƒg7}n|dg|7}|dg|7}||fS(sH Build the local kubectl exec command to run cmd on remote_host toptionst verify_ssltu{0}={1}t containert_tokent _passwordt*iu{0}_extra_argst u{0}_podtexecs-iu {0}_containers-cs--(R+R,s********(RRt documentationtget_single_datatgettendswitht get_optiontappendRtconnection_optionststrtlowerRtsplitt _play_contextt remote_addr( R!tcmdt local_cmdtcensored_local_cmdtdoc_yamltkeytskip_verify_sslR&textra_args_nametpodtcontainer_arg_name((sF/usr/lib/python2.7/site-packages/ansible/plugins/connection/kubectl.pyt_build_exec_cmdçs:  $,/1 cC`sQtt|ƒjƒ|jsMtjdj|jƒd|jj ƒt |_ndS(s) Connect to the container. Nothing to do uESTABLISH {0} CONNECTIONthostN( RRt_connectt _connectedtdisplaytvvvRRR:R;tTrue(R!tport((sF/usr/lib/python2.7/site-packages/ansible/plugins/connection/kubectl.pyRGs %c C`sàtt|ƒj|d|d|ƒ|j|jjd|gƒ\}}tjd|fd|jjƒg|D]}t |ddƒ^qm}t j |dt d t j d t j d t j ƒ}|j|ƒ\}} |j|| fS( s Run a command in the container tin_datatsudoables-csEXEC %sRFterrorstsurrogate_or_stricttshelltstdintstdouttstderr(RRt exec_commandRER:t executableRIRJR;Rt subprocesstPopentFalsetPIPEt communicatet returncode( R!R<RMRNR=R>titpRSRT((sF/usr/lib/python2.7/site-packages/ansible/plugins/connection/kubectl.pyRUs"$ %cC`sC|jtjjƒs3tjjtjj|ƒ}ntjj|ƒS(s˜ Make sure that we put files into a standard path If a path is relative, then we need to choose where to put it. ssh chooses $HOME but we aren't guaranteed that a home dir will exist in any given chroot. So for now we're choosing "/" instead. This also happens to be the former default. Can revisit using $HOME instead if it's a problem (t startswithtostpathtseptjointnormpath(R!t remote_path((sF/usr/lib/python2.7/site-packages/ansible/plugins/connection/kubectl.pyt_prefix_login_path(s c C`s¸tt|ƒj||ƒtjd||fd|jjƒ|j|ƒ}tj j t |ddƒƒs|t d|ƒ‚nt |ƒ}tt |ddƒdƒ}tj|jƒƒjsÇd}nd}|j|jjd d |t|fgƒ\}}g|D]}t |ddƒ^q}y+tj|d |d tjd tjƒ}Wntk rmtdƒ‚nX|jƒ\} } |jdkr®td||| | fƒ‚nWdQXdS(s- Transfer a file from local to the container s PUT %s TO %sRFRORPs!file or module does not exist: %strbs count=0R)s-csdd of=%s bs=%s%sRRRSRTsDkubectl connection requires dd command in the container to put filesis'failed to transfer file %s to %s: %s %sN(RRtput_fileRIRJR:R;RfR`RatexistsRRRtopentfstattfilenotst_sizeRERVR RWRXRZtOSErrorRR[R\( R!tin_pathtout_pathtin_filetcountR$tdummyR]R^RSRT((sF/usr/lib/python2.7/site-packages/ansible/plugins/connection/kubectl.pyRh6s*#  1% c C`sÇtt|ƒj||ƒtjd||fd|jjƒ|j|ƒ}tj j |ƒ}|j |jj dd|t fgƒ\}}g|D]}t|ddƒ^q’}tj j|tj j|ƒƒ}tt|ddƒdƒž}y+tj|dtjd |d tjƒ} Wn)tk rEtd j|jƒƒ‚nX| jƒ\} } | jd kr†td ||| | fƒ‚nWdQX||krÃtjt|ddƒt|ddƒƒndS(s' Fetch a file from container to local. sFETCH %s TO %sRFs-csdd if=%s bs=%sRORPtwbRRRSRTsB{0} connection requires dd command in the container to fetch filesis$failed to fetch file %s to %s: %s %sNtstrict(RRt fetch_fileRIRJR:R;RfR`RatdirnameRERVR RRctbasenameRjRWRXRZRnRRRR[R\trename( R!RoRptout_dirR$RsR]tactual_out_pathtout_fileR^RSRT((sF/usr/lib/python2.7/site-packages/ansible/plugins/connection/kubectl.pyRvTs&#.%! % cC`s tt|ƒjƒt|_dS(s4 Terminate the connection. Nothing to do for kubectlN(RRtcloseRYRH(R!((sF/usr/lib/python2.7/site-packages/ansible/plugins/connection/kubectl.pyR}qsN(t__name__t __module__t__doc__tCONNECTION_TRANSPORTRtCONNECTION_OPTIONSR6t DOCUMENTATIONR0RKthas_pipeliningtNoneRRRERGRYRURfRhRvR}(((sF/usr/lib/python2.7/site-packages/ansible/plugins/connection/kubectl.pyRÑs ,    (!t __future__RRRttypet __metaclass__Rƒtdistutils.spawnRR`tos.pathRWtansible.constantst constantstCtansible.parsing.yaml.loaderRtansible.errorsRRtansible.module_utils.six.movesRtansible.module_utils._textRtansible.plugins.connectionRR tansible.utils.displayR RIRR‚R(((sF/usr/lib/python2.7/site-packages/ansible/plugins/connection/kubectl.pyts:˜