??????????????
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
j Z d d l
m Z 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_functionsa
connection: buildah
short_description: Interact with an existing buildah container
description:
- Run commands or put/fetch files to an existing container using buildah tool.
author: Tomas Tomecek (ttomecek@redhat.com)
version_added: 2.4
options:
remote_addr:
description:
- The ID of the container you want to access.
default: inventory_hostname
vars:
- name: ansible_host
# keyword:
# - name: hosts
remote_user:
description:
- User specified via name or ID which is used to execute commands inside the container.
ini:
- section: defaults
key: remote_user
env:
- name: ANSIBLE_REMOTE_USER
vars:
- name: ansible_user
# keyword:
# - name: remote_user
N( t to_bytest to_native( t ConnectionBaset ensure_connect( t Displayt
Connectionc B` st e Z d Z d Z e Z d „ Z d „ Z d
d
d „ Z d „ Z
e d
e d „ ƒ Z
d „ Z d „ Z d „ Z RS( si
This is a connection plugin for buildah: it uses buildah binary to interact with the containers
t buildahc O` sS t t | ƒ j | | | | Ž | j j | _ t | _ d | _ | j j
| _ d S( N( t superR t __init__t
_play_contextt remote_addrt
_container_idt Falset
_connectedt Nonet _mount_pointt remote_usert user( t selft play_contextt new_stdint argst kwargs( ( sF /usr/lib/python2.7/site-packages/ansible/plugins/connection/buildah.pyR C s
c C` s* | j d d t | j d d ƒg ƒ d S( Nt configs --user=t errorst surrogate_or_strict( t _buildahR R ( R ( ( sF /usr/lib/python2.7/site-packages/ansible/plugins/connection/buildah.pyt _set_userN s c
C` sæ d | d | j g } | r( | | 7} n g | D] } t | d d ƒ^ q/ } t j d | f d | j ƒt j | d t d t j d t j d
t j ƒ} | j d | ƒ \ } } t | d d ƒ} t | d d ƒ} | j | | f S( s
run buildah executable
:param cmd: buildah's command to execute (str)
:param cmd_args: list of arguments to pass to the command (list of str/bytes)
:param in_data: data passed to buildah's stdin
:return: return code, stdout, stderr
R s --R R s RUN %st hostt shellt stdint stdoutt stderrt input(
R R t displayt vvvt
subprocesst PopenR t PIPEt communicatet
returncode( R t cmdt cmd_argst in_datat local_cmdt it pR" R# ( ( sF /usr/lib/python2.7/site-packages/ansible/plugins/connection/buildah.pyR Q s
%c C` sj t t | ƒ j ƒ | j d ƒ \ } | _ } | j j ƒ | _ t j d | j | | f ƒ t | _ d S( s
no persistent connection is being maintained, mount container's filesystem
so we can easily access it
t mounts MOUNTPOINT %s RC %s STDERR %rN(
R
R t _connectR R t stripR% t vvvvvt TrueR ( R t rcR# ( ( sF /usr/lib/python2.7/site-packages/ansible/plugins/connection/buildah.pyR3 h s
c C` s t t | ƒ j | d | d | ƒt j t | d d ƒƒ } | j d | | ƒ \ } } } t j d | | f ƒ | | | f S( s@ run specified command in a running OCI container using buildah R. t sudoableR R t runs STDOUT %r STDERR %r( R
R t exec_commandt shlext splitR R R% R5 ( R R, R. R8 t
cmd_args_listR7 R" R# ( ( sF /usr/lib/python2.7/site-packages/ansible/plugins/connection/buildah.pyR: s s
"c C` s~ t t | ƒ j | | ƒ t j d | | f d | j ƒ| j t | d d ƒ} t j t | d d ƒt | d d ƒƒ d S( sH Place a local file located in 'in_path' inside container at 'out_path' s PUT %s TO %sR R R N(
R
R t put_fileR% R&