??????????????
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@`sddlmZmZmZeZdZddlZddlZddl Z ddl Z ddl Z ddl Z e ZyddlZeZWnek rŸnXddlmZddlmZddlmZmZddlmZdefd „ƒYZdS( i(tabsolute_importtdivisiontprint_functions© author: Joerg Thalheim connection: lxc short_description: Run tasks in lxc containers via lxc python library description: - Run commands or put/fetch files to an existing lxc container using lxc python library version_added: "2.0" options: remote_addr: description: - Container identifier default: inventory_hostname vars: - name: ansible_host - name: ansible_lxc_host executable: default: /bin/sh description: - Shell executable vars: - name: ansible_executable - name: ansible_lxc_executable N(t constants(terrors(tto_bytest to_native(tConnectionBaset ConnectioncB`sneZdZdZeZdZd„Zd„Zd„Z d„Z d e d„Z d„Zd „Zd „ZRS( s Local lxc based connections tlxctrootcO`s;tt|ƒj||||Ž|jj|_d|_dS(N(tsuperRt__init__t _play_contextt remote_addrtcontainer_nametNonet container(tselft play_contextt new_stdintargstkwargs((sB/usr/lib/python2.7/site-packages/ansible/plugins/connection/lxc.pyR ;scC`s›tt|ƒjƒts1d}tj|ƒ‚n|jr>dS|jjdd|j ƒt j |j ƒ|_|jj dkr—tjd|j ƒ‚ndS(s( connect to the lxc; nothing to do here s*lxc bindings for python2 are not installedNsTHIS IS A LOCAL LXC DIRthosttSTOPPEDs%s is not running( R Rt_connectt HAS_LIBLXCRt AnsibleErrorRt_displaytvvvRt_lxct Containertstate(Rtmsg((sB/usr/lib/python2.7/site-packages/ansible/plugins/connection/lxc.pyRAs cC`sig|6g|6}||g}|r2|g}ng}xt|ƒdks_t|ƒdkrOy"tj||gƒ\} } } Wn5tjk r¸} | jdtjkr²q;n‚nXxF| D]>} |tj| |ƒ}t|ƒdkrÀ|j| ƒqÀqÀWxG| D]?} tj | dƒ}|s7|j| ƒn|| j |ƒq Wq;Wtj |dƒ\}}|dj ||ƒdj ||ƒfS(Nii€t( tlentselectterrorRterrnotEINTRtostwritetremovetreadtappendtwaitpidtjoin(Rtpidtin_datatstdintstdouttstderrtbuftread_fdst write_fdst ready_readst ready_writest_tetfdtdatat returncode((sB/usr/lib/python2.7/site-packages/ansible/plugins/connection/lxc.pyt _communicateQs.  '"  cC`s6tj|tjƒtjB}tj|tj|ƒ|S(N(tfcntltF_GETFLR(t O_NONBLOCKtF_SETFL(RR;tflags((sB/usr/lib/python2.7/site-packages/ansible/plugins/connection/lxc.pyt_set_nonblockingmsc C`søtt|ƒj|d|d|ƒt|jjddƒ}|dt|ddƒg}d\}}d\}} d\} } z8tjƒ\}}tjƒ\}} i|j |ƒd6|j | ƒd6t j d6} |rþtjƒ\} } |j | ƒ| d (RtcmdR0RERIt local_cmdt read_stdoutt write_stdoutt read_stderrt write_stderrt read_stdint write_stdinRR/R!tfdsR;((sB/usr/lib/python2.7/site-packages/ansible/plugins/connection/lxc.pyRHrsN"          c`sHtt|ƒj|ˆƒ|jjd|ˆfd|jƒt|ddƒ}tˆddƒ‰tjj |ƒsŽd|}t j |ƒ‚nyt |dƒ‰Wn.t k rÑtjƒt jd|ƒ‚nXzd‡‡fd†}y|jj|d ƒWn4t k r4tjƒd ˆ}t j|ƒ‚nXWd ˆjƒXd S( s# transfer a file from local to lxc s PUT %s TO %sRRRFs!file or module does not exist: %strbsfailed to open input file to %sc`s,tˆdƒ}tjˆ|ƒWdQXdS(Nswb+(topentshutilt copyfileobj(Rtdst_file(tout_pathtsrc_file(sB/usr/lib/python2.7/site-packages/ansible/plugins/connection/lxc.pyt write_file·ssfailed to transfer file to %sN(R Rtput_fileRRRRR(tpathtexistsRtAnsibleFileNotFoundRYtIOErrort tracebackt print_excRRt attach_waitRRN(Rtin_pathR]R!R_((R]R^sB/usr/lib/python2.7/site-packages/ansible/plugins/connection/lxc.pyR`§s*#      c`s&tt|ƒjˆ|ƒ|jjdˆ|fd|jƒtˆddƒ‰t|ddƒ}yt|dƒ‰Wn4tk r©t j ƒd|}t j |ƒ‚nXzj‡‡fd†}y|j j|d ƒWn:tk rt j ƒdˆ|f}t j |ƒ‚nXWd ˆjƒXd S( s fetch a file from lxc to local sFETCH %s TO %sRRRFtwbsfailed to open output file %sc`s>z,tˆdƒ}tj|ˆƒWdQXWdˆjƒXdS(NRX(RYRZR[RN(RR^(R\Rh(sB/usr/lib/python2.7/site-packages/ansible/plugins/connection/lxc.pyR_Ñss%failed to transfer file from %s to %sN(R Rt fetch_fileRRRRRYRdReRfRRRRgRRN(RRhR]R!R_((R\RhsB/usr/lib/python2.7/site-packages/ansible/plugins/connection/lxc.pyRjÃs&#     cC`s tt|ƒjƒt|_dS(s. terminate the connection; nothing to do here N(R RRNtFalset _connected(R((sB/usr/lib/python2.7/site-packages/ansible/plugins/connection/lxc.pyRNâsN(t__name__t __module__t__doc__t transporttTruethas_pipeliningt default_userR RR>RDRRkRHR`RjRN(((sB/usr/lib/python2.7/site-packages/ansible/plugins/connection/lxc.pyR4s    5  (t __future__RRRttypet __metaclass__t DOCUMENTATIONR(RZReR$R?R&RkRR RRqt ImportErrortansibleRtCRtansible.module_utils._textRRtansible.plugins.connectionRR(((sB/usr/lib/python2.7/site-packages/ansible/plugins/connection/lxc.pyts&