403Webshell
Server IP : 80.87.202.40  /  Your IP : 216.73.216.169
Web Server : Apache
System : Linux rospirotorg.ru 5.14.0-539.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 5 22:26:13 UTC 2024 x86_64
User : bitrix ( 600)
PHP Version : 8.2.27
Disable Function : NONE
MySQL : OFF |  cURL : ON |  WGET : ON |  Perl : ON |  Python : OFF |  Sudo : ON |  Pkexec : ON
Directory :  /lib/python3.11/site-packages/ansible/modules/__pycache__/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /lib/python3.11/site-packages/ansible/modules/__pycache__/async_status.cpython-311.pyc
�

���c(���ddlmZmZmZeZdZdZdZddl	Z	ddl
Z
ddlmZddl
mZddlmZd	�Zed
kre��dSdS)�)�absolute_import�division�print_functiona=
---
module: async_status
short_description: Obtain status of asynchronous task
description:
- This module gets the status of an asynchronous task.
- This module is also supported for Windows targets.
version_added: "0.5"
options:
  jid:
    description:
    - Job or task identifier
    type: str
    required: true
  mode:
    description:
    - If C(status), obtain the status.
    - If C(cleanup), clean up the async job cache (by default in C(~/.ansible_async/)) for the specified job I(jid).
    type: str
    choices: [ cleanup, status ]
    default: status
extends_documentation_fragment:
- action_common_attributes
- action_common_attributes.flow
attributes:
    action:
        support: full
    async:
        support: none
    check_mode:
        support: none
    diff_mode:
        support: none
    bypass_host_loop:
        support: none
    platform:
        support: full
        platforms: posix, windows
seealso:
- ref: playbooks_async
  description: Detailed information on how to use asynchronous actions and polling.
author:
- Ansible Core Team
- Michael DeHaan
aV
---
- name: Asynchronous yum task
  ansible.builtin.yum:
    name: docker-io
    state: present
  async: 1000
  poll: 0
  register: yum_sleeper

- name: Wait for asynchronous job to end
  ansible.builtin.async_status:
    jid: '{{ yum_sleeper.ansible_job_id }}'
  register: job_result
  until: job_result.finished
  retries: 100
  delay: 10
a�
ansible_job_id:
  description: The asynchronous job id
  returned: success
  type: str
  sample: '360874038559.4169'
finished:
  description: Whether the asynchronous job has finished (C(1)) or not (C(0))
  returned: always
  type: int
  sample: 1
started:
  description: Whether the asynchronous job has started (C(1)) or not (C(0))
  returned: always
  type: int
  sample: 1
stdout:
  description: Any output returned by async_wrapper
  returned: always
  type: str
stderr:
  description: Any errors returned by async_wrapper
  returned: always
  type: str
erased:
  description: Path to erased job file
  returned: when file is erased
  type: str
N)�
AnsibleModule)�	iteritems��	to_nativec���tttdd���tddddg���tdd�������	��}|jd
}|jd}|jd}tj�|��}tj�||��}tj�|��s|�d
|dd���|dkr+tj	|��|�
||���d}	t|��5}tj
|�����}ddd��n#1swxYwYnI#t$r<|s|�
||dd���n|�||d|zdd���YnwxYwd|vrd|d<||d<n	d|vrd|d<d�t!|��D��}|j
di|��dS)N�strT)�type�required�status�cleanup)r�default�choices�path)�jid�mode�
_async_dir)�
argument_specrrrzcould not find job�)�msg�ansible_job_id�started�finished)r�erasedr)�results_filerrrzCould not parse job output: %s)rrrrrrrrc�4�i|]\}}t|��|��S�r)�.0�k�vs   �A/usr/lib/python3.11/site-packages/ansible/modules/async_status.py�
<dictcomp>zmain.<locals>.<dictcomp>�s$��8�8�8���1�I�a�L�L�!�8�8�8�r)r�dict�params�osr�
expanduser�join�exists�	fail_json�unlink�	exit_json�open�json�loads�read�	Exceptionr)�modulerr�	async_dir�logdir�log_path�data�fs        r#�mainr:qs���
���e�d�+�+�+�
�u�h��H�8M�
N�
N�
N��V�d�3�3�3�	*�*�*����F��=�� �D�
�-��
�C��
�l�+�I��W�
�
�	�
*�
*�F��w�|�|�F�C�(�(�H�
�7�>�>�(�#�#�^����1�#�q�[\��]�]�]��y���
�	�(��������H��=�=�=��D�	a�
�(�^�^�	(�q��:�a�f�f�h�h�'�'�D�	(�	(�	(�	(�	(�	(�	(�	(�	(�	(�	(����	(�	(�	(�	(����a�a�a��	a����(�3�PQ�\]��^�^�^�^����C�h�!A�D�!H�RS�^_�
�
a�
a�
a���a����������Z��!$��
���	�4�	�	���Z��9�8�	�$���8�8�8�D��F����t�����s7�#E1�2'E%�E1�%E)�)E1�,E)�-E1�1AF7�6F7�__main__)�
__future__rrrr�
__metaclass__�
DOCUMENTATION�EXAMPLES�RETURNr0r(�ansible.module_utils.basicr�ansible.module_utils.sixr�ansible.module_utils._textr	r:�__name__rr%r#�<module>rEs���A�@�@�@�@�@�@�@�@�@��
�,�
�\��&
��<����	�	�	�	�4�4�4�4�4�4�.�.�.�.�.�.�0�0�0�0�0�0�1�1�1�h�z����D�F�F�F�F�F��r%

Youez - 2016 - github.com/yon3zu
LinuXploit