Anons79 Mini Shell

Directory : /lib/python2.7/site-packages/ansible/modules/system/
Upload File :
Current File : //lib/python2.7/site-packages/ansible/modules/system/pids.pyc

�
�Udac@`s�ddlmZmZmZeZidd6dgd6dd6ZdZd	Zd
Z	ddl
mZyddlZe
ZWnek
r�eZnXd
�Zd�Zedkr�e�ndS(i(tabsolute_importtdivisiontprint_functions1.1tmetadata_versiontpreviewtstatust	communitytsupported_bys�
module: pids
version_added: 2.8
description: "Retrieves a list of PIDs of given process name in Ansible controller/controlled machines.Returns an empty list if no process in that name exists."
short_description: "Retrieves process IDs list if the process is running otherwise return empty list"
author:
  - Saranya Sridharan (@saranyasridharan)
requirements:
  - psutil(python module)
options:
  name:
    description: the name of the process you want to get PID for.
    required: true
    type: str
s�
# Pass the process name
- name: Getting process IDs of the process
  pids:
      name: python
  register: pids_of_python

- name: Printing the process IDs obtained
  debug:
    msg: "PIDS of python:{{pids_of_python.pids|join(',')}}"
s�
pids:
  description: Process IDs of the given process
  returned: list of none, one, or more process IDs
  type: list
  sample: [100,200]
(t
AnsibleModuleNcC`smgtjdddg�D]P}|jr|jjdd�r|jdj�|j�kr|jd^qS(Ntattrstpidtname(tpsutiltprocess_itertinfotgettNonetlower(Rtp((s?/usr/lib/python2.7/site-packages/ansible/modules/system/pids.pytget_pid7sc	C`sytdtdtdtdd��dt�}tsF|jdd�n|jd}td	t|��}|j|�dS(
Nt
argument_specRtrequiredttypetstrtsupports_check_modetmsgsSMissing required 'psutil' python module. Try installing it with: pip install psutiltpids(RtdicttTruet
HAS_PSUTILt	fail_jsontparamsRt	exit_json(tmoduleRtresponse((s?/usr/lib/python2.7/site-packages/ansible/modules/system/pids.pytmain;s	
t__main__(t
__future__RRRRt
__metaclass__tANSIBLE_METADATAt
DOCUMENTATIONtEXAMPLEStRETURNtansible.module_utils.basicRRRRtImportErrortFalseRR#t__name__(((s?/usr/lib/python2.7/site-packages/ansible/modules/system/pids.pyt<module>s"





		

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