Documentation
PLEASE NOTE: This document applies to latest version and not to the latest stable release v3.0
Documentation for other releases can be found by using the version selector in the top right of any doc page.async_poll
Wait until an async task finishes and return its result. The task fails if the job failed.
Attributes
check_mode:
support: none
Parameters
| Parameter | Required | Type | Values | Description |
|---|---|---|---|---|
| jid | true | integer | Job ID to poll. | |
| interval | integer | Poll interval in seconds. |
Example
- name: Start background task
command: ./long_running.sh
async: 300
poll: 0
register: job
- name: Wait for it
async_poll:
jid: "{{ job.rash_job_id }}"
interval: 5
register: result