Anons79 Mini Shell

Directory : /lib/python2.7/site-packages/ansible/modules/files/
Upload File :
Current File : //lib/python2.7/site-packages/ansible/modules/files/iso_extract.pyo

�
�Udac@`s�ddlmZmZmZeZidd6dgd6dd6ZdZd	Zd
Z	ddl
ZddlZddl
Z
yddlmZWn!ek
r�ddlmZnXdd
lmZd�Zedkr�e�ndS(i(tabsolute_importtdivisiontprint_functions1.1tmetadata_versiontpreviewtstatust	communitytsupported_bys�
---
author:
- Jeroen Hoekx (@jhoekx)
- Matt Robinson (@ribbons)
- Dag Wieers (@dagwieers)
module: iso_extract
short_description: Extract files from an ISO image
description:
- This module has two possible ways of operation.
- If 7zip is installed on the system, this module extracts files from an ISO
  into a temporary directory and copies files to a given destination,
  if needed.
- If the user has mount-capabilities (CAP_SYS_ADMIN on Linux) this module
  mounts the ISO image to a temporary location, and copies files to a given
  destination, if needed.
version_added: '2.3'
requirements:
- Either 7z (from I(7zip) or I(p7zip) package)
- Or mount capabilities (root-access, or CAP_SYS_ADMIN capability on Linux)
options:
  image:
    description:
    - The ISO image to extract files from.
    type: path
    required: yes
    aliases: [ path, src ]
  dest:
    description:
    - The destination directory to extract files to.
    type: path
    required: yes
  files:
    description:
    - A list of files to extract from the image.
    - Extracting directories does not work.
    type: list
    required: yes
  force:
    description:
    - If C(yes), which will replace the remote file when contents are different than the source.
    - If C(no), the file will only be extracted and copied if the destination does not already exist.
    - Alias C(thirsty) has been deprecated and will be removed in 2.13.
    type: bool
    default: yes
    aliases: [ thirsty ]
    version_added: '2.4'
  executable:
    description:
    - The path to the C(7z) executable to use for extracting files from the ISO.
    type: path
    default: '7z'
    version_added: '2.4'
notes:
- Only the file checksum (content) is taken into account when extracting files
  from the ISO image. If C(force=no), only checks the presence of the file.
- In Ansible 2.3 this module was using C(mount) and C(umount) commands only,
  requiring root access. This is no longer needed with the introduction of 7zip
  for extraction.
s�
- name: Extract kernel and ramdisk from a LiveCD
  iso_extract:
    image: /tmp/rear-test.iso
    dest: /tmp/virt-rear/
    files:
    - isolinux/kernel
    - isolinux/initrd.cgz
s
#
N(tquote(t
AnsibleModulecC`s�tdtdtdddtdddg�dtdddt�d	tdd
dt�dtddd
tddg�dtdd��dt�}|jd}|jd}|jd	}|jd}|jd}|jjd�r�|jddd�ntdtd|d|�}|dkr)d}n|j|d�}|jddk	ri|ri|j	d|�nt
jj|�s�|j
dd|�nt
jjt
jj|��s�|j
dd|�ng|d	<t|�}|s`xz|D]o}	t
jj|t
jj|	��}
t
jj|
�r�|d	jtddd|
d|	��|j|	�q�q�Wn|sv|j|�ntj�}|r�d|||djg|D]}	t|	�^q��f}nd||f}|j|�\}
}}|
dkru|jtd|d |
d!|d"|��tj|�|rR|j
dd#||f|�qu|j
dd$|||f|�nzx|D]�}	t
jj||	�}t
jj|�s�|j
dd%|	|�n|j|�}t
jj|t
jj|	��}
t
jj|
�r|j|
�}nd}|d	jtd|d|
d|	��||kr|jsntj||
�nt|d<qqWWd|s�|jd&|�ntj|�X|j|�dS('Nt
argument_spectimagettypetpathtrequiredtaliasestsrctdesttfilestlisttforcetbooltdefaulttthirstyt
executabletsupports_check_modesPThe alias "thirsty" has been deprecated and will be removed, use "force" insteadtversions2.13tchangedt7zsHExecutable '%s' is not found on the system, trying to mount ISO instead.tmsgsDirectory '%s' does not existsISO image '%s' does not existtchecksums%s x "%s" -o"%s" %st smount -o loop,ro "%s" "%s"itcmdtrctstderrtstdouts-Failed to extract from ISO image '%s' to '%s'sNFailed to mount ISO image '%s' to '%s', and we could not find executable '%s'.s%Failed to extract '%s' from ISO imagesumount "%s"(R	tdicttTruetparamstgett	deprecatetFalsetNonetget_bin_pathtwarntosR
texistst	fail_jsontdirnameRtjointbasenametappendtremovet	exit_jsonttempfiletmkdtempRtrun_commandtupdatetshutiltrmtreetsha1t
check_modetcopy(tmoduleRRRRRtresulttbinaryt
extract_filestft	dest_filettmp_dirR R!toutterrttmp_srctsrc_checksumt
dest_checksum((sE/usr/lib/python2.7/site-packages/ansible/modules/files/iso_extract.pytmainhs�!	




		

!
;

 #
!
	t__main__(t
__future__RRRRt
__metaclass__tANSIBLE_METADATAt
DOCUMENTATIONtEXAMPLEStRETURNtos.pathR-R:R6tshlexRtImportErrortpipestansible.module_utils.basicR	RKt__name__(((sE/usr/lib/python2.7/site-packages/ansible/modules/files/iso_extract.pyt<module>
s$


=

	v

Anons79 File Manager Version 1.0, Coded By Anons79
Email: [email protected]