Parameter | Choices/Defaults | Comments |
---|---|---|
jid
string
/ required
|
Job or task identifier
|
|
mode
string
|
|
If
status , obtain the status.If
cleanup , clean up the async job cache (by default in ~/.ansible_async/ ) for the specified job jid. |
See also
---
- 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
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 (
1 ) or not (0 )Sample:
1
|
started
integer
|
success |
Whether the asynchronous job has started (
1 ) or not (0 )Sample:
1
|
More information about Red Hat’s support of this module is available from this Red Hat Knowledge Base article.
Hint
If you notice any issues in this documentation you can edit this document to improve it.