ansible / ansible.windows / 2.3.0 / module / async_status Obtain status of asynchronous task Authors: Ansible Core Teamansible.windows.async_status (2.3.0) — module
Install with ansible-galaxy collection install ansible.windows:==2.3.0
collections: - name: ansible.windows version: 2.3.0
This module gets the status of an asynchronous task.
- name: Asynchronous yum task ansible.windows.win_command: my.exe async: 1000 poll: 0 register: long_cmd
- name: Wait for asynchronous job to end ansible.builtin.async_status: jid: '{{ long_cmd.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