??????????????
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 d d l m Z m Z m Z e Z d Z d d l Z d d l Z d d l Z d d l
Z
d d l Z d d l Z e
Z y d d l Z e Z Wn e k
rŸ n Xd d l m Z d d l m Z d d l m Z m Z d d l m Z d e f d „ ƒ YZ d S(
i ( t absolute_importt divisiont print_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( t errors( t to_bytest to_native( t ConnectionBaset
Connectionc B` sn e Z d Z d Z e Z d Z d „ Z d „ Z d „ Z d „ Z
d e d „ Z
d „ Z d „ Z d
„ Z RS( s Local lxc based connections t lxct rootc O` s; t t | ƒ j | | | | Ž | j j | _ d | _ d S( N( t superR t __init__t
_play_contextt remote_addrt container_namet Nonet container( t selft play_contextt new_stdint argst kwargs( ( sB /usr/lib/python2.7/site-packages/ansible/plugins/connection/lxc.pyR ; s c C` s› t t | ƒ j ƒ t s1 d } t j | ƒ ‚ n | j r> d S| j j d d | j ƒt
j | j ƒ | _ | j j d k r— t j d | j ƒ ‚ n d S( s( connect to the lxc; nothing to do here s* lxc bindings for python2 are not installedNs THIS IS A LOCAL LXC DIRt hostt STOPPEDs %s is not running(
R R t _connectt
HAS_LIBLXCR t AnsibleErrorR t _displayt vvvR t _lxct Containert state( R t msg( ( sB /usr/lib/python2.7/site-packages/ansible/plugins/connection/lxc.pyR A s c C` s i g | 6g | 6} | | g } | r2 | g } n g } xt | ƒ d k s_ t | ƒ d k rOy" t j | | g ƒ \ } }
} Wn5 t j k
r¸ } | j d t j k r² q; n ‚ n XxF |
D]> }
| t j |
| ƒ } t | ƒ d k rÀ | j |
ƒ qÀ qÀ WxG | D]? }
t j |
d ƒ } | s7| j |
ƒ n | |
j
| ƒ q Wq; Wt j | d ƒ \ } } | d j | | ƒ d j | | ƒ f S( Ni i € t (
t lent selectt errorR t errnot EINTRt ost writet removet readt appendt waitpidt join( R t pidt in_datat stdint stdoutt stderrt buft read_fdst write_fdst ready_readst ready_writest _t et fdt datat
returncode( ( sB /usr/lib/python2.7/site-packages/ansible/plugins/connection/lxc.pyt _communicateQ s. '"
c C` s6 t j | t j ƒ t j B} t j | t j | ƒ | S( N( t fcntlt F_GETFLR( t
O_NONBLOCKt F_SETFL( R R; t flags( ( sB /usr/lib/python2.7/site-packages/ansible/plugins/connection/lxc.pyt _set_nonblockingm s c C` sø t t | ƒ j | d | d | ƒt | j j d d ƒ} | d t | d d ƒg } d \ } } d \ } } d \ }
} z8t j ƒ \ } } t j ƒ \ } } i | j | ƒ d 6| j | ƒ d 6t
j d 6} | rþ t j ƒ \ }
} | j |
ƒ | d