ansible / ansible.builtin / v2.15.10 / module / async_status Obtain status of asynchronous task | "added in version" 0.5 of ansible.builtin" Authors: Ansible Core Team, Michael DeHaan This plugin has a corresponding action plugin.ansible.builtin.async_status (v2.15.10) — module
pip
Install with pip install ansible-core==2.15.10
This module gets the status of an asynchronous task.
This module is also supported for Windows targets.
--- - 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
jid: description: - Job or task identifier required: true type: str mode: choices: - cleanup - status default: status 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
ansible_job_id: description: The asynchronous job id returned: success sample: '360874038559.4169' type: str erased: description: Path to erased job file returned: when file is erased type: str finished: description: Whether the asynchronous job has finished (C(1)) or not (C(0)) returned: always sample: 1 type: int started: description: Whether the asynchronous job has started (C(1)) or not (C(0)) returned: always sample: 1 type: int stderr: description: Any errors returned by async_wrapper returned: always type: str stdout: description: Any output returned by async_wrapper returned: always type: str