�
�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
m Z d d l m Z d d l m Z d d l m Z d d l m Z m Z d d l m Z e � Z d
e f d � � YZ d S( i ( t absolute_importt divisiont print_functions�
author: Michael Scherer <[email protected]>
connection: libvirt_lxc
short_description: Run tasks in lxc containers via libvirt
description:
- Run commands or put/fetch files to an existing lxc container using libvirt
version_added: "2.0"
options:
remote_addr:
description:
- Container identifier
default: The set user as per docker's configuration
vars:
- name: ansible_host
- name: ansible_libvirt_lxc_host
N( t constants( t AnsibleError( t shlex_quote( t to_bytes( t ConnectionBaset BUFSIZE( t Displayt
Connectionc B` s� e Z d Z d Z e Z d Z e Z d � Z d � Z
d � Z d � Z e
j d � Z d
e d � Z d � Z d
� Z d � Z d � Z RS( s Local lxc based connections t libvirt_lxct rootc O` sT t t | � j | | | | � | j j | _ | j d � | _ | j | j � d S( Nt virsh( t superR
t __init__t
_play_contextt remote_addrt lxct _search_executableR
t
_check_domain( t selft play_contextt new_stdint argst kwargs( ( sJ /usr/lib/python2.7/site-packages/ansible/plugins/connection/libvirt_lxc.pyR 7 s c C` s/ t j j | � } | s+ t d � | � n | S( Ns %s command not found in PATH( t distutilst spawnt find_executableR ( R t
executablet cmd( ( sJ /usr/lib/python2.7/site-packages/ansible/plugins/connection/libvirt_lxc.pyR ? s c C` sf t j | j d d d d t | � g d t j d t j �} | j � | j rb t d | � � n d S( Ns -qs -cs lxc:///t dominfot stdoutt stderrs"