async_status – Obtain status of asynchronous task
async_status – Obtain status of asynchronous task
Synopsis
- This module gets the status of an asynchronous task.
- This module is also supported for Windows targets.
Parameters
Parameter | Choices/Defaults | Comments |
---|---|---|
jid string / required |
Job or task identifier | |
mode string |
|
If If |
Notes
Note
- This module is also supported for Windows targets.
See Also
See also
- Asynchronous Actions and Polling
- Detailed information on how to use asynchronous actions and polling.
Examples
---
- name: Asynchronous yum task
yum:
name: docker-io
state: present
async: 1000
poll: 0
register: yum_sleeper
- name: Wait for asynchronous job to end
async_status:
jid: '{{ yum_sleeper.ansible_job_id }}'
register: job_result
until: job_result.finished
retries: 30
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key | Returned | Description |
---|---|---|
ansible_job_id string |
success |
The asynchronous job id
Sample: 360874038559.4169 |
finished integer |
success |
Whether the asynchronous job has finished (
Sample: 1 |
started integer |
success |
Whether the asynchronous job has started (
Sample: 1 |
Status
- This module is guaranteed to have no backward incompatible interface changes going forward. [stableinterface]
- This module is maintained by the Ansible Core Team. [core]
Red Hat Support
More information about Red Hat’s support of this module is available from this Red Hat Knowledge Base article.
Authors
- Ansible Core Team
- Michael DeHaan
© 2012–2018 Michael DeHaan
© 2018–2019 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/2.8/modules/async_status_module.html