Anons79 Mini Shell

Directory : /lib/python2.7/site-packages/ansible/modules/net_tools/basics/
Upload File :
Current File : //lib/python2.7/site-packages/ansible/modules/net_tools/basics/slurp.pyc

�
�Udac@`s�ddlmZmZmZeZidd6dgd6dd6ZdZd	Zdd
l	Z	dd
l
Z
ddlmZd�Z
ed
kr�e
�nd
S(i(tabsolute_importtdivisiontprint_functions1.1tmetadata_versiontstableinterfacetstatustcoretsupported_bys"
---
module: slurp
version_added: historical
short_description: Slurps a file from remote nodes
description:
     - This module works like M(fetch). It is used for fetching a base64-
       encoded blob containing the data in a remote file.
     - This module is also supported for Windows targets.
options:
  src:
    description:
      - The file on the remote system to fetch. This I(must) be a file, not a directory.
    type: path
    required: true
    aliases: [ path ]
notes:
   - This module returns an 'in memory' base64 encoded version of the file, take into account that this will require at least twice the RAM as the
     original file size.
   - This module is also supported for Windows targets.
seealso:
- module: fetch
author:
    - Ansible Core Team
    - Michael DeHaan (@mpdehaan)
s�
- name: Find out what the remote machine's mounts are
  slurp:
    src: /proc/mounts
  register: mounts

- debug:
    msg: "{{ mounts['content'] | b64decode }}"

# From the commandline, find the pid of the remote machine's sshd
# $ ansible host -m slurp -a 'src=/var/run/sshd.pid'
# host | SUCCESS => {
#     "changed": false,
#     "content": "MjE3OQo=",
#     "encoding": "base64",
#     "source": "/var/run/sshd.pid"
# }
# $ echo MjE3OQo= | base64 -d
# 2179
N(t
AnsibleModulecC`s�tdtdtdddtddg��dt�}|jd}tjj|�sl|jdd	|�ntj|tj	�s�|jdd
|�nt
|d��}|j�}WdQXtj
|�}|jd|d
|dd�dS(Nt
argument_spectsrcttypetpathtrequiredtaliasestsupports_check_modetmsgsfile not found: %ssfile is not readable: %strbtcontenttsourcetencodingtbase64(RtdicttTruetparamstosRtexistst	fail_jsontaccesstR_OKtopentreadRt	b64encodet	exit_json(tmoduleRt	source_fhtsource_contenttdata((sJ/usr/lib/python2.7/site-packages/ansible/modules/net_tools/basics/slurp.pytmainEs!	
t__main__(t
__future__RRRRt
__metaclass__tANSIBLE_METADATAt
DOCUMENTATIONtEXAMPLESRRtansible.module_utils.basicRR&t__name__(((sJ/usr/lib/python2.7/site-packages/ansible/modules/net_tools/basics/slurp.pyt<module>s


	

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